mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-05 17:39:16 +00:00
implement proper support for sysret{,l,q}, rdar://8403907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113350 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ba8cea450f
commit
ba8e81cca2
@ -628,6 +628,7 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
|
||||
.Case("repz", "rep")
|
||||
.Case("repnz", "repne")
|
||||
.Case("iret", "iretl")
|
||||
.Case("sysret", "sysretl")
|
||||
.Case("push", Is64Bit ? "pushq" : "pushl")
|
||||
.Case("pushf", Is64Bit ? "pushfq" : "pushfl")
|
||||
.Case("popf", Is64Bit ? "popfq" : "popfl")
|
||||
|
@ -120,6 +120,10 @@ def ADJCALLSTACKUP64 : I<0, Pseudo, (outs), (ins i32imm:$amt1, i32imm:$amt2),
|
||||
def IRET64 : RI<0xcf, RawFrm, (outs), (ins), "iretq", []>,
|
||||
Requires<[In64BitMode]>;
|
||||
|
||||
def SYSRETQ : RI<0x07, RawFrm,
|
||||
(outs), (ins), "sysretq", []>, TB, Requires<[In64BitMode]>;
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Call Instructions...
|
||||
//
|
||||
|
@ -971,8 +971,8 @@ def TRAP : I<0x0B, RawFrm, (outs), (ins), "ud2", [(trap)]>, TB;
|
||||
|
||||
def SYSCALL : I<0x05, RawFrm,
|
||||
(outs), (ins), "syscall", []>, TB;
|
||||
def SYSRET : I<0x07, RawFrm,
|
||||
(outs), (ins), "sysret", []>, TB;
|
||||
def SYSRETL : I<0x07, RawFrm,
|
||||
(outs), (ins), "sysretl", []>, TB;
|
||||
def SYSENTER : I<0x34, RawFrm,
|
||||
(outs), (ins), "sysenter", []>, TB;
|
||||
def SYSEXIT : I<0x35, RawFrm,
|
||||
|
@ -444,3 +444,11 @@ iretw
|
||||
iretl
|
||||
// CHECK: iretl
|
||||
// CHECK: encoding: [0xcf]
|
||||
|
||||
// rdar://8403907
|
||||
sysret
|
||||
// CHECK: sysretl
|
||||
// CHECK: encoding: [0x0f,0x07]
|
||||
sysretl
|
||||
// CHECK: sysretl
|
||||
// CHECK: encoding: [0x0f,0x07]
|
||||
|
@ -201,4 +201,13 @@ iretq
|
||||
// CHECK: iretq
|
||||
// CHECK: encoding: [0x48,0xcf]
|
||||
|
||||
|
||||
// rdar://8403907
|
||||
sysret
|
||||
// CHECK: sysretl
|
||||
// CHECK: encoding: [0x0f,0x07]
|
||||
sysretl
|
||||
// CHECK: sysretl
|
||||
// CHECK: encoding: [0x0f,0x07]
|
||||
sysretq
|
||||
// CHECK: sysretq
|
||||
// CHECK: encoding: [0x48,0x0f,0x07]
|
||||
|
Loading…
x
Reference in New Issue
Block a user