diff options
author | Chris Lattner <sabre@nondot.org> | 2008-10-11 22:08:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-10-11 22:08:30 +0000 |
commit | 2753955fc09ad41546dc2ff4623a90433e92428d (patch) | |
tree | a81820c5d59819c84907a4f77333594a177d354e /llvm/lib/Target/Sparc | |
parent | d57b7603f951cc6510caadfb67697902476b26ea (diff) | |
download | bcm5719-llvm-2753955fc09ad41546dc2ff4623a90433e92428d.tar.gz bcm5719-llvm-2753955fc09ad41546dc2ff4623a90433e92428d.zip |
Change CALLSEQ_BEGIN and CALLSEQ_END to take TargetConstant's as
parameters instead of raw Constants. This prevents the constants from
being selected by the isel pass, fixing PR2735.
llvm-svn: 57385
Diffstat (limited to 'llvm/lib/Target/Sparc')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcISelLowering.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/Target/Sparc/SparcInstrInfo.td | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Target/Sparc/SparcISelLowering.cpp b/llvm/lib/Target/Sparc/SparcISelLowering.cpp index ae0e24440ed..dc354248042 100644 --- a/llvm/lib/Target/Sparc/SparcISelLowering.cpp +++ b/llvm/lib/Target/Sparc/SparcISelLowering.cpp @@ -270,7 +270,7 @@ static SDValue LowerCALL(SDValue Op, SelectionDAG &DAG) { // Keep stack frames 8-byte aligned. ArgsSize = (ArgsSize+7) & ~7; - Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(ArgsSize)); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(ArgsSize, true)); SmallVector<std::pair<unsigned, SDValue>, 8> RegsToPass; SmallVector<SDValue, 8> MemOpChains; @@ -421,9 +421,8 @@ static SDValue LowerCALL(SDValue Op, SelectionDAG &DAG) { Chain = DAG.getNode(SPISD::CALL, NodeTys, Ops, InFlag.getNode() ? 3 : 2); InFlag = Chain.getValue(1); - Chain = DAG.getCALLSEQ_END(Chain, - DAG.getConstant(ArgsSize, MVT::i32), - DAG.getConstant(0, MVT::i32), InFlag); + Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(ArgsSize, true), + DAG.getIntPtrConstant(0, true), InFlag); InFlag = Chain.getValue(1); // Assign locations to each value returned by this call. diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.td b/llvm/lib/Target/Sparc/SparcInstrInfo.td index 94d085988ec..2d6c9209e6a 100644 --- a/llvm/lib/Target/Sparc/SparcInstrInfo.td +++ b/llvm/lib/Target/Sparc/SparcInstrInfo.td @@ -210,10 +210,10 @@ class Pseudo<dag outs, dag ins, string asmstr, list<dag> pattern> let Defs = [O6], Uses = [O6] in { def ADJCALLSTACKDOWN : Pseudo<(outs), (ins i32imm:$amt), "!ADJCALLSTACKDOWN $amt", - [(callseq_start imm:$amt)]>; + [(callseq_start timm:$amt)]>; def ADJCALLSTACKUP : Pseudo<(outs), (ins i32imm:$amt1, i32imm:$amt2), "!ADJCALLSTACKUP $amt1", - [(callseq_end imm:$amt1, imm:$amt2)]>; + [(callseq_end timm:$amt1, timm:$amt2)]>; } // FpMOVD/FpNEGD/FpABSD - These are lowered to single-precision ops by the |