This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Committed, MMIX: Fix 64-bit host (opcodes/mmix-opc.c)
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)
--
Daniel Jacobowitz
CodeSourcery, LLC