diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-09-08 05:38:31 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-09-08 05:38:31 +0000 |
| commit | 063363fa8016ec53f219f970061c3019e786206a (patch) | |
| tree | ba0676967c67548460dc0472e562acc53b37a7b8 /llvm/lib | |
| parent | 086a83afb1e238bd42c98fe8e21b536ce57b1ea8 (diff) | |
| download | bcm5719-llvm-063363fa8016ec53f219f970061c3019e786206a.tar.gz bcm5719-llvm-063363fa8016ec53f219f970061c3019e786206a.zip | |
implement the iret suite of instructions properly,
fixing rdar://8403974
llvm-svn: 113349
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp | 1 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86Instr64bit.td | 3 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.td | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp index 1b5dccf8e9c..484ffce8c6d 100644 --- a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -627,6 +627,7 @@ ParseInstruction(StringRef Name, SMLoc NameLoc, .Case("repe", "rep") .Case("repz", "rep") .Case("repnz", "repne") + .Case("iret", "iretl") .Case("push", Is64Bit ? "pushq" : "pushl") .Case("pushf", Is64Bit ? "pushfq" : "pushfl") .Case("popf", Is64Bit ? "popfq" : "popfl") diff --git a/llvm/lib/Target/X86/X86Instr64bit.td b/llvm/lib/Target/X86/X86Instr64bit.td index 0884b61425e..5f6c68bf882 100644 --- a/llvm/lib/Target/X86/X86Instr64bit.td +++ b/llvm/lib/Target/X86/X86Instr64bit.td @@ -117,7 +117,8 @@ def ADJCALLSTACKUP64 : I<0, Pseudo, (outs), (ins i32imm:$amt1, i32imm:$amt2), } // Interrupt Instructions -def IRET64 : RI<0xcf, RawFrm, (outs), (ins), "iret{q}", []>; +def IRET64 : RI<0xcf, RawFrm, (outs), (ins), "iretq", []>, + Requires<[In64BitMode]>; //===----------------------------------------------------------------------===// // Call Instructions... diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td index 58a7e2464c5..f50132b2170 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.td +++ b/llvm/lib/Target/X86/X86InstrInfo.td @@ -601,8 +601,8 @@ def INT3 : I<0xcc, RawFrm, (outs), (ins), "int3", [(int_x86_int (i8 3))]>; def INT : Ii8<0xcd, RawFrm, (outs), (ins i8imm:$trap), "int\t$trap", [(int_x86_int imm:$trap)]>; -def IRET16 : I<0xcf, RawFrm, (outs), (ins), "iret{w}", []>, OpSize; -def IRET32 : I<0xcf, RawFrm, (outs), (ins), "iret{l}", []>; +def IRET16 : I<0xcf, RawFrm, (outs), (ins), "iretw", []>, OpSize; +def IRET32 : I<0xcf, RawFrm, (outs), (ins), "iret{l|d}", []>; // PIC base construction. This expands to code that looks like this: // call $next_inst |

