diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-08-30 15:13:46 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-08-30 15:13:46 +0000 |
commit | bbedc8321e2c5f170b37295b9a00c2ff3b8312f8 (patch) | |
tree | 7a7a954902892c304cb0a6f3efe074ddca35b021 /opcodes/i386-dis.c | |
parent | 09c11c861badb766bb5140bac0e7dba017730f8a (diff) | |
download | gdb-bbedc8321e2c5f170b37295b9a00c2ff3b8312f8.zip gdb-bbedc8321e2c5f170b37295b9a00c2ff3b8312f8.tar.gz gdb-bbedc8321e2c5f170b37295b9a00c2ff3b8312f8.tar.bz2 |
gas/testsuite/
2007-08-30 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/amd.s: Add rdtscp.
* gas/i386/amd.d: Updated.
* gas/i386/mem-intel.d: Update invlpg for BYTE PTR.
* gas/i386/x86-64-mem-intel.d: Likewise.
* gas/i386/x86-64-opcode.s: Add swapgs.
* gas/i386/x86-64-opcode.d: Updated.
opcodes/
2007-08-30 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (INVLPG_Fixup): Removed.
(OPC_EXT_38): New.
(OPC_EXT_RM_5): Likewise.
(grps): Use OPC_EXT_38.
(opc_ext_table): Add OPC_EXT_38.
(opc_ext_rm_table): Add OPC_EXT_RM_5.
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r-- | opcodes/i386-dis.c | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index dda176c..243b508 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -95,7 +95,6 @@ static void NOP_Fixup2 (int, int); static void OP_3DNowSuffix (int, int); static void OP_SIMD_Suffix (int, int); static void SVME_Fixup (int, int); -static void INVLPG_Fixup (int, int); static void BadOp (void); static void REP_Fixup (int, int); static void CMPXCHG8B_Fixup (int, int); @@ -596,12 +595,14 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr) #define OPC_EXT_35 NULL, { { NULL, USE_OPC_EXT_TABLE }, { NULL, 35 } } #define OPC_EXT_36 NULL, { { NULL, USE_OPC_EXT_TABLE }, { NULL, 36 } } #define OPC_EXT_37 NULL, { { NULL, USE_OPC_EXT_TABLE }, { NULL, 37 } } +#define OPC_EXT_38 NULL, { { NULL, USE_OPC_EXT_TABLE }, { NULL, 38 } } #define OPC_EXT_RM_0 NULL, { { NULL, USE_OPC_EXT_RM_TABLE }, { NULL, 0 } } #define OPC_EXT_RM_1 NULL, { { NULL, USE_OPC_EXT_RM_TABLE }, { NULL, 1 } } #define OPC_EXT_RM_2 NULL, { { NULL, USE_OPC_EXT_RM_TABLE }, { NULL, 2 } } #define OPC_EXT_RM_3 NULL, { { NULL, USE_OPC_EXT_RM_TABLE }, { NULL, 3 } } #define OPC_EXT_RM_4 NULL, { { NULL, USE_OPC_EXT_RM_TABLE }, { NULL, 4 } } +#define OPC_EXT_RM_5 NULL, { { NULL, USE_OPC_EXT_RM_TABLE }, { NULL, 5 } } typedef void (*op_rtn) (int bytemode, int sizeflag); @@ -1544,7 +1545,7 @@ static const struct dis386 grps[][8] = { { "smswD", { Sv } }, { "(bad)", { XX } }, { "lmsw", { Ew } }, - { "invlpg", { { INVLPG_Fixup, 0 } } }, + { OPC_EXT_38 }, }, /* GRP8 */ { @@ -3252,6 +3253,11 @@ static const struct dis386 opc_ext_table[][2] = { { "movhpX", { XM, EXq } }, { "movlhpX", { XM, EXq } }, }, + { + /* OPC_EXT_38 */ + { "invlpg", { Mb } }, + { OPC_EXT_RM_5 }, + }, }; static const struct dis386 opc_ext_rm_table[][8] = { @@ -3310,6 +3316,17 @@ static const struct dis386 opc_ext_rm_table[][8] = { { "(bad)", { XX } }, { "(bad)", { XX } }, }, + { + /* OPC_EXT_RM_5 */ + { "swapgs", { Skip_MODRM } }, + { "rdtscp", { Skip_MODRM } }, + { "(bad)", { XX } }, + { "(bad)", { XX } }, + { "(bad)", { XX } }, + { "(bad)", { XX } }, + { "(bad)", { XX } }, + { "(bad)", { XX } }, + }, }; #define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>") @@ -6351,28 +6368,6 @@ SVME_Fixup (int bytemode, int sizeflag) } static void -INVLPG_Fixup (int bytemode, int sizeflag) -{ - const char *alt; - - switch (*codep) - { - case 0xf8: - alt = "swapgs"; - break; - case 0xf9: - alt = "rdtscp"; - break; - default: - OP_M (bytemode, sizeflag); - return; - } - /* Override "invlpg". */ - strcpy (obuf + strlen (obuf) - 6, alt); - codep++; -} - -static void BadOp (void) { /* Throw away prefixes and 1st. opcode byte. */ |