* i386-dis.c (grps): Use INVLPG_Fixup instead of OP_E for invlpg.
authorJakub Jelinek <jakub@redhat.com>
Fri, 12 Mar 2004 10:47:49 +0000 (10:47 +0000)
committerJakub Jelinek <jakub@redhat.com>
Fri, 12 Mar 2004 10:47:49 +0000 (10:47 +0000)
(INVLPG_Fixup): New function.
(PNI_Fixup): Remove ATTRIBUTE_UNUSED from sizeflag.

* opcode/i386.h (i386_optab): Remove CpuNo64 from sysenter and
sysexit.

include/ChangeLog
include/opcode/i386.h
opcodes/ChangeLog
opcodes/i386-dis.c

index 37c6cfdadf1bf2c6af137984e570436326cdab97..5e1809d6360f4dfac68f776c921e0b11c67d0ec5 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-12  Jakub Jelinek  <jakub@redhat.com>
+
+       * opcode/i386.h (i386_optab): Remove CpuNo64 from sysenter and
+       sysexit.
+
 2004-02-24  Ian Lance Taylor  <ian@wasabisystems.com>
 
        * dyn-string.h: Update copyright date.
index 27ed76d0b7e2e7650d4f6d03fb462540262d7a49..ac59e8a49c18aba0ef888a9ac2025422ac5ea8b9 100644 (file)
@@ -1,6 +1,6 @@
 /* opcode/i386.h -- Intel 80386 opcode table
    Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001
+   2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
 This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
@@ -896,8 +896,8 @@ static const template i386_optab[] = {
 {"cmpxchg8b",1,0x0fc7, 1, Cpu586, NoSuf|Modrm,         { LLongMem, 0, 0} },
 
 /* Pentium II/Pentium Pro extensions.  */
-{"sysenter",0, 0x0f34, X, Cpu686|CpuNo64, NoSuf,       { 0, 0, 0} },
-{"sysexit", 0, 0x0f35, X, Cpu686|CpuNo64, NoSuf,       { 0, 0, 0} },
+{"sysenter",0, 0x0f34, X, Cpu686, NoSuf,               { 0, 0, 0} },
+{"sysexit", 0, 0x0f35, X, Cpu686, NoSuf,               { 0, 0, 0} },
 {"fxsave",  1, 0x0fae, 0, Cpu686, FP|Modrm,            { LLongMem, 0, 0} },
 {"fxrstor", 1, 0x0fae, 1, Cpu686, FP|Modrm,            { LLongMem, 0, 0} },
 {"rdpmc",   0, 0x0f33, X, Cpu686, NoSuf,               { 0, 0, 0} },
index f57672433d316616d5ba65a5edccb40ae9453924..06e5556631bae68b070d7515a354dea51e913826 100644 (file)
@@ -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.
index ea41d2fbe5976fe499f809d2f64c8f2901382c76..3be6e19d359c2a8070a06293619b7de078b7ce1e 100644 (file)
@@ -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)
     {
@@ -4165,6 +4166,21 @@ PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
     OP_E (0, sizeflag);
 }
 
+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)
 {
This page took 0.051186 seconds and 4 git commands to generate.