Saga of m68k PIC continues

Richard Henderson rth@redhat.com
Thu Dec 12 11:24:00 GMT 2002


On Thu, Dec 12, 2002 at 11:41:23AM +0100, Andreas Schwab wrote:
> For -fPIC there is probably no difference, but full 32-bit pc-relative is
> still less efficient than register+16 bit offset, so with -fpic the use of
> the pic register is usually faster.

Even though you've got to have an extra memory load?  I mean, for
a *static* variable, your choices for computing the address are

	movel	foo@GOT.w(%a5), %a0
or
	lea	foo(%pc), %a0

And of course the later can be used in a source address directly.
Well, I suppose technically both of them can, since you've got
double-indirect memory addresses, but I can't imagine that that's
lightning quick.

> Note also that pc-relative addresses cannot be used as destination operand.

Indeed.  A very unfortunate asymmetry.  But it looks like we
already model this with general_src_operand and the S and T
constraints.


r~



More information about the Gcc mailing list