summaryrefslogtreecommitdiff
path: root/opcodes/i386-dis.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2007-08-30 15:13:45 +0000
committerH.J. Lu <hjl@lucon.org>2007-08-30 15:13:45 +0000
commit2a57eeee20f83957e28d88fd088b8f7e2c8c5980 (patch)
tree9646250e432b6e2d3fc626e02d44ce222d3c577f /opcodes/i386-dis.c
parent2dc5e5bea52f2ffe54966b2cb1e0bc5c872ec411 (diff)
downloadgdb-2a57eeee20f83957e28d88fd088b8f7e2c8c5980.tar.gz
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.c43
1 files changed, 19 insertions, 24 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index dda176cae8c..243b508f721 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. */