[llvm-commits] [llvm] r141358 - in /llvm/trunk: lib/Target/X86/X86InstrSystem.td test/MC/Disassembler/X86/simple-tests.txt
Craig Topper
craig.topper at gmail.com
Fri Oct 7 00:02:24 PDT 2011
Author: ctopper
Date: Fri Oct 7 02:02:24 2011
New Revision: 141358
URL: http://llvm.org/viewvc/llvm-project?rev=141358&view=rev
Log:
Add X86 disassembler support for RDFSBASE, RDGSBASE, WRFSBASE, and WRGSBASE.
Modified:
llvm/trunk/lib/Target/X86/X86InstrSystem.td
llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt
Modified: llvm/trunk/lib/Target/X86/X86InstrSystem.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSystem.td?rev=141358&r1=141357&r2=141358&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSystem.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSystem.td Fri Oct 7 02:02:24 2011
@@ -400,6 +400,8 @@
def INVD : I<0x08, RawFrm, (outs), (ins), "invd", []>, TB;
def WBINVD : I<0x09, RawFrm, (outs), (ins), "wbinvd", []>, TB;
+//===----------------------------------------------------------------------===//
+// XSAVE instructions
let Defs = [RDX, RAX], Uses = [RCX] in
def XGETBV : I<0x01, MRM_D0, (outs), (ins), "xgetbv", []>, TB;
@@ -442,3 +444,24 @@
}
let Defs = [RAX, RDX, RSI], Uses = [RAX, RSI] in
def MONTMUL : I<0xc0, RawFrm, (outs), (ins), "montmul", []>, A6;
+
+//===----------------------------------------------------------------------===//
+// FS/GS Base Instructions
+let Predicates = [In64BitMode] in {
+ def RDFSBASE : I<0xAE, MRM0r, (outs GR32:$dst), (ins),
+ "rdfsbase{l}\t$dst", []>, TB, XS;
+ def RDFSBASE64 : RI<0xAE, MRM0r, (outs GR64:$dst), (ins),
+ "rdfsbase{q}\t$dst", []>, TB, XS;
+ def RDGSBASE : I<0xAE, MRM1r, (outs GR32:$dst), (ins),
+ "rdgsbase{l}\t$dst", []>, TB, XS;
+ def RDGSBASE64 : RI<0xAE, MRM1r, (outs GR64:$dst), (ins),
+ "rdgsbase{q}\t$dst", []>, TB, XS;
+ def WRFSBASE : I<0xAE, MRM2r, (outs), (ins GR32:$dst),
+ "wrfsbase{l}\t$dst", []>, TB, XS;
+ def WRFSBASE64 : RI<0xAE, MRM2r, (outs), (ins GR64:$dst),
+ "wrfsbase{q}\t$dst", []>, TB, XS;
+ def WRGSBASE : I<0xAE, MRM3r, (outs), (ins GR32:$dst),
+ "wrgsbase{l}\t$dst", []>, TB, XS;
+ def WRGSBASE64 : RI<0xAE, MRM3r, (outs), (ins GR64:$dst),
+ "wrgsbase{q}\t$dst", []>, TB, XS;
+}
Modified: llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt?rev=141358&r1=141357&r2=141358&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt (original)
+++ llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt Fri Oct 7 02:02:24 2011
@@ -431,3 +431,27 @@
# CHECK: xsaveopt (%rax)
0x0f 0xae 0x30
+
+# CHECK rdfsbasel %eax
+0xf3 0x0f 0xae 0xc0
+
+# CHECK rdgsbasel %eax
+0xf3 0x0f 0xae 0xc8
+
+# CHECK wrfsbasel %eax
+0xf3 0x0f 0xae 0xd0
+
+# CHECK wrgsbasel %eax
+0xf3 0x0f 0xae 0xd8
+
+# CHECK rdfsbaseq %rax
+0xf3 0x48 0x0f 0xae 0xc0
+
+# CHECK rdgsbaseq %rax
+0xf3 0x48 0x0f 0xae 0xc8
+
+# CHECK wrfsbaseq %rax
+0xf3 0x48 0x0f 0xae 0xd0
+
+# CHECK wrgsbaseq %rax
+0xf3 0x48 0x0f 0xae 0xd8
More information about the llvm-commits
mailing list