Skip to content

Commit 69faae2

Browse files
committed
[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
1 parent 1aa59ff commit 69faae2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libcxxabi/src/cxa_exception.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@ asm(" .pushsection .text.__cxa_end_cleanup,\"ax\",%progbits\n"
378378
" .globl __cxa_end_cleanup\n"
379379
" .type __cxa_end_cleanup,%function\n"
380380
"__cxa_end_cleanup:\n"
381+
#if defined(__ARM_FEATURE_BTI_DEFAULT)
382+
" bti\n"
383+
#endif
381384
" push {r1, r2, r3, lr}\n"
382385
" bl __cxa_end_cleanup_impl\n"
383386
" pop {r1, r2, r3, r4}\n"

0 commit comments

Comments
 (0)