mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
Prevent a left shift by a negative value when disassembling IA64 binaries.
* ia64-opc.c (locate_opcode_ent): Prevent a negative shift when locating the bit to be tested.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2019-10-29 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* ia64-opc.c (locate_opcode_ent): Prevent a negative shift when
|
||||||
|
locating the bit to be tested.
|
||||||
|
|
||||||
2019-10-29 Nick Clifton <nickc@redhat.com>
|
2019-10-29 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* s12z-dis.c (opr_emit_disassembly): Check for illegal register
|
* s12z-dis.c (opr_emit_disassembly): Check for illegal register
|
||||||
|
@ -372,13 +372,16 @@ locate_opcode_ent (ia64_insn opcode, enum ia64_insn_type type)
|
|||||||
|
|
||||||
bitpos[currstatenum] = currbitnum;
|
bitpos[currstatenum] = currbitnum;
|
||||||
|
|
||||||
/* Skip opval[0] bits in the instruction. */
|
/* Skip opval[0] bits in the instruction. */
|
||||||
if (op & 0x40)
|
if (op & 0x40)
|
||||||
{
|
{
|
||||||
currbitnum -= opval[0];
|
currbitnum -= opval[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The value of the current bit being tested. */
|
if (currbitnum < 0)
|
||||||
|
currbitnum = 0;
|
||||||
|
|
||||||
|
/* The value of the current bit being tested. */
|
||||||
currbit = opcode & (((ia64_insn) 1) << currbitnum) ? 1 : 0;
|
currbit = opcode & (((ia64_insn) 1) << currbitnum) ? 1 : 0;
|
||||||
next_op = -1;
|
next_op = -1;
|
||||||
|
|
||||||
@ -463,7 +466,7 @@ locate_opcode_ent (ia64_insn opcode, enum ia64_insn_type type)
|
|||||||
|
|
||||||
if (next_op > 65535)
|
if (next_op > 65535)
|
||||||
{
|
{
|
||||||
abort ();
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Run through the list of opcodes to check, trying to find
|
/* Run through the list of opcodes to check, trying to find
|
||||||
|
Reference in New Issue
Block a user