[PATCH] D77786: [AArch64] Add v8.5 Branch Target Identification support.
Daniel Kiss via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 12:40:48 PDT 2020
danielkiss updated this revision to Diff 269634.
danielkiss marked an inline comment as done.
danielkiss added a comment.
D81257 <https://reviews.llvm.org/D81257> is merged, so now BTI C mnemonic can be used instead of the hint.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77786/new/
https://reviews.llvm.org/D77786
Files:
libunwind/src/assembly.h
Index: libunwind/src/assembly.h
===================================================================
--- libunwind/src/assembly.h
+++ libunwind/src/assembly.h
@@ -48,6 +48,24 @@
#define PPC64_OPD2
#endif
+#if defined(__aarch64__) && defined(__ARM_FEATURE_BTI_DEFAULT)
+ .pushsection ".note.gnu.property", "a" SEPARATOR \
+ .balign 8 SEPARATOR \
+ .long 4 SEPARATOR \
+ .long 0x10 SEPARATOR \
+ .long 0x5 SEPARATOR \
+ .asciz "GNU" SEPARATOR \
+ .long 0xc0000000 SEPARATOR /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */ \
+ .long 4 SEPARATOR \
+ .long 3 SEPARATOR /* GNU_PROPERTY_AARCH64_FEATURE_1_BTI AND */ \
+ /* GNU_PROPERTY_AARCH64_FEATURE_1_PAC */ \
+ .long 0 SEPARATOR \
+ .popsection SEPARATOR
+#define AARCH64_BTI bti c
+#else
+#define AARCH64_BTI
+#endif
+
#define GLUE2(a, b) a ## b
#define GLUE(a, b) GLUE2(a, b)
#define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name)
@@ -144,7 +162,8 @@
SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR \
PPC64_OPD1 \
SYMBOL_NAME(name): \
- PPC64_OPD2
+ PPC64_OPD2 \
+ AARCH64_BTI
#if defined(__arm__)
#if !defined(__ARM_ARCH)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77786.269634.patch
Type: text/x-patch
Size: 1812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200609/64f47d80/attachment-0001.bin>
More information about the llvm-commits
mailing list