[PATCH] D102912: [libunwind] AARCH64 use inline assembly for pointer authentication
Maksim Kita via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 21 04:10:05 PDT 2021
kitaisreal updated this revision to Diff 346982.
kitaisreal added a comment.
Formatted code using clang-format
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102912/new/
https://reviews.llvm.org/D102912
Files:
libunwind/src/DwarfInstructions.hpp
Index: libunwind/src/DwarfInstructions.hpp
===================================================================
--- libunwind/src/DwarfInstructions.hpp
+++ libunwind/src/DwarfInstructions.hpp
@@ -222,27 +222,22 @@
// are used here as gcc does not assemble autia1716/autib1716 for pre
// armv8.3a targets.
- if (cieInfo.addressesSignedWithBKey)
- {
- asm volatile(
- "mov x17, %x0;"
- "mov x16, %x1;"
- "hint 0xe;" // autib1716
- "mov %0, x17"
- : "+r"(returnAddress)
- : "r"(cfa)
- : "x16", "x17");
- }
- else
- {
- asm volatile(
- "mov x17, %x0;"
- "mov x16, %x1;"
- "hint 0xc;" // autia1716
- "mov %0, x17"
- : "+r"(returnAddress)
- : "r"(cfa)
- : "x16", "x17");
+ if (cieInfo.addressesSignedWithBKey) {
+ asm volatile("mov x17, %x0;"
+ "mov x16, %x1;"
+ "hint 0xe;" // autib1716
+ "mov %0, x17"
+ : "+r"(returnAddress)
+ : "r"(cfa)
+ : "x16", "x17");
+ } else {
+ asm volatile("mov x17, %x0;"
+ "mov x16, %x1;"
+ "hint 0xc;" // autia1716
+ "mov %0, x17"
+ : "+r"(returnAddress)
+ : "r"(cfa)
+ : "x16", "x17");
}
#endif
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102912.346982.patch
Type: text/x-patch
Size: 1623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210521/2a94da01/attachment.bin>
More information about the llvm-commits
mailing list