[patch] MIPS/gas: load/store address overflow on binutils 2.14
Maciej W. Rozycki
macro@ds2.pg.gda.pl
Fri Sep 12 14:38:00 GMT 2003
On Fri, 12 Sep 2003, Alan Modra wrote:
> > ep->X_add_number = (ep->X_add_number << 32) >> 32;
>
> If I recall correctly, a right shift of a negative signed integer is
> "implementation defined" according to the C standard. You are also
Strange, but believable.
> assuming that X_add_number is exactly 64 bit. Sign extension is
That's why I have written about the possible need of checking for BFD64.
:-)
> better done with
>
> x = ((x & 0xffffffff) ^ 0x80000000) - 0x80000000;
Now that's a neat trick I haven't seen before -- I'll have to remember
it. Thiemo, I think you could use it here.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
More information about the Binutils
mailing list