* elflink.c (elf_gc_sweep): Don't specially keep non-alloc,
[binutils-gdb.git] / opcodes / m32r-asm.c
index 50f1363e77797939fdce552ac7cf630adfcf0a0c..a5bd363316820879121a30bbb99f594a5ac1fe3c 100644 (file)
@@ -89,7 +89,10 @@ parse_hi16 (CGEN_CPU_DESC cd,
       ++*strp;
       if (errmsg == NULL
          && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
-       value >>= 16;
+       {
+         value >>= 16;
+         value &= 0xffff;
+       }
       *valuep = value;
       return errmsg;
     }
@@ -104,8 +107,9 @@ parse_hi16 (CGEN_CPU_DESC cd,
       if (errmsg == NULL
          && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
         {
-          value = value + (value & 0x8000 ? 0x10000 : 0);
+          value += 0x8000;
           value >>= 16;
+         value &= 0xffff;
         }
       *valuep = value;
       return errmsg;