diff options
author | spop <spop> | 2009-11-19 07:08:38 +0000 |
---|---|---|
committer | spop <spop> | 2009-11-19 07:08:38 +0000 |
commit | 84c575045cc880157fbc06da966dee453feba64f (patch) | |
tree | ee04dbe030d8fb8ba34913491e8c0afa99201cd0 /opcodes | |
parent | a1bc82cb2646d0934d937b7d79f53abc21c0985e (diff) | |
download | binutils-redhat-84c575045cc880157fbc06da966dee453feba64f.tar.gz |
2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
opcodes/
PR binutils/10973
* i386-dis.c (get_vex_imm8): Do not increment codep.
Avoid incrementing bytes_before_imm when OP_E_memory
has already forwarded the codep pointer.
(OP_EX_VexW): Increment codep to skip mod/rm byte.
gas/testsuite/
* gas/i386/x86-64-xop.d: Update patterns.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 8 | ||||
-rw-r--r-- | opcodes/i386-dis.c | 20 |
2 files changed, 19 insertions, 9 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 383ded4227..accb7b9273 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,5 +1,13 @@ 2009-11-18 Sebastian Pop <sebastian.pop@amd.com> + PR binutils/10973 + * i386-dis.c (get_vex_imm8): Do not increment codep. + Avoid incrementing bytes_before_imm when OP_E_memory + has already forwarded the codep pointer. + (OP_EX_VexW): Increment codep to skip mod/rm byte. + +2009-11-18 Sebastian Pop <sebastian.pop@amd.com> + * i386-dis.c (VEX_LEN_XOP_08_A0): Removed. (VEX_LEN_XOP_08_A1): Removed. (xop_table): Remove entries for VEX_LEN_XOP_08_A0 and diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 23ea6af928..a69f34f2cb 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -13695,10 +13695,6 @@ get_vex_imm8 (int sizeflag) { int bytes_before_imm = 0; - /* Skip mod/rm byte. */ - MODRM_CHECK; - codep++; - if (modrm.mod != 3) { /* There are SIB/displacement bytes. */ @@ -13712,7 +13708,8 @@ get_vex_imm8 (int sizeflag) { FETCH_DATA (the_info, codep + 1); base = *codep & 7; - bytes_before_imm++; + /* Don't increase bytes_before_imm as this has already + been done in OP_E_memory. */ } switch (modrm.mod) @@ -13728,8 +13725,8 @@ get_vex_imm8 (int sizeflag) bytes_before_imm += 4; break; case 1: - /* 1 byte displacement. */ - bytes_before_imm++; + /* 1 byte displacement: codep has already been + incremented by 1 in OP_E_memory. */ break; } } @@ -13747,8 +13744,8 @@ get_vex_imm8 (int sizeflag) bytes_before_imm += 2; break; case 1: - /* 1 byte displacement. */ - bytes_before_imm++; + /* 1 byte displacement: codep has already been + incremented by 1 in OP_E_memory. */ break; } } @@ -13853,6 +13850,11 @@ OP_EX_VexW (int bytemode, int sizeflag) if (!vex_w_done) { vex_w_done = 1; + + /* Skip mod/rm byte. */ + MODRM_CHECK; + codep++; + if (vex.w) reg = get_vex_imm8 (sizeflag) >> 4; } |