OSDN Git Service

[X86] Make 64-bit sysret/sysexit not ambiguous in Intel assembly syntax.
authorCraig Topper <craig.topper@intel.com>
Sun, 29 Apr 2018 22:55:54 +0000 (22:55 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 29 Apr 2018 22:55:54 +0000 (22:55 +0000)
This also makes it default to the 32-bit non REX.W version in 64-bit mode. This seems to be more consistent with gas.

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

lib/Target/X86/X86InstrSystem.td
test/MC/X86/intel-syntax.s

index 514a30c..245afa5 100644 (file)
@@ -49,13 +49,13 @@ def INT : Ii8<0xcd, RawFrm, (outs), (ins u8imm:$trap), "int\t$trap",
 
 def SYSCALL  : I<0x05, RawFrm, (outs), (ins), "syscall", []>, TB;
 def SYSRET   : I<0x07, RawFrm, (outs), (ins), "sysret{l}", []>, TB;
-def SYSRET64 :RI<0x07, RawFrm, (outs), (ins), "sysret{q}", []>, TB,
+def SYSRET64 :RI<0x07, RawFrm, (outs), (ins), "sysretq", []>, TB,
                Requires<[In64BitMode]>;
 
 def SYSENTER : I<0x34, RawFrm, (outs), (ins), "sysenter", []>, TB;
 
 def SYSEXIT   : I<0x35, RawFrm, (outs), (ins), "sysexit{l}", []>, TB;
-def SYSEXIT64 :RI<0x35, RawFrm, (outs), (ins), "sysexit{q}", []>, TB,
+def SYSEXIT64 :RI<0x35, RawFrm, (outs), (ins), "sysexitq", []>, TB,
                   Requires<[In64BitMode]>;
 } // SchedRW
 
index 5949340..da2f5f9 100644 (file)
@@ -883,3 +883,12 @@ lsl ebx, word ptr [eax]
 
 // CHECK: lslw (%eax), %bx
 lsl bx, word ptr [eax]
+
+// CHECK: sysexitl
+sysexit
+// CHECK: sysexitq
+sysexitq
+// CHECK: sysretl
+sysret
+// CHECK: sysretq
+sysretq