aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-dis.c
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r--opcodes/i386-dis.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index a2a5a06..d48e6de 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -4394,16 +4394,23 @@ PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
static void
INVLPG_Fixup (int bytemode, int sizeflag)
{
- if (*codep == 0xf8)
- {
- char *p = obuf + strlen (obuf);
+ const char *alt;
- /* Override "invlpg". */
- strcpy (p - 6, "swapgs");
- codep++;
+ switch (*codep)
+ {
+ case 0xf8:
+ alt = "swapgs";
+ break;
+ case 0xf9:
+ alt = "rdtscp";
+ break;
+ default:
+ OP_E (bytemode, sizeflag);
+ return;
}
- else
- OP_E (bytemode, sizeflag);
+ /* Override "invlpg". */
+ strcpy (obuf + strlen (obuf) - 6, alt);
+ codep++;
}
static void