This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Unrevied patches^3
On Sun, Oct 19, 2003 at 07:16:58PM -0700, Geoff Keating wrote:
> I don't understand what you mean by "the high part is a load from the
> GOT". If you can load the high part from the GOT, why don't you just
> load the whole address from there?
It's a somewhat clever scheme to reduce the number of got entries
for local data. Instead of having one entry per referenced local,
you have one entry per 64k "page". Addresses are formed with
lw r2, %got_page(x)(gp)
la r3, %got_ofst(x)(r2)
and of course the second insn can also be folded into memory
operations, so it's often effectively free.
Of course, this *could* be represented just as (HIGH X).
r~