From a854efa328f6271438186f83b052e6b739b73a8a Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 22 May 2006 08:40:09 +0000 Subject: [PATCH] * crx-dis.c (EXTRACT): Make macro work on 64-bit hosts. --- opcodes/ChangeLog | 4 ++++ opcodes/crx-dis.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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'. */ -- 2.30.2