This patch adds support for process recording of the instruction rdtscp in
x86 architecture.
Debugging applications with "record full" fail to record with the error
message "Process record does not support instruction 0xf01f9".
Approved-by: Guinevere Larsen <blarsen@redhat.com>
goto no_support;
break;
+ case 0x0f01f9: /* rdtscp */
+ I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_RECX_REGNUM);
+ [[fallthrough]];
case 0x0f31: /* rdtsc */
I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_REAX_REGNUM);
I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_REDX_REGNUM);
case 0x0f01:
if (i386_record_modrm (&ir))
return -1;
+ if (ir.modrm == 0xf9)
+ {
+ opcode = (opcode << 8) | 0xf9;
+ goto reswitch;
+ }
switch (ir.reg)
{
case 0: /* sgdt */
#endif
}
+/* Test rdtscp support. */
+
+void
+rdtscp (void)
+{
+#ifdef __x86_64__
+ __asm__ volatile ("rdtscp");
+#endif
+}
+
/* Initialize arch-specific bits. */
static void
static testcase_ftype testcases[] =
{
rdrand,
- rdseed
+ rdseed,
+ rdtscp
};