[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 24 11:41:25 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 70334081f75d67900c6ffa193c60c4d6f4767354 1423c03b1cc31749027b84f9ec063e0b5ba02c3a --extensions hpp -- libunwind/src/Registers.hpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libunwind/src/Registers.hpp b/libunwind/src/Registers.hpp
index 154d967b07..a4a88d1331 100644
--- a/libunwind/src/Registers.hpp
+++ b/libunwind/src/Registers.hpp
@@ -1838,21 +1838,21 @@ protected:
   inline uint64_t auth(uint64_t ptr, uint64_t salt) const {
     register uint64_t x17 __asm("x17") = ptr;
     register uint64_t x16 __asm("x16") = salt;
-    asm volatile ("hint  0xc" // autia1716
-                  : "+r"(x17)
-                  : "r"(x16)
-                  :);
+    asm volatile("hint  0xc" // autia1716
+                 : "+r"(x17)
+                 : "r"(x16)
+                 :);
 
     uint64_t checkValue = ptr;
     // Support for machines without FPAC.
     // Strip the upper bits with `XPACLRI` and compare with the
     // authenticated value.
-    asm volatile ("mov   x30, %[checkValue]     \r\n" \
-                  "hint  0x7                    \r\n" \
-                  "mov   %[checkValue], x30     \r\n" \
-        : [checkValue] "+r"(checkValue)
-        :
-        : "x30");
+    asm volatile("mov   x30, %[checkValue]     \r\n"
+                 "hint  0x7                    \r\n"
+                 "mov   %[checkValue], x30     \r\n"
+                 : [checkValue] "+r"(checkValue)
+                 :
+                 : "x30");
     if (x17 != checkValue)
       _LIBUNWIND_ABORT("IP PAC authentication failure");
     return x17;

``````````

</details>


https://github.com/llvm/llvm-project/pull/113368


More information about the cfe-commits mailing list