[libcxx-commits] [libcxxabi] 69faae2 - [ARM][libcxxabi] Add PACBTI-M support to libcxxabi
Ties Stuij via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Dec 10 01:53:57 PST 2021
Author: Ties Stuij
Date: 2021-12-10T09:53:40Z
New Revision: 69faae2376c1a5beccdfbf103346354c68f3570c
URL: https://github.com/llvm/llvm-project/commit/69faae2376c1a5beccdfbf103346354c68f3570c
DIFF: https://github.com/llvm/llvm-project/commit/69faae2376c1a5beccdfbf103346354c68f3570c.diff
LOG: [ARM][libcxxabi] Add PACBTI-M support to libcxxabi
This change consists of just adding 'BTI' to the prologue of Arm assembly
functions, which is just the one: __cxa_end_cleanup
This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension
The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:
https://developer.arm.com/documentation/ddi0553/latest
The following people contributed to this patch:
- Mikhail Maltsev
Reviewed By: lenary, danielkiss
Differential Revision: https://reviews.llvm.org/D112432
Added:
Modified:
libcxxabi/src/cxa_exception.cpp
Removed:
################################################################################
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index 5e77104e80e3..36388d50dad2 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -378,6 +378,9 @@ asm(" .pushsection .text.__cxa_end_cleanup,\"ax\",%progbits\n"
" .globl __cxa_end_cleanup\n"
" .type __cxa_end_cleanup,%function\n"
"__cxa_end_cleanup:\n"
+#if defined(__ARM_FEATURE_BTI_DEFAULT)
+ " bti\n"
+#endif
" push {r1, r2, r3, lr}\n"
" bl __cxa_end_cleanup_impl\n"
" pop {r1, r2, r3, r4}\n"
More information about the libcxx-commits
mailing list