Add X86 disassembler support for XSAVE, XRSTOR, and XSAVEOPT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2011-10-07 05:53:50 +00:00
parent 25f6dfd108
commit 1b526a98e3
3 changed files with 33 additions and 0 deletions

View File

@ -406,6 +406,21 @@ let Defs = [RDX, RAX], Uses = [RCX] in
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

View File

@ -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

View File

@ -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