]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fixes a compile time warnng about left shifting a negative value.
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Tue, 16 Jun 2015 12:35:33 +0000 (13:35 +0100)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 24 Aug 2017 12:46:30 +0000 (09:46 -0300)
* arm-dis.c (print_insn_coprocessor): Avoid negative shift.

opcodes/ChangeLog
opcodes/arm-dis.c

index 84617d17ded81f4251b2978e1752bf10bf006977..c74fa34edcbdb23f47b52eb0e921cfd1e145cb31 100644 (file)
@@ -1,3 +1,7 @@
+2015-06-16  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+       * arm-dis.c (print_insn_coprocessor): Avoid negative shift.
+
 2015-12-11  Matthew Wahab  <matthew.wahab@arm.com>
 
        * aarch64-asm.c (aarch64_ins_hint): New.
index 3f66ffa5647237bcbdd830bf8f85ce661c199ebe..7171f12278b71decdcbc8ec6734af50924988a0e 100644 (file)
@@ -3351,7 +3351,7 @@ print_insn_coprocessor (bfd_vma pc,
 
                    /* Is ``imm'' a negative number?  */
                    if (imm & 0x40)
-                     imm |= (-1 << 7);
+                     imm -= 0x80;
 
                    func (stream, "%d", imm);
                  }