This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] MIPS/gas: load/store address overflow on binutils 2.14


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        +


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]