Fix undefined compilation behaviour shifting a value into the sign bit of a signed integer.

* cgen-dis.c (count_decodable_bits): Use unsigned value for mask
	test bit.
This commit is contained in:
Michael McConville 2016-02-01 10:41:32 +00:00 committed by Nick Clifton
parent b6471e6e2c
commit d8c823c8b6
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2016-02-01 Michael McConville <mmcco@mykolab.com>
* cgen-dis.c (count_decodable_bits): Use unsigned value for mask
test bit.
2016-01-25 Renlin Li <renlin.li@arm.com>
* arm-dis.c (mapping_symbol_for_insn): New function.

View file

@ -40,7 +40,8 @@ count_decodable_bits (const CGEN_INSN *insn)
{
unsigned mask = CGEN_INSN_BASE_MASK (insn);
int bits = 0;
int m;
unsigned m;
for (m = 1; m != 0; m <<= 1)
{
if (mask & m)