return;
case LLVMIntrinsic::setjmp:
+ case LLVMIntrinsic::sigsetjmp:
// This instrinsic should never exist in the program, but until we get
// setjmp/longjmp transformations going on, we should codegen it to
// something reasonable. This will allow code that never calls longjmp
Out << "0";
return;
case LLVMIntrinsic::longjmp:
- // Treat longjmp the same as setjmp
+ case LLVMIntrinsic::siglongjmp:
+ // Longjmp is not implemented, and never will be. It would cause an
+ // exception throw.
Out << "abort()";
return;
}
return;
case LLVMIntrinsic::setjmp:
+ case LLVMIntrinsic::sigsetjmp:
// This instrinsic should never exist in the program, but until we get
// setjmp/longjmp transformations going on, we should codegen it to
// something reasonable. This will allow code that never calls longjmp
Out << "0";
return;
case LLVMIntrinsic::longjmp:
- // Treat longjmp the same as setjmp
+ case LLVMIntrinsic::siglongjmp:
+ // Longjmp is not implemented, and never will be. It would cause an
+ // exception throw.
Out << "abort()";
return;
}
addReg(callInstr.getOperand(1)));
return true;
+ case LLVMIntrinsic::sigsetjmp:
case LLVMIntrinsic::setjmp: {
// act as if we return 0
unsigned g0 = target.getRegInfo().getZeroRegNum();
return true;
}
+ case LLVMIntrinsic::siglongjmp:
case LLVMIntrinsic::longjmp: {
// call abort()
Module* M = callInstr.getParent()->getParent()->getParent();
return;
case LLVMIntrinsic::longjmp:
+ case LLVMIntrinsic::siglongjmp:
BuildMI(X86::CALLpcrel32, 1).addExternalSymbol("abort", true);
return;
case LLVMIntrinsic::setjmp:
+ case LLVMIntrinsic::sigsetjmp:
// Setjmp always returns zero...
BuildMI(BB, X86::MOVir32, 1, getReg(CI)).addZImm(0);
return;
return;
case LLVMIntrinsic::longjmp:
+ case LLVMIntrinsic::siglongjmp:
BuildMI(X86::CALLpcrel32, 1).addExternalSymbol("abort", true);
return;
case LLVMIntrinsic::setjmp:
+ case LLVMIntrinsic::sigsetjmp:
// Setjmp always returns zero...
BuildMI(BB, X86::MOVir32, 1, getReg(CI)).addZImm(0);
return;