diff options
author | Chris Lattner <sabre@nondot.org> | 2003-09-08 19:44:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-09-08 19:44:26 +0000 |
commit | ee5457cbe88b7f691f774de8515d9a94226d1b00 (patch) | |
tree | ac7e19c81aba3447b8446f1b4d29c5f5e6db01b8 /lib/Target | |
parent | da73beac201091653d9e2b900d2207c31ed97a0e (diff) | |
download | external_llvm-ee5457cbe88b7f691f774de8515d9a94226d1b00.zip external_llvm-ee5457cbe88b7f691f774de8515d9a94226d1b00.tar.gz external_llvm-ee5457cbe88b7f691f774de8515d9a94226d1b00.tar.bz2 |
Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8411 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 13 | ||||
-rw-r--r-- | lib/Target/CBackend/Writer.cpp | 13 | ||||
-rw-r--r-- | lib/Target/X86/InstSelectSimple.cpp | 1 | ||||
-rw-r--r-- | lib/Target/X86/X86ISelSimple.cpp | 1 |
4 files changed, 0 insertions, 28 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 073ce19..0a9c8d1 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -1153,19 +1153,6 @@ void CWriter::visitCallInst(CallInst &I) { Out << ")"; return; - case LLVMIntrinsic::unwind: - // The unwind intrinsic calls a control flow transfer out of the current - // function, unwinding the stack until a caller who used the invoke - // instruction is found. In this context, we code generated the invoke - // instruction to add an entry to the top of the jmpbuf_list. Thus, - // here we just have to longjmp to the specified handler. - Out << "if (__llvm_jmpbuf_list == 0) { /* llvm.unwind */\n" - << " printf(\"throw found with no handler!\\n\"); abort();\n" - << " }\n" - << " longjmp(__llvm_jmpbuf_list->buf, 1)"; - return; - - case LLVMIntrinsic::setjmp: case LLVMIntrinsic::sigsetjmp: // This instrinsic should never exist in the program, but until we get diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 073ce19..0a9c8d1 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -1153,19 +1153,6 @@ void CWriter::visitCallInst(CallInst &I) { Out << ")"; return; - case LLVMIntrinsic::unwind: - // The unwind intrinsic calls a control flow transfer out of the current - // function, unwinding the stack until a caller who used the invoke - // instruction is found. In this context, we code generated the invoke - // instruction to add an entry to the top of the jmpbuf_list. Thus, - // here we just have to longjmp to the specified handler. - Out << "if (__llvm_jmpbuf_list == 0) { /* llvm.unwind */\n" - << " printf(\"throw found with no handler!\\n\"); abort();\n" - << " }\n" - << " longjmp(__llvm_jmpbuf_list->buf, 1)"; - return; - - case LLVMIntrinsic::setjmp: case LLVMIntrinsic::sigsetjmp: // This instrinsic should never exist in the program, but until we get diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index 6712d94..85708ff 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -1044,7 +1044,6 @@ void ISel::visitIntrinsicCall(LLVMIntrinsic::ID ID, CallInst &CI) { addDirectMem(BuildMI(BB, X86::MOVrm32, 5), TmpReg2).addReg(TmpReg1); return; - case LLVMIntrinsic::unwind: // llvm.unwind is not supported yet! case LLVMIntrinsic::longjmp: case LLVMIntrinsic::siglongjmp: BuildMI(BB, X86::CALLpcrel32, 1).addExternalSymbol("abort", true); diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp index 6712d94..85708ff 100644 --- a/lib/Target/X86/X86ISelSimple.cpp +++ b/lib/Target/X86/X86ISelSimple.cpp @@ -1044,7 +1044,6 @@ void ISel::visitIntrinsicCall(LLVMIntrinsic::ID ID, CallInst &CI) { addDirectMem(BuildMI(BB, X86::MOVrm32, 5), TmpReg2).addReg(TmpReg1); return; - case LLVMIntrinsic::unwind: // llvm.unwind is not supported yet! case LLVMIntrinsic::longjmp: case LLVMIntrinsic::siglongjmp: BuildMI(BB, X86::CALLpcrel32, 1).addExternalSymbol("abort", true); |