From: Craig Topper Date: Tue, 3 Feb 2015 11:03:57 +0000 (+0000) Subject: [X86] Make fxsave64/fxrstor64/xsave64/xsrstor64/xsaveopt64 parseable in AT&T syntax... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b4499a393ac29334a0897338bb33bee9f78cd00;p=platform%2Fupstream%2Fllvm.git [X86] Make fxsave64/fxrstor64/xsave64/xsrstor64/xsaveopt64 parseable in AT&T syntax. Also make them the default output. llvm-svn: 227963 --- diff --git a/llvm/lib/Target/X86/X86InstrFPStack.td b/llvm/lib/Target/X86/X86InstrFPStack.td index e1abf26..6cd5e79 100644 --- a/llvm/lib/Target/X86/X86InstrFPStack.td +++ b/llvm/lib/Target/X86/X86InstrFPStack.td @@ -636,12 +636,12 @@ def FCOMPP : I<0xDE, MRM_D9, (outs), (ins), "fcompp", [], IIC_FCOMPP>; def FXSAVE : I<0xAE, MRM0m, (outs opaque512mem:$dst), (ins), "fxsave\t$dst", [], IIC_FXSAVE>, TB; def FXSAVE64 : RI<0xAE, MRM0m, (outs opaque512mem:$dst), (ins), - "fxsave{q|64}\t$dst", [], IIC_FXSAVE>, TB, + "fxsave64\t$dst", [], IIC_FXSAVE>, TB, Requires<[In64BitMode]>; def FXRSTOR : I<0xAE, MRM1m, (outs), (ins opaque512mem:$src), "fxrstor\t$src", [], IIC_FXRSTOR>, TB; def FXRSTOR64 : RI<0xAE, MRM1m, (outs), (ins opaque512mem:$src), - "fxrstor{q|64}\t$src", [], IIC_FXRSTOR>, TB, + "fxrstor64\t$src", [], IIC_FXRSTOR>, TB, Requires<[In64BitMode]>; } // SchedRW diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td index e850ebd..7d5104d 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.td +++ b/llvm/lib/Target/X86/X86InstrInfo.td @@ -2564,6 +2564,12 @@ def : MnemonicAlias<"fnstsww", "fnstsw", "att">; def : MnemonicAlias<"fucomip", "fucompi", "att">; def : MnemonicAlias<"fwait", "wait">; +def : MnemonicAlias<"fxsaveq", "fxsave64", "att">; +def : MnemonicAlias<"fxrstorq", "fxrstor64", "att">; +def : MnemonicAlias<"xsaveq", "xsave64", "att">; +def : MnemonicAlias<"xrstorq", "xrstor64", "att">; +def : MnemonicAlias<"xsaveoptq", "xsaveopt64", "att">; + class CondCodeAlias diff --git a/llvm/lib/Target/X86/X86InstrSystem.td b/llvm/lib/Target/X86/X86InstrSystem.td index 07837bda..b1bcd63 100644 --- a/llvm/lib/Target/X86/X86InstrSystem.td +++ b/llvm/lib/Target/X86/X86InstrSystem.td @@ -486,15 +486,15 @@ let Uses = [RDX, RAX] in { def XSAVE : I<0xAE, MRM4m, (outs opaque512mem:$dst), (ins), "xsave\t$dst", []>, TB; def XSAVE64 : RI<0xAE, MRM4m, (outs opaque512mem:$dst), (ins), - "xsave{q|64}\t$dst", []>, TB, Requires<[In64BitMode]>; + "xsave64\t$dst", []>, TB, Requires<[In64BitMode]>; def XRSTOR : I<0xAE, MRM5m, (outs), (ins opaque512mem:$dst), "xrstor\t$dst", []>, TB; def XRSTOR64 : RI<0xAE, MRM5m, (outs), (ins opaque512mem:$dst), - "xrstor{q|64}\t$dst", []>, TB, Requires<[In64BitMode]>; + "xrstor64\t$dst", []>, TB, Requires<[In64BitMode]>; def XSAVEOPT : I<0xAE, MRM6m, (outs opaque512mem:$dst), (ins), "xsaveopt\t$dst", []>, TB; def XSAVEOPT64 : RI<0xAE, MRM6m, (outs opaque512mem:$dst), (ins), - "xsaveopt{q|64}\t$dst", []>, TB, Requires<[In64BitMode]>; + "xsaveopt64\t$dst", []>, TB, Requires<[In64BitMode]>; } } // SchedRW diff --git a/llvm/test/MC/Disassembler/X86/x86-64.txt b/llvm/test/MC/Disassembler/X86/x86-64.txt index e67a4f9..a2a179e 100644 --- a/llvm/test/MC/Disassembler/X86/x86-64.txt +++ b/llvm/test/MC/Disassembler/X86/x86-64.txt @@ -116,13 +116,13 @@ # CHECK: xabort $13 0xc6 0xf8 0x0d -# CHECK: xsaveq (%rax) +# CHECK: xsave64 (%rax) 0x48 0x0f 0xae 0x20 -# CHECK: xrstorq (%rax) +# CHECK: xrstor64 (%rax) 0x48 0x0f 0xae 0x28 -# CHECK: xsaveoptq (%rax) +# CHECK: xsaveopt64 (%rax) 0x48 0x0f 0xae 0x30 # CHECK: clac diff --git a/llvm/test/MC/X86/intel-syntax.s b/llvm/test/MC/X86/intel-syntax.s index c027aa4..fce0c65 100644 --- a/llvm/test/MC/X86/intel-syntax.s +++ b/llvm/test/MC/X86/intel-syntax.s @@ -586,8 +586,8 @@ fdiv ST(1) fdivr ST(1) -// CHECK: fxsaveq (%rax) -// CHECK: fxrstorq (%rax) +// CHECK: fxsave64 (%rax) +// CHECK: fxrstor64 (%rax) fxsave64 opaque ptr [rax] fxrstor64 opaque ptr [rax] diff --git a/llvm/test/MC/X86/x86_64-encoding.s b/llvm/test/MC/X86/x86_64-encoding.s index 40b93f0..62af1bd 100644 --- a/llvm/test/MC/X86/x86_64-encoding.s +++ b/llvm/test/MC/X86/x86_64-encoding.s @@ -200,14 +200,22 @@ sha256msg2 (%rax), %xmm2 // CHECK: encoding: [0x48,0x8b,0x04,0xe1] movq (%rcx,%riz,8), %rax -// CHECK: fxsaveq (%rax) +// CHECK: fxsave64 (%rax) // CHECK: encoding: [0x48,0x0f,0xae,0x00] fxsaveq (%rax) -// CHECK: fxrstorq (%rax) +// CHECK: fxsave64 (%rax) +// CHECK: encoding: [0x48,0x0f,0xae,0x00] + fxsave64 (%rax) + +// CHECK: fxrstor64 (%rax) // CHECK: encoding: [0x48,0x0f,0xae,0x08] fxrstorq (%rax) +// CHECK: fxrstor64 (%rax) +// CHECK: encoding: [0x48,0x0f,0xae,0x08] + fxrstor64 (%rax) + // CHECK: leave // CHECK: encoding: [0xc9] leave