[libunwind][AArch64] Unbreak building with GNU assembler
authorXi Ruoyao <xry111@xry111.site>
Fri, 17 Mar 2023 08:27:41 +0000 (09:27 +0100)
committerNikita Popov <npopov@redhat.com>
Fri, 17 Mar 2023 08:28:20 +0000 (09:28 +0100)
GNU assembler mandates armv8.5-a for memtag instructions. Maybe
we should remove this restriction in GNU assembler, but let's work
around it for current GNU Binutils releases.

Differential Revision: https://reviews.llvm.org/D146109

libunwind/src/DwarfInstructions.hpp

index 27432be56133b86721420260580e873b674ea43f..9962c2ffa0ca34f73f2e17009c68050d2aacb6c1 100644 (file)
@@ -224,7 +224,8 @@ int DwarfInstructions<A, R>::stepWithDwarf(A &addressSpace, pint_t pc,
         p &= ~0xfULL;
         // CFA is the bottom of the current stack frame.
         for (; p < cfa; p += 16) {
-          __asm__ __volatile__(".arch_extension memtag\n"
+          __asm__ __volatile__(".arch armv8.5-a\n"
+                               ".arch_extension memtag\n"
                                "stg %[Ptr], [%[Ptr]]\n"
                                :
                                : [Ptr] "r"(p)