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
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>, binutils at sources dot redhat dot com, Atsushi Nemoto <anemo at mba dot ocn dot ne dot jp>
- Date: Fri, 12 Sep 2003 16:38:36 +0200 (MET DST)
- Subject: Re: [patch] MIPS/gas: load/store address overflow on binutils 2.14
- Organization: Technical University of Gdansk
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 +