This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Fix distinction of 32/64bit addresses in MIPS gas
- To: binutils at sources dot redhat dot com
- Subject: Re: [PATCH] Fix distinction of 32/64bit addresses in MIPS gas
- From: Richard Sandiford <r dot sandiford at redhat dot com>
- Date: 03 Sep 2001 10:57:00 +0100
- References: <20010825032615.E309@rembrandt.csv.ica.uni-stuttgart.de> <email@example.com> <20010831181657.A17249@rembrandt.csv.ica.uni-stuttgart.de> <200108311711.KAA19709@geoffk.org> <20010831193107.A10362@rembrandt.csv.ica.uni-stuttgart.de> <firstname.lastname@example.org> <email@example.com> <20010831204556.C17249@rembrandt.csv.ica.uni-stuttgart.de> <firstname.lastname@example.org> <email@example.com> <20010901032235.A4969@rembrandt.csv.ica.uni-stuttgart.de>
Thiemo Seufer <firstname.lastname@example.org> writes:
> email@example.com wrote:
> > yes, i know that the pointer is going to be constrainted to being a
> > sign-extended 32-bit value, but neither the compiler or any assembly
> > code that uses it needs to know that (or should). As far as they're
> > concerned, pointers are 64-bit values and they're loaded with ld, etc.
> I see. Btw, my patch actually doesn't change this behaviour, the
> HAVE_32BIT_ADDRESSES macro cares about macro expansion, so it
> changes an address load via immediates from a "lui; daddiu" sequence
> to "lui; addiu", this makes no difference. An "ld" isn't changed.
But HAVE_32BIT_ADDRESSES controls all the address calcuations done by
macros, not just those that are guaranteed to be 32-bit values. To take
one example, if "foo" is in .sdata, won't:
after your patch? Is $gp guaranteed to be a 32-bit value when 64-bit
pointers are being used?