[libcxx-commits] [PATCH] D102912: [libunwind] AARCH64 use inline assembly for pointer authentication

Saleem Abdulrasool via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 21 09:20:34 PDT 2021


compnerd added inline comments.


================
Comment at: libunwind/src/DwarfInstructions.hpp:228
+            asm volatile(
+                "mov x17, %x0;"
+                "mov x16, %x1;"
----------------
Could you use `\n\t` instead of the `;` for the inline assembly please?


================
Comment at: libunwind/src/DwarfInstructions.hpp:230
+                "mov x16, %x1;"
+                "hint 0xe;" // autib1716
+                "mov %0, x17"
----------------
I wonder if this would be easier to spot with a constant being passed in as:

```
  static const uint16_t autia1716 = 0xc;
  static const uint16_t autib1716 = 0xe;
  __asm__ __volatile__ ("mov x17, %x0\n\t"
                        "mov x16, %x1\n\t"
                        "hint %[key]\n\t"
                        "mov %0, x17\n\t"
                        : "+r" (ra)
                        : "r" (cfa), [key] "i" (autib1716)
                        : "x16", "x17");
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102912/new/

https://reviews.llvm.org/D102912



More information about the libcxx-commits mailing list