* 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.
This commit is contained in:
Jakub Jelinek 2004-03-12 10:47:49 +00:00
parent 0f10071e3d
commit 4fd61dcb07
4 changed files with 32 additions and 5 deletions

View 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.

View 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} },

View 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.

View 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)
{