Add encodings and mnemonics for FXSAVE64 and FXRSTOR64.
authorReid Kleckner <reid@kleckner.net>
Sat, 12 Feb 2011 23:24:13 +0000 (23:24 +0000)
committerReid Kleckner <reid@kleckner.net>
Sat, 12 Feb 2011 23:24:13 +0000 (23:24 +0000)
These are just FXSAVE and FXRSTOR with REX.W prefixes.  These versions use
64-bit pointer values instead of 32-bit pointer values in the memory map they
dump and restore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125446 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrFPStack.td
test/MC/X86/x86_64-encoding.s

index a4ab0eaded23ede586eb132e986822cc31185edb..b506f5e0b81ac0ba1a9fc78ebdc0292172881797 100644 (file)
@@ -625,8 +625,12 @@ def FCOMPP : I<0xD9, RawFrm, (outs), (ins), "fcompp", []>, DE;
 
 def FXSAVE : I<0xAE, MRM0m, (outs opaque512mem:$dst), (ins),
                "fxsave\t$dst", []>, TB;
+def FXSAVE64 : I<0xAE, MRM0m, (outs opaque512mem:$dst), (ins),
+                 "fxsaveq\t$dst", []>, TB, REX_W, Requires<[In64BitMode]>;
 def FXRSTOR : I<0xAE, MRM1m, (outs), (ins opaque512mem:$src),
                 "fxrstor\t$src", []>, TB;
+def FXRSTOR64 : I<0xAE, MRM1m, (outs), (ins opaque512mem:$src),
+                  "fxrstorq\t$src", []>, TB, REX_W, Requires<[In64BitMode]>;
 
 //===----------------------------------------------------------------------===//
 // Non-Instruction Patterns
index f45b0a23d5e81b8ad8d37769faf9f799cec67f38..c071a1b765e8bac90f23ea97b65caa326cefeb64 100644 (file)
@@ -140,3 +140,11 @@ pshufb     CPI1_0(%rip), %xmm1
 // CHECK: encoding: [0x48,0x8b,0x04,0xe1]
           movq  (%rcx,%riz,8), %rax
 
+// CHECK: fxsaveq (%rax)
+// CHECK: encoding: [0x48,0x0f,0xae,0x00]
+          fxsaveq (%rax)
+
+// CHECK: fxrstorq (%rax)
+// CHECK: encoding: [0x48,0x0f,0xae,0x08]
+          fxrstorq (%rax)
+