[libunwind] [llvm] [AArch64] Add .cfi_non_hint_pauth_frame when PAuth_LR instructions used for signing (PR #233885)

Kerry McLaughlin via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 22 09:47:57 PDT 2026


================
@@ -343,18 +362,23 @@ int DwarfInstructions<A, R>::stepWithDwarf(
         if (RAState == RASignedWithPC) {
           register unsigned long long x15 __asm("x15") =
               prolog.ptrAuthDiversifier;
-          if (cieInfo.addressesSignedWithBKey) {
-            asm("hint 0x27\n\t" // pacm
-                "hint 0xe"
-                : "+r"(x17)
-                : "r"(x16), "r"(x15)); // autib1716
-          } else {
-            asm("hint 0x27\n\t" // pacm
-                "hint 0xc"
-                : "+r"(x17)
-                : "r"(x16), "r"(x15)); // autia1716
+          if (cieInfo.nonHintPAuthFrame)
+            x17 = nonHintLRAuthentication(prolog.ptrAuthDiversifier, cfa,
+                                          returnAddress,
+                                          cieInfo.addressesSignedWithBKey);
+          else {
+            if (cieInfo.addressesSignedWithBKey) {
+              asm("hint 0x27\n\t");                             // pacm
+              asm("hint 0xe" : "+r"(x17) : "r"(x16), "r"(x15)); // autib1716
----------------
kmclaughlin-arm wrote:

Moved the pacm instruction into the same statement, similar to how it was before.

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


More information about the cfe-commits mailing list