1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[X86] Make 64-bit sysret/sysexit not ambiguous in Intel assembly syntax.

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.

llvm-svn: 331149
This commit is contained in:
Craig Topper 2018-04-29 22:55:54 +00:00
parent 93ea255229
commit f9821e57da
2 changed files with 11 additions and 2 deletions

View 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

View 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