summaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-03-12 10:47:49 +0000
committerJakub Jelinek <jakub@redhat.com>2004-03-12 10:47:49 +0000
commita6f14671bb50a4e9581f733e3994c4a2685093ad (patch)
tree6837692699d1b36cc57bdf3e26c71bf2693e1062 /opcodes
parent2c143ace92f4161046247c0fa9dacfa72f226cbb (diff)
downloadgdb-a6f14671bb50a4e9581f733e3994c4a2685093ad.tar.gz
* 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')
-rw-r--r--opcodes/ChangeLog6
-rw-r--r--opcodes/i386-dis.c20
2 files changed, 24 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index f57672433d3..06e5556631b 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-12 Jakub Jelinek <jakub@redhat.com>
+
+ * i386-dis.c (grps): Use INVLPG_Fixup instead of OP_E for invlpg.
+ (INVLPG_Fixup): New function.
+ (PNI_Fixup): Remove ATTRIBUTE_UNUSED from sizeflag.
+
2004-03-12 Michal Ludvig <mludvig@suse.cz>
* i386-dis.c (PADLOCK_SPECIAL, PADLOCK_0): New defines.
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index ea41d2fbe59..3be6e19d359 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. */