Setjmp should always return zero if we don't implement longjmp. This avoids

leaving trash in the register, fixing anagram

llvm-svn: 7013
This commit is contained in:
Chris Lattner 2003-06-30 19:35:54 +00:00
parent eba22eb59d
commit 53426e6526
1 changed files with 2 additions and 0 deletions

View File

@ -981,6 +981,8 @@ void ISel::visitIntrinsicCall(LLVMIntrinsic::ID ID, CallInst &CI) {
case LLVMIntrinsic::longjmp:
BuildMI(X86::CALLpcrel32, 1).addExternalSymbol("abort", true);
case LLVMIntrinsic::setjmp:
// Setjmp always returns zero...
BuildMI(BB, X86::MOVir32, 1, getReg(CI)).addZImm(0);
return;
default: assert(0 && "Unknown intrinsic for X86!");
}