diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/InstSelectSimple.cpp | 2 | ||||
-rw-r--r-- | lib/Target/X86/X86ISelSimple.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index e57a6ab..b2e11ba 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -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!"); } diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp index e57a6ab..b2e11ba 100644 --- a/lib/Target/X86/X86ISelSimple.cpp +++ b/lib/Target/X86/X86ISelSimple.cpp @@ -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!"); } |