xcoff slurp_armap bounds checking
[deliverable/binutils-gdb.git] / opcodes / arc-dis.c
index a038fa0ca27f26445f886f8cb87b8313dcce412a..a47e81f0a28be49522bb9e2e38bb43ec0b7c0b93 100644 (file)
@@ -137,8 +137,7 @@ static bfd_boolean print_hex = FALSE;
   (info->endian == BFD_ENDIAN_LITTLE ? bfd_getm32 (bfd_getl32 (buf))   \
    : bfd_getb32 (buf))
 
-#define BITS(word,s,e)  (((word) << (sizeof (word) * 8 - 1 - e)) >>    \
-                        (s + (sizeof (word) * 8 - 1 - e)))
+#define BITS(word,s,e)  (((word) >> (s)) & ((1ull << ((e) - (s)) << 1) - 1))
 #define OPCODE_32BIT_INSN(word)        (BITS ((word), 27, 31))
 
 /* Functions implementation.  */
This page took 0.023847 seconds and 4 git commands to generate.