[libcxx-commits] [libcxxabi] c5c4bac - Reland "[libcxxabi][ARM] Make CXX_end_cleanup compatible with Armv6-M"
Daniel Kiss via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 9 03:54:25 PST 2021
Author: Daniel Kiss
Date: 2021-11-09T12:53:53+01:00
New Revision: c5c4bac6c03da467a048ed922a14b76c7e053637
URL: https://github.com/llvm/llvm-project/commit/c5c4bac6c03da467a048ed922a14b76c7e053637
DIFF: https://github.com/llvm/llvm-project/commit/c5c4bac6c03da467a048ed922a14b76c7e053637.diff
LOG: Reland "[libcxxabi][ARM] Make CXX_end_cleanup compatible with Armv6-M"
On Armv6-M the branch may not able to reach the _Unwind_Resume function because it's relocation(R_ARM_THM_JUMP11) is in -2048, 2047 range only.
Reviewed By: chill, stuij, lenary
Differential Revision: https://reviews.llvm.org/D113181
Added:
Modified:
libcxxabi/src/cxa_exception.cpp
Removed:
################################################################################
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index 7044cb9a43f3a..9dd55316507c1 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -382,7 +382,12 @@ asm(" .pushsection .text.__cxa_end_cleanup,\"ax\",%progbits\n"
" bl __cxa_end_cleanup_impl\n"
" pop {r1, r2, r3, r4}\n"
" mov lr, r4\n"
- " b _Unwind_Resume\n"
+#if defined(LIBCXXABI_BAREMETAL)
+ " ldr r4, =_Unwind_Resume\n"
+ " bx r4\n"
+#else
+ " b _Unwind_Resume\n"
+#endif
" .popsection");
#endif // defined(_LIBCXXABI_ARM_EHABI)
More information about the libcxx-commits
mailing list