Mark X86::RET and RETI instructions as variadic.

There is special magic happening when returning floating point values on
the x87 stack. The RET instructions get extra f80 operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162592 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2012-08-24 20:52:44 +00:00
parent baa74e4b35
commit 9511a460d8

View File

@ -16,15 +16,18 @@
// //
// Return instructions. // Return instructions.
//
// The X86retflag return instructions are variadic because we may add ST0 and
// ST1 arguments when returning values on the x87 stack.
let isTerminator = 1, isReturn = 1, isBarrier = 1, let isTerminator = 1, isReturn = 1, isBarrier = 1,
hasCtrlDep = 1, FPForm = SpecialFP in { hasCtrlDep = 1, FPForm = SpecialFP in {
def RET : I <0xC3, RawFrm, (outs), (ins), def RET : I <0xC3, RawFrm, (outs), (ins variable_ops),
"ret", "ret",
[(X86retflag 0)], IIC_RET>; [(X86retflag 0)], IIC_RET>;
def RETW : I <0xC3, RawFrm, (outs), (ins), def RETW : I <0xC3, RawFrm, (outs), (ins),
"ret{w}", "ret{w}",
[], IIC_RET>, OpSize; [], IIC_RET>, OpSize;
def RETI : Ii16<0xC2, RawFrm, (outs), (ins i16imm:$amt), def RETI : Ii16<0xC2, RawFrm, (outs), (ins i16imm:$amt, variable_ops),
"ret\t$amt", "ret\t$amt",
[(X86retflag timm:$amt)], IIC_RET_IMM>; [(X86retflag timm:$amt)], IIC_RET_IMM>;
def RETIW : Ii16<0xC2, RawFrm, (outs), (ins i16imm:$amt), def RETIW : Ii16<0xC2, RawFrm, (outs), (ins i16imm:$amt),