Committed, MMIX: Fix 64-bit host (opcodes/mmix-opc.c)

H. J. Lu hjl@lucon.org
Sun Mar 20 05:49:00 GMT 2005


On Sat, Mar 19, 2005 at 01:36:54PM -0500, Daniel Jacobowitz wrote:
> On Sat, Mar 19, 2005 at 10:33:22AM -0800, H. J. Lu wrote:
> > On Fri, Mar 18, 2005 at 11:30:41PM -0500, Hans-Peter Nilsson wrote:
> > > On Fri, 18 Mar 2005, H. J. Lu wrote:
> > > > Please make sure that there are no unexpected failures in gas.
> > > 
> > > That's what I meant of course.  Now it does; if there are any
> > > related ld failures they disappear in the breakage due to empty
> > > size section removal.
> > > 
> > > (For the record, the value of (X << 24) where X=0xff depends on
> > > the size of int and the type of the expression.  Easiest fixed
> > > by forcing the type of X.)
> > > 
> > > I'll commit this to 2.16 too.
> > > 
> > > 	* mmix-opc.c (O, Z): Force expression as unsigned long.
> > > 
> > 
> > It isn't enough. I checked in the following patch to mainline to
> > fix it. I suggest you check it to 2.16 branch.
> 
> Why do you believe the type of the shift count matters here?
> 
> > -#define O(m) ((unsigned long) (m) << 24UL), ((~(unsigned long) (m) & 255) << 24)
> > +#define O(m) ((unsigned long) (m) << 24UL), ((~(unsigned long) (m) & 255) << 24UL)
> 

Without that change, mmix doesn't work on x86_64.


H.J.



More information about the Binutils mailing list