Thread the chain through the eh.sjlj.setjmp intrinsic, like it's documented to
do. This will be useful later on with the new SJLJ stuff. llvm-svn: 141416
This commit is contained in:
parent
13d3f86577
commit
7ecfbd90ef
|
@ -95,7 +95,7 @@ namespace ISD {
|
||||||
// execution to HANDLER. Many platform-related details also :)
|
// execution to HANDLER. Many platform-related details also :)
|
||||||
EH_RETURN,
|
EH_RETURN,
|
||||||
|
|
||||||
// OUTCHAIN = EH_SJLJ_SETJMP(INCHAIN, buffer)
|
// RESULT, OUTCHAIN = EH_SJLJ_SETJMP(INCHAIN, buffer)
|
||||||
// This corresponds to the eh.sjlj.setjmp intrinsic.
|
// This corresponds to the eh.sjlj.setjmp intrinsic.
|
||||||
// It takes an input chain and a pointer to the jump buffer as inputs
|
// It takes an input chain and a pointer to the jump buffer as inputs
|
||||||
// and returns an outchain.
|
// and returns an outchain.
|
||||||
|
|
|
@ -4744,8 +4744,14 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case Intrinsic::eh_sjlj_setjmp: {
|
case Intrinsic::eh_sjlj_setjmp: {
|
||||||
setValue(&I, DAG.getNode(ISD::EH_SJLJ_SETJMP, dl, MVT::i32, getRoot(),
|
SDValue Ops[2];
|
||||||
getValue(I.getArgOperand(0))));
|
Ops[0] = getRoot();
|
||||||
|
Ops[1] = getValue(I.getArgOperand(0));
|
||||||
|
SDValue Op = DAG.getNode(ISD::EH_SJLJ_SETJMP, dl,
|
||||||
|
DAG.getVTList(MVT::i32, MVT::Other),
|
||||||
|
Ops, 2);
|
||||||
|
setValue(&I, Op.getValue(0));
|
||||||
|
DAG.setRoot(Op.getValue(1));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case Intrinsic::eh_sjlj_longjmp: {
|
case Intrinsic::eh_sjlj_longjmp: {
|
||||||
|
|
|
@ -2210,7 +2210,8 @@ SDValue
|
||||||
ARMTargetLowering::LowerEH_SJLJ_SETJMP(SDValue Op, SelectionDAG &DAG) const {
|
ARMTargetLowering::LowerEH_SJLJ_SETJMP(SDValue Op, SelectionDAG &DAG) const {
|
||||||
DebugLoc dl = Op.getDebugLoc();
|
DebugLoc dl = Op.getDebugLoc();
|
||||||
SDValue Val = DAG.getConstant(0, MVT::i32);
|
SDValue Val = DAG.getConstant(0, MVT::i32);
|
||||||
return DAG.getNode(ARMISD::EH_SJLJ_SETJMP, dl, MVT::i32, Op.getOperand(0),
|
return DAG.getNode(ARMISD::EH_SJLJ_SETJMP, dl,
|
||||||
|
DAG.getVTList(MVT::i32, MVT::Other), Op.getOperand(0),
|
||||||
Op.getOperand(1), Val);
|
Op.getOperand(1), Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue