aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-05-29 19:39:04 +0000
committerJohn McCall <rjmccall@apple.com>2011-05-29 19:39:04 +0000
commit832a9d1a76d30ffd295453e93e8eb52948e5813e (patch)
treeede21dff6b89ba65677d1ced1949d4b78284d713 /lib
parentbcb85087a7f281dcc85b04f82be3a79ff9387fc5 (diff)
On Darwin ARM, set the UNWIND_RESUME libcall to _Unwind_SjLj_Resume.
This is important for the correct lowering of unwind instructions (which doesn't matter at all) and llvm.eh.resume calls (which does). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Support/Triple.cpp7
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp1
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp
index dbdb303a4f..56b0878aa7 100644
--- a/lib/Support/Triple.cpp
+++ b/lib/Support/Triple.cpp
@@ -27,6 +27,7 @@ const char *Triple::getArchTypeName(ArchType Kind) {
case arm: return "arm";
case bfin: return "bfin";
case cellspu: return "cellspu";
+ case glulx: return "glulx";
case mips: return "mips";
case mipsel: return "mipsel";
case msp430: return "msp430";
@@ -62,6 +63,8 @@ const char *Triple::getArchTypePrefix(ArchType Kind) {
case cellspu: return "spu";
+ case glulx: return "glulx";
+
case ppc64:
case ppc: return "ppc";
@@ -139,6 +142,8 @@ Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) {
return bfin;
if (Name == "cellspu")
return cellspu;
+ if (Name == "glulx")
+ return glulx;
if (Name == "mips")
return mips;
if (Name == "mipsel")
@@ -277,6 +282,8 @@ Triple::ArchType Triple::ParseArch(StringRef ArchName) {
return thumb;
else if (ArchName.startswith("alpha"))
return alpha;
+ else if (ArchName.startswith("glulx"))
+ return glulx;
else if (ArchName == "spu" || ArchName == "cellspu")
return cellspu;
else if (ArchName == "msp430")
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
index a78c3ed2a4..1e90d422bd 100644
--- a/lib/Target/ARM/ARMISelLowering.cpp
+++ b/lib/Target/ARM/ARMISelLowering.cpp
@@ -656,6 +656,7 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
setOperationAction(ISD::EH_SJLJ_SETJMP, MVT::i32, Custom);
setOperationAction(ISD::EH_SJLJ_LONGJMP, MVT::Other, Custom);
setOperationAction(ISD::EH_SJLJ_DISPATCHSETUP, MVT::Other, Custom);
+ setLibcallName(RTLIB::UNWIND_RESUME, "_Unwind_SjLj_Resume");
}
setOperationAction(ISD::SETCC, MVT::i32, Expand);