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

Fix disasm of iret, sysexit, and sysret when displayed with Intel syntax.

Patch by Kay Tiong Khoo!

llvm-svn: 152487
This commit is contained in:
Bill Wendling 2012-03-10 07:37:27 +00:00
parent 1e68fbcdae
commit 1a3f2619a7
2 changed files with 27 additions and 5 deletions

View File

@ -45,17 +45,17 @@ def INT : Ii8<0xcd, RawFrm, (outs), (ins i8imm:$trap), "int\t$trap",
def SYSCALL : I<0x05, RawFrm, (outs), (ins), "syscall", []>, TB;
def SYSRETL : I<0x07, RawFrm, (outs), (ins), "sysretl", []>, TB;
def SYSRETQ :RI<0x07, RawFrm, (outs), (ins), "sysretq", []>, TB,
def SYSRET : I<0x07, RawFrm, (outs), (ins), "sysret{l}", []>, TB;
def SYSRET64 :RI<0x07, RawFrm, (outs), (ins), "sysret{q}", []>, TB,
Requires<[In64BitMode]>;
def SYSENTER : I<0x34, RawFrm, (outs), (ins), "sysenter", []>, TB;
def SYSEXIT : I<0x35, RawFrm, (outs), (ins), "sysexitl", []>, TB;
def SYSEXIT64 :RI<0x35, RawFrm, (outs), (ins), "sysexitq", []>, TB,
def SYSEXIT : I<0x35, RawFrm, (outs), (ins), "sysexit{l}", []>, TB;
def SYSEXIT64 :RI<0x35, RawFrm, (outs), (ins), "sysexit{q}", []>, TB,
Requires<[In64BitMode]>;
def IRET16 : I<0xcf, RawFrm, (outs), (ins), "iretw", []>, OpSize;
def IRET16 : I<0xcf, RawFrm, (outs), (ins), "iret{w}", []>, OpSize;
def IRET32 : I<0xcf, RawFrm, (outs), (ins), "iret{l|d}", []>;
def IRET64 : RI<0xcf, RawFrm, (outs), (ins), "iretq", []>,
Requires<[In64BitMode]>;

View File

@ -77,3 +77,25 @@
# CHECK: test RAX, 0
0x48 0xa9 0x00 0x00 0x00 0x00
# CHECK: sysret
0x48 0x0f 0x07
# CHECK: sysret
0x0f 0x07
# CHECK: sysexit
0x48 0x0f 0x35
# CHECK: sysexit
0x0f 0x35
# CHECK: iret
0x66 0xcf
# CHECK: iretd
0xcf
# CHECK: iretq
0x48 0xcf