OSDN Git Service

* crx-dis.c (EXTRACT): Make macro work on 64-bit hosts.
authornickc <nickc>
Mon, 22 May 2006 08:40:09 +0000 (08:40 +0000)
committernickc <nickc>
Mon, 22 May 2006 08:40:09 +0000 (08:40 +0000)
opcodes/ChangeLog
opcodes/crx-dis.c

index 4550ce9..305d8e9 100644 (file)
@@ -1,5 +1,9 @@
 2006-05-22  Nick Clifton  <nickc@redhat.com>
 
+       * crx-dis.c (EXTRACT): Make macro work on 64-bit hosts.
+
+2006-05-22  Nick Clifton  <nickc@redhat.com>
+
        * po/nl.po: Updated translation.
 
 2006-05-18  Alan Modra  <amodra@bigpond.net.au>
index 8f14e8b..8d51c75 100644 (file)
@@ -30,7 +30,7 @@
 
 /* Extract 'n_bits' from 'a' starting from offset 'offs'.  */
 #define EXTRACT(a, offs, n_bits)           \
-  (n_bits == 32 ? (((a) >> (offs)) & ~0L)   \
+  (n_bits == 32 ? (((a) >> (offs)) & 0xffffffffL)   \
   : (((a) >> (offs)) & ((1 << (n_bits)) -1)))
 
 /* Set Bit Mask - a mask to set all bits starting from offset 'offs'.  */