In binutils' arm-dis.c, avoid left-shifting a negative number.

Submitted by:	dan.mcgregor_usask.ca (Dan McGregor)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D3376
This commit is contained in:
dim 2015-09-22 09:35:35 +00:00
parent ff5d08b031
commit 87b707ed34

View File

@ -1767,7 +1767,7 @@ print_insn_coprocessor (bfd_vma pc, struct disassemble_info *info, long given,
/* Is ``imm'' a negative number? */ /* Is ``imm'' a negative number? */
if (imm & 0x40) if (imm & 0x40)
imm |= (-1 << 7); imm |= -(1 << 7);
func (stream, "%d", imm); func (stream, "%d", imm);
} }