llvm.org GIT mirror llvm / 1b526a9
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 Craig Topper 8 years ago
3 changed file(s) with 33 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
405405 let Uses = [RDX, RAX, RCX] in
406406 def XSETBV : I<0x01, MRM_D1, (outs), (ins), "xsetbv", []>, TB;
407407
408 let Uses = [RDX, RAX] in {
409 def XSAVE : I<0xAE, MRM4m, (outs opaque512mem:$dst), (ins),
410 "xsave\t$dst", []>, TB;
411 def XSAVE64 : I<0xAE, MRM4m, (outs opaque512mem:$dst), (ins),
412 "xsaveq\t$dst", []>, TB, REX_W, Requires<[In64BitMode]>;
413 def XRSTOR : I<0xAE, MRM5m, (outs), (ins opaque512mem:$dst),
414 "xrstor\t$dst", []>, TB;
415 def XRSTOR64 : I<0xAE, MRM5m, (outs), (ins opaque512mem:$dst),
416 "xrstorq\t$dst", []>, TB, REX_W, Requires<[In64BitMode]>;
417 def XSAVEOPT : I<0xAE, MRM6m, (outs opaque512mem:$dst), (ins),
418 "xsaveopt\t$dst", []>, TB;
419 def XSAVEOPT64 : I<0xAE, MRM6m, (outs opaque512mem:$dst), (ins),
420 "xsaveoptq\t$dst", []>, TB, REX_W, Requires<[In64BitMode]>;
421 }
422
408423 //===----------------------------------------------------------------------===//
409424 // VIA PadLock crypto instructions
410425 let Defs = [RAX, RDI], Uses = [RDX, RDI] in
421421
422422 # CHECK: vaddss %xmm1, %xmm0, %xmm0
423423 0xc5 0xfe 0x58 0xc1
424
425 # CHECK: xsave (%rax)
426 0x0f 0xae 0x20
427
428 # CHECK: xrstor (%rax)
429 0x0f 0xae 0x28
430
431 # CHECK: xsaveopt (%rax)
432 0x0f 0xae 0x30
431431
432432 # CHECK: vaddss %xmm1, %xmm0, %xmm0
433433 0xc5 0xfe 0x58 0xc1
434
435 # CHECK: xsave (%eax)
436 0x0f 0xae 0x20
437
438 # CHECK: xrstor (%eax)
439 0x0f 0xae 0x28
440
441 # CHECK: xsaveopt (%eax)
442 0x0f 0xae 0x30