aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2009-05-12 23:59:14 +0000
committerJim Grosbach <grosbach@apple.com>2009-05-12 23:59:14 +0000
commit0e0da734bbdfa1d3f55cd04db31d83b97e4556f7 (patch)
treeaa04b7f115b464f914893e1e637c808794af646e /lib/CodeGen/PrologEpilogInserter.cpp
parent9d3094b38e51c85e93fc5a9c8ab23c95b73f78d4 (diff)
downloadexternal_llvm-0e0da734bbdfa1d3f55cd04db31d83b97e4556f7.zip
external_llvm-0e0da734bbdfa1d3f55cd04db31d83b97e4556f7.tar.gz
external_llvm-0e0da734bbdfa1d3f55cd04db31d83b97e4556f7.tar.bz2
Add support for GCC compatible builtin setjmp and longjmp intrinsics. This is
a supporting preliminary patch for GCC-compatible SjLJ exception handling. Note that these intrinsics are not designed to be invoked directly by the user, but rather used by the front-end as target hooks for exception handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--lib/CodeGen/PrologEpilogInserter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp
index 6f95d1c..d9665cc 100644
--- a/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/lib/CodeGen/PrologEpilogInserter.cpp
@@ -180,7 +180,7 @@ void PEI::calculateCalleeSavedRegisters(MachineFunction &Fn) {
std::vector<CalleeSavedInfo> CSI;
for (unsigned i = 0; CSRegs[i]; ++i) {
unsigned Reg = CSRegs[i];
- if (Fn.getRegInfo().isPhysRegUsed(Reg)) {
+ if (Fn.getRegInfo().isPhysRegUsed(Reg) || Fn.doesHaveBuiltinSetjmp()) {
// If the reg is modified, save it!
CSI.push_back(CalleeSavedInfo(Reg, CSRegClasses[i]));
} else {