This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] MIPS/gas: load/store address overflow on binutils 2.14
On Fri, Sep 12, 2003 at 03:37:22PM +0200, Maciej W. Rozycki 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
assuming that X_add_number is exactly 64 bit. Sign extension is
better done with
x = ((x & 0xffffffff) ^ 0x80000000) - 0x80000000;
--
Alan Modra
IBM OzLabs - Linux Technology Centre