diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-06-30 19:35:54 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-06-30 19:35:54 +0000 |
| commit | 53426e6526efd0273213c881622c23c23af3449c (patch) | |
| tree | 92e4a59b05d01388b825e88489b39413095e451f | |
| parent | eba22eb59db0732335b6300d1db4f207ec105605 (diff) | |
| download | bcm5719-llvm-53426e6526efd0273213c881622c23c23af3449c.tar.gz bcm5719-llvm-53426e6526efd0273213c881622c23c23af3449c.zip | |
Setjmp should always return zero if we don't implement longjmp. This avoids
leaving trash in the register, fixing anagram
llvm-svn: 7013
| -rw-r--r-- | llvm/lib/Target/X86/InstSelectSimple.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/InstSelectSimple.cpp b/llvm/lib/Target/X86/InstSelectSimple.cpp index e57a6ab75ad..b2e11ba9ca1 100644 --- a/llvm/lib/Target/X86/InstSelectSimple.cpp +++ b/llvm/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!"); } |

