diff options
author | Michael Zolotukhin <michael.v.zolotukhin@gmail.com> | 2013-12-17 09:06:57 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-12-17 09:06:57 -0800 |
commit | 4a357820add595557dcd08d275288a4bcf43cbcb (patch) | |
tree | a073102f7de16dc39360f098a1d63cb6b91ca8f0 /opcodes | |
parent | 5879bb8fc592e4aea85bdc2a84381d89850e5770 (diff) | |
download | gdb-4a357820add595557dcd08d275288a4bcf43cbcb.zip gdb-4a357820add595557dcd08d275288a4bcf43cbcb.tar.gz gdb-4a357820add595557dcd08d275288a4bcf43cbcb.tar.bz2 |
Properly handle ljmp/lcall with invalid MODRM byte
gas/testsuite/
2013-12-17 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
* gas/i386/disassem.s: New.
* gas/i386/disassem.d: Likewise.
* gas/i386/x86-64-disassem.s: Likewise.
* gas/i386/x86-64-disassem.d: Likewise.
* gas/i386/i386.exp: Run disassem and x86-64-disassem.
opcodes/
2013-12-17 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
* i386-dis.c (MOD_FF_REG_3): New.
(MOD_FF_REG_5): Likewise.
(mod_table): Add MOD_FF_REG_3 and MOD_FF_REG_5.
(reg_table): Use MOD_FF_REG_3 and MOD_FF_REG_5.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 7 | ||||
-rw-r--r-- | opcodes/i386-dis.c | 14 |
2 files changed, 19 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 9ee7c75..d944dfd 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,10 @@ +2013-12-17 Michael Zolotukhin <michael.v.zolotukhin@gmail.com> + + * i386-dis.c (MOD_FF_REG_3): New. + (MOD_FF_REG_5): Likewise. + (mod_table): Add MOD_FF_REG_3 and MOD_FF_REG_5. + (reg_table): Use MOD_FF_REG_3 and MOD_FF_REG_5. + 2013-12-16 Andrew Bennett <andrew.bennett@imgtec.com> * mips-dis.c: Add mips_cp1_names pointer. diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 8e55724..2c28e52 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -715,6 +715,8 @@ enum MOD_8D = 0, MOD_C6_REG_7, MOD_C7_REG_7, + MOD_FF_REG_3, + MOD_FF_REG_5, MOD_0F01_REG_0, MOD_0F01_REG_1, MOD_0F01_REG_2, @@ -3229,9 +3231,9 @@ static const struct dis386 reg_table[][8] = { { "incQ", { Evh1 } }, { "decQ", { Evh1 } }, { "call{T|}", { indirEv, BND } }, - { "Jcall{T|}", { indirEp } }, + { MOD_TABLE (MOD_FF_REG_3) }, { "jmp{T|}", { indirEv, BND } }, - { "Jjmp{T|}", { indirEp } }, + { MOD_TABLE (MOD_FF_REG_5) }, { "pushU", { stackEv } }, { Bad_Opcode }, }, @@ -11050,6 +11052,14 @@ static const struct dis386 mod_table[][2] = { { RM_TABLE (RM_C7_REG_7) }, }, { + /* MOD_FF_REG_3 */ + { "Jcall{T|}", { indirEp } }, + }, + { + /* MOD_FF_REG_5 */ + { "Jjmp{T|}", { indirEp } }, + }, + { /* MOD_0F01_REG_0 */ { X86_64_TABLE (X86_64_0F01_REG_0) }, { RM_TABLE (RM_0F01_REG_0) }, |