From: Nick Clifton Date: Mon, 22 May 2006 08:40:09 +0000 (+0000) Subject: * crx-dis.c (EXTRACT): Make macro work on 64-bit hosts. X-Git-Url: https://repo.jachan.dev/binutils.git/commitdiff_plain/a854efa328f6271438186f83b052e6b739b73a8a * crx-dis.c (EXTRACT): Make macro work on 64-bit hosts. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 4550ce928c..305d8e9259 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2006-05-22 Nick Clifton + + * crx-dis.c (EXTRACT): Make macro work on 64-bit hosts. + 2006-05-22 Nick Clifton * po/nl.po: Updated translation. diff --git a/opcodes/crx-dis.c b/opcodes/crx-dis.c index 8f14e8ba92..8d51c75132 100644 --- a/opcodes/crx-dis.c +++ b/opcodes/crx-dis.c @@ -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'. */