This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Possible reloc patch (2/2)


Hi -

On Wed, Jan 24, 2001 at 12:49:03PM +0000, Richard Sandiford wrote:
: [...]
: > Would it be OK to add an attribute to define-operand which selects
: > this behaviour?
: 
: Or, how about this?  [...]

I think the basic issue is that cgen-based gas/binutils ports should
in general not use the common relocations (BFD_RELOC_32 and its
R_ ilk), especially for instruction operands.  Adding a new relocation
type is quite routine, and should be preferred, almost always.

With respect to your specific approach, it is possible to accomplish
the same goal outside cgen, that is, without marking up the operands
with attributes, by intercepting the usual complement of hooks, such
as md_cgen_lookup_reloc in gas, *_relocate_section in bfd. 

On the other hand, going down this road suggests that whatever
relocation-related information *is* present in cgen might be
appropriate to remove.  This would include the PC-REL, ABS-ADDR,
and other such attributes.  (I've personally never found them
necessary / of use.)

- FChE

PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]