m68k reloc types

Roman Zippel zippel@linux-m68k.org
Tue Aug 17 09:17:00 GMT 2004


Hi,

On Tue, 17 Aug 2004, Andreas Schwab wrote:

> Richard Henderson <rth@redhat.com> writes:
> 
> > where it could be
> >
> > 	add.l %d0, x@GOTOFF(%a5)
> 
> [ ITYM x@GOTOFF(%pc) ]
> 
> x@GOTOFF(%pc) resolves to the address of the GOT entry of x.  You would
> need ([x@GOTOFF,%pc]) to store into x, but that would be even slower.

It's not the same, gcc can use it to access local variables without 
creating a got entry. m68k currently doesn't do it, but it would be nice, 
if we could. Simply compare the generated code for something like 
"puts("foo");" for i386 and m68k.
Anyway, the cost of a memory indirect accesses depends on the cpu, 
680[46]0 would benefit from this. On older cpu it seems indeed to be 
slower. I would like to add the support for it to gcc and probably I first 
only enable it for 680[46]0.

bye, Roman



More information about the Binutils mailing list