summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-10-02 18:14:06 +0000
committerMartin Storsjo <martin@martin.st>2017-10-02 18:14:06 +0000
commit02a106e21983b0990770344ce7e1678a1b932d66 (patch)
tree95b2e8e7aed53e27197e011575e1f373eb8a9321
parent1af0a827d7e0b77f3abf3b6ccd77322417d545a7 (diff)
Fix building on macOS after SVN r314492
That commit incorrectly expanded the assumption that defined(__APPLE__) implies SjLj exception handling, which only is true within ARM code sections. git-svn-id: https://llvm.org/svn/llvm-project/libunwind/trunk@314695 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--src/UnwindRegistersRestore.S6
-rw-r--r--src/UnwindRegistersSave.S6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/UnwindRegistersRestore.S b/src/UnwindRegistersRestore.S
index a90d5f5..50b8cfb 100644
--- a/src/UnwindRegistersRestore.S
+++ b/src/UnwindRegistersRestore.S
@@ -11,7 +11,7 @@
.text
-#if !defined(__APPLE__) && !defined(__USING_SJLJ_EXCEPTIONS__)
+#if !defined(__USING_SJLJ_EXCEPTIONS__)
#if defined(__i386__)
DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_x866jumptoEv)
@@ -310,7 +310,7 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind15Registers_arm646jumptoEv)
ldp x0, x1, [x0, #0x000] // restore x0,x1
ret x30 // jump to pc
-#elif defined(__arm__)
+#elif defined(__arm__) && !defined(__APPLE__)
#if !defined(__ARM_ARCH_ISA_ARM)
.thumb
@@ -493,7 +493,7 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind14Registers_or1k6jumptoEv)
#endif
-#endif /* !defined(__APPLE__) && !defined(__USING_SJLJ_EXCEPTIONS__) */
+#endif /* !defined(__USING_SJLJ_EXCEPTIONS__) */
NO_EXEC_STACK_DIRECTIVE
diff --git a/src/UnwindRegistersSave.S b/src/UnwindRegistersSave.S
index 7f5a9ac..716073b 100644
--- a/src/UnwindRegistersSave.S
+++ b/src/UnwindRegistersSave.S
@@ -11,7 +11,7 @@
.text
-#if !defined(__APPLE__) && !defined(__USING_SJLJ_EXCEPTIONS__)
+#if !defined(__USING_SJLJ_EXCEPTIONS__)
#if defined(__i386__)
@@ -291,7 +291,7 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
mov x0, #0 // return UNW_ESUCCESS
ret
-#elif defined(__arm__)
+#elif defined(__arm__) && !defined(__APPLE__)
#if !defined(__ARM_ARCH_ISA_ARM)
.thumb
@@ -473,7 +473,7 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
l.sw 124(r3), r31
#endif
-#endif /* !defined(__APPLE__) && !defined(__USING_SJLJ_EXCEPTIONS__) */
+#endif /* !defined(__USING_SJLJ_EXCEPTIONS__) */
NO_EXEC_STACK_DIRECTIVE