aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/Writer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-06-06 21:45:47 +0000
committerChris Lattner <sabre@nondot.org>2006-06-06 21:45:47 +0000
commit475c55393a67ae096d4ec7baffee5830e68e13c1 (patch)
tree779c00284a56a9dffdccb0c30b9b9f643c69efef /lib/Target/CBackend/Writer.cpp
parent001db453f5df586af9625d68e715950106e4f961 (diff)
Now that PR633 is implemented, the CBE can know to emit _setjmp/_longjmp
when available. This speeds up hexxagon from 18.61s to 16.61s with the CBE on PPC Mac OS (for reference, LLC is 15.48s and GCC is 23.35s). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/Writer.cpp')
-rw-r--r--lib/Target/CBackend/Writer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp
index 36336b38d5..692232b78e 100644
--- a/lib/Target/CBackend/Writer.cpp
+++ b/lib/Target/CBackend/Writer.cpp
@@ -1779,11 +1779,17 @@ void CWriter::visitCallInst(CallInst &I) {
Out << ')';
return;
case Intrinsic::setjmp:
+#if defined(HAVE__SETJMP) && defined(HAVE__LONGJMP)
+ Out << "_"; // Use _setjmp on systems that support it!
+#endif
Out << "setjmp(*(jmp_buf*)";
writeOperand(I.getOperand(1));
Out << ')';
return;
case Intrinsic::longjmp:
+#if defined(HAVE__SETJMP) && defined(HAVE__LONGJMP)
+ Out << "_"; // Use _longjmp on systems that support it!
+#endif
Out << "longjmp(*(jmp_buf*)";
writeOperand(I.getOperand(1));
Out << ", ";