[llvm-commits] [llvm] r141354 - in /llvm/trunk: lib/Target/X86/X86InstrSystem.td test/MC/Disassembler/X86/simple-tests.txt test/MC/Disassembler/X86/x86-32.txt
Craig Topper
craig.topper at gmail.com
Thu Oct 6 22:53:50 PDT 2011
Author: ctopper
Date: Fri Oct 7 00:53:50 2011
New Revision: 141354
URL: http://llvm.org/viewvc/llvm-project?rev=141354&view=rev
Log:
Add X86 disassembler support for XSAVE, XRSTOR, and XSAVEOPT.
Modified:
llvm/trunk/lib/Target/X86/X86InstrSystem.td
llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt
llvm/trunk/test/MC/Disassembler/X86/x86-32.txt
Modified: llvm/trunk/lib/Target/X86/X86InstrSystem.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSystem.td?rev=141354&r1=141353&r2=141354&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSystem.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSystem.td Fri Oct 7 00:53:50 2011
@@ -406,6 +406,21 @@
let Uses = [RDX, RAX, RCX] in
def XSETBV : I<0x01, MRM_D1, (outs), (ins), "xsetbv", []>, TB;
+let Uses = [RDX, RAX] in {
+ def XSAVE : I<0xAE, MRM4m, (outs opaque512mem:$dst), (ins),
+ "xsave\t$dst", []>, TB;
+ def XSAVE64 : I<0xAE, MRM4m, (outs opaque512mem:$dst), (ins),
+ "xsaveq\t$dst", []>, TB, REX_W, Requires<[In64BitMode]>;
+ def XRSTOR : I<0xAE, MRM5m, (outs), (ins opaque512mem:$dst),
+ "xrstor\t$dst", []>, TB;
+ def XRSTOR64 : I<0xAE, MRM5m, (outs), (ins opaque512mem:$dst),
+ "xrstorq\t$dst", []>, TB, REX_W, Requires<[In64BitMode]>;
+ def XSAVEOPT : I<0xAE, MRM6m, (outs opaque512mem:$dst), (ins),
+ "xsaveopt\t$dst", []>, TB;
+ def XSAVEOPT64 : I<0xAE, MRM6m, (outs opaque512mem:$dst), (ins),
+ "xsaveoptq\t$dst", []>, TB, REX_W, Requires<[In64BitMode]>;
+}
+
//===----------------------------------------------------------------------===//
// VIA PadLock crypto instructions
let Defs = [RAX, RDI], Uses = [RDX, RDI] in
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=141354&r1=141353&r2=141354&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt (original)
+++ llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt Fri Oct 7 00:53:50 2011
@@ -422,3 +422,12 @@
# CHECK: vaddss %xmm1, %xmm0, %xmm0
0xc5 0xfe 0x58 0xc1
+
+# CHECK: xsave (%rax)
+0x0f 0xae 0x20
+
+# CHECK: xrstor (%rax)
+0x0f 0xae 0x28
+
+# CHECK: xsaveopt (%rax)
+0x0f 0xae 0x30
Modified: llvm/trunk/test/MC/Disassembler/X86/x86-32.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/X86/x86-32.txt?rev=141354&r1=141353&r2=141354&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/X86/x86-32.txt (original)
+++ llvm/trunk/test/MC/Disassembler/X86/x86-32.txt Fri Oct 7 00:53:50 2011
@@ -432,3 +432,12 @@
# CHECK: vaddss %xmm1, %xmm0, %xmm0
0xc5 0xfe 0x58 0xc1
+
+# CHECK: xsave (%eax)
+0x0f 0xae 0x20
+
+# CHECK: xrstor (%eax)
+0x0f 0xae 0x28
+
+# CHECK: xsaveopt (%eax)
+0x0f 0xae 0x30
More information about the llvm-commits
mailing list