Unrevied patches^3

Richard Henderson rth@redhat.com
Mon Oct 20 07:34:00 GMT 2003


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~



More information about the Gcc-patches mailing list