aboutsummaryrefslogtreecommitdiff
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
commit4fd61dcb07594dc4535a0af7129b1e2eb5e9d458 (patch)
treecfed403bbc8ccc7d2eb0c4040b01e6a1c3df7464
parent0f10071e3dbfb84b625c8609615bdd0d7b66ec3e (diff)
downloadgdb-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.
-rw-r--r--include/ChangeLog5
-rw-r--r--include/opcode/i386.h6
-rw-r--r--opcodes/ChangeLog6
-rw-r--r--opcodes/i386-dis.c20
4 files changed, 32 insertions, 5 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 37c6cfd..5e1809d 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -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.
diff --git a/include/opcode/i386.h b/include/opcode/i386.h
index 27ed76d..ac59e8a 100644
--- a/include/opcode/i386.h
+++ b/include/opcode/i386.h
@@ -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} },
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index f576724..06e5556 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 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. */