This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Saga of m68k PIC continues
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~