[libcxx-commits] [PATCH] D112432: [ARM][libcxxabi] Add PACBTI-M support to libcxxabi

Ties Stuij via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 25 03:41:06 PDT 2021


stuij created this revision.
Herald added a subscriber: kristof.beyls.
stuij requested review of this revision.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++abi.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112432

Files:
  libcxxabi/src/cxa_exception.cpp


Index: libcxxabi/src/cxa_exception.cpp
===================================================================
--- libcxxabi/src/cxa_exception.cpp
+++ libcxxabi/src/cxa_exception.cpp
@@ -377,6 +377,9 @@
     "	.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, r4}\n"
     "	bl	__cxa_end_cleanup_impl\n"
     "	pop	{r1, r2, r3, r4}\n"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112432.381917.patch
Type: text/x-patch
Size: 467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211025/e978de2b/attachment.bin>


More information about the libcxx-commits mailing list