[libunwind] 5d27638 - [libunwind][AArch64] Unbreak building with GNU assembler

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 17 01:28:28 PDT 2023


Author: Xi Ruoyao
Date: 2023-03-17T09:28:20+01:00
New Revision: 5d276380b0b45c3f02ef3c8614c3be95ce1bcb1e

URL: https://github.com/llvm/llvm-project/commit/5d276380b0b45c3f02ef3c8614c3be95ce1bcb1e
DIFF: https://github.com/llvm/llvm-project/commit/5d276380b0b45c3f02ef3c8614c3be95ce1bcb1e.diff

LOG: [libunwind][AArch64] Unbreak building with GNU assembler

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

Added: 
    

Modified: 
    libunwind/src/DwarfInstructions.hpp

Removed: 
    


################################################################################
diff  --git a/libunwind/src/DwarfInstructions.hpp b/libunwind/src/DwarfInstructions.hpp
index 27432be56133b..9962c2ffa0ca3 100644
--- a/libunwind/src/DwarfInstructions.hpp
+++ b/libunwind/src/DwarfInstructions.hpp
@@ -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)


        


More information about the cfe-commits mailing list