diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-03-12 10:47:49 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-03-12 10:47:49 +0000 |
commit | 4fd61dcb07594dc4535a0af7129b1e2eb5e9d458 (patch) | |
tree | cfed403bbc8ccc7d2eb0c4040b01e6a1c3df7464 /opcodes/i386-dis.c | |
parent | 0f10071e3dbfb84b625c8609615bdd0d7b66ec3e (diff) | |
download | gdb-4fd61dcb07594dc4535a0af7129b1e2eb5e9d458.zip gdb-4fd61dcb07594dc4535a0af7129b1e2eb5e9d458.tar.gz gdb-4fd61dcb07594dc4535a0af7129b1e2eb5e9d458.tar.bz2 |
* i386-dis.c (grps): Use INVLPG_Fixup instead of OP_E for invlpg.
(INVLPG_Fixup): New function.
(PNI_Fixup): Remove ATTRIBUTE_UNUSED from sizeflag.
* opcode/i386.h (i386_optab): Remove CpuNo64 from sysenter and
sysexit.
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r-- | opcodes/i386-dis.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index ea41d2f..3be6e19 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -95,6 +95,7 @@ static void OP_3DNowSuffix (int, int); static void OP_SIMD_Suffix (int, int); static void SIMD_Fixup (int, int); static void PNI_Fixup (int, int); +static void INVLPG_Fixup (int, int); static void BadOp (void); struct dis_private { @@ -1365,7 +1366,7 @@ static const struct dis386 grps[][8] = { { "smswQ", Ev, XX, XX }, { "(bad)", XX, XX, XX }, { "lmsw", Ew, XX, XX }, - { "invlpg", Ew, XX, XX }, + { "invlpg", INVLPG_Fixup, w_mode, XX, XX }, }, /* GRP8 */ { @@ -4141,7 +4142,7 @@ SIMD_Fixup (int extrachar, int sizeflag ATTRIBUTE_UNUSED) } static void -PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) +PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag) { if (mod == 3 && reg == 1) { @@ -4166,6 +4167,21 @@ PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) } static void +INVLPG_Fixup (int bytemode, int sizeflag) +{ + if (*codep == 0xf8) + { + char *p = obuf + strlen (obuf); + + /* Override "invlpg". */ + strcpy (p - 6, "swapgs"); + codep++; + } + else + OP_E (bytemode, sizeflag); +} + +static void BadOp (void) { /* Throw away prefixes and 1st. opcode byte. */ |