aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-04-01 16:03:40 +0000
committerJan Beulich <jbeulich@novell.com>2005-04-01 16:03:40 +0000
commit373ff435a8f7f34725507ede084998d63d80d624 (patch)
treec704104e79777246704f69584276df37fc10edda
parenta7d61044b2f3e1562c1fc94cb9139eb156273c9c (diff)
downloadgdb-373ff435a8f7f34725507ede084998d63d80d624.zip
gdb-373ff435a8f7f34725507ede084998d63d80d624.tar.gz
gdb-373ff435a8f7f34725507ede084998d63d80d624.tar.bz2
include/opcode/
2005-04-01 Jan Beulich <jbeulich@novell.com> * i386.h (i386_optab): Add rdtscp. opcodes/ 2005-04-01 Jan Beulich <jbeulich@novell.com> * i386-dis.c (INVLPG_Fixup): Decode rdtscp; change code to allow for easier future additions.
-rw-r--r--include/opcode/ChangeLog4
-rw-r--r--include/opcode/i386.h1
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/i386-dis.c23
4 files changed, 25 insertions, 8 deletions
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index fb5d252..2d90e17 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,7 @@
+2005-04-01 Jan Beulich <jbeulich@novell.com>
+
+ * i386.h (i386_optab): Add rdtscp.
+
2005-03-29 H.J. Lu <hongjiu.lu@intel.com>
* i386.h (i386_optab): Don't allow the `l' suffix for moving
diff --git a/include/opcode/i386.h b/include/opcode/i386.h
index 4de2771..ca80d0a 100644
--- a/include/opcode/i386.h
+++ b/include/opcode/i386.h
@@ -1375,6 +1375,7 @@ static const template i386_optab[] =
{"syscall", 0, 0x0f05, X, CpuK6, NoSuf, { 0, 0, 0} },
{"sysret", 0, 0x0f07, X, CpuK6, lq_Suf|DefaultSize, { 0, 0, 0} },
{"swapgs", 0, 0x0f01, 0xf8, Cpu64, NoSuf|ImmExt, { 0, 0, 0} },
+{"rdtscp", 0, 0x0f01, 0xf9, CpuSledgehammer,NoSuf|ImmExt, { 0, 0, 0} },
/* VIA PadLock extensions. */
{"xstorerng", 0, 0x000fa7c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index bf5ae35..b1ea875 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-01 Jan Beulich <jbeulich@novell.com>
+
+ * i386-dis.c (INVLPG_Fixup): Decode rdtscp; change code to allow for
+ easier future additions.
+
2005-03-31 Jerome Guitton <guitton@gnat.com>
* configure.in: Check for basename.
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