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-Tag: newlib-csl-sourcerygxx-3_4_4-25~486 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a854efa328f6271438186f83b052e6b739b73a8a;p=thirdparty%2Fbinutils-gdb.git * crx-dis.c (EXTRACT): Make macro work on 64-bit hosts. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 4550ce928c5..305d8e92595 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 8f14e8ba92b..8d51c751321 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'. */