Committed, MMIX: Fix 64-bit host (opcodes/mmix-opc.c)
H. J. Lu
hjl@lucon.org
Sun Mar 20 01:15:00 GMT 2005
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.
BTW, is mmix-mmixware a real ELF target? When I used mmix-elf, many
ELF tests in gas/testsuite/gas/elf failed. Should they be fixed or
skipped?
H.J.
----
2005-03-19 H.J. Lu <hongjiu.lu@intel.com>
* mmix-opc.c (O): Use 24UL instead of 24 for unsigned long.
(Z): Likewise.
--- opcodes/mmix-opc.c.ll 2005-03-19 10:06:14.302812718 -0800
+++ opcodes/mmix-opc.c 2005-03-19 10:24:16.870501567 -0800
@@ -67,11 +67,11 @@ const struct mmix_spec_reg mmix_spec_reg
/* All bits in the opcode-byte are significant. Add "| ..." expressions
to add zero-bits. */
#undef O
-#define O(m) ((unsigned long) (m) << 24UL), ((~(unsigned long) (m) & 255) << 24)
+#define O(m) ((unsigned long) (m) << 24UL), ((~(unsigned long) (m) & 255) << 24UL)
/* Bits 7..1 of the opcode are significant. */
#undef Z
-#define Z(m) ((unsigned long) (m) << 24), ((~(unsigned long) (m) & 254) << 24)
+#define Z(m) ((unsigned long) (m) << 24UL), ((~(unsigned long) (m) & 254) << 24UL)
/* For easier overview of the table. */
#define N mmix_type_normal
More information about the Binutils
mailing list