aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/PowerPC/PPCISelDAGToDAG.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index d949bce741..5300f59b89 100644
--- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -920,6 +920,16 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) {
AddrOp1, AddrOp2, Select(N->getOperand(0)));
break;
}
+
+ case ISD::CALLSEQ_START:
+ case ISD::CALLSEQ_END: {
+ unsigned Amt = cast<ConstantSDNode>(N->getOperand(1))->getValue();
+ unsigned Opc = N->getOpcode() == ISD::CALLSEQ_START ?
+ PPC::ADJCALLSTACKDOWN : PPC::ADJCALLSTACKUP;
+ CurDAG->SelectNodeTo(N, MVT::Other, Opc, Select(N->getOperand(0)),
+ getI32Imm(Amt));
+ break;
+ }
case ISD::RET: {
SDOperand Chain = Select(N->getOperand(0)); // Token chain.