[PATCH] D128998: [libunwind] Handle G in personality string

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 09:10:02 PST 2023


MaskRay added inline comments.


================
Comment at: libunwind/src/DwarfInstructions.hpp:225
+          __asm__ __volatile__(".arch_extension memtag\n"
+                               "stg %[Ptr], [%[Ptr]]\n"
+                               :
----------------
JOE1994 wrote:
> This added inline assembly (`stg` instruction).
> According to [the ARM instruction reference guide](https://developer.arm.com/documentation/100076/0100/fou1538563923467), `stg` instruction is only supported in `ARMv8.5` and later.
> 
> Since this change (D128998), I can no longer build `libunwind` on my `ARMv8.1` machine.
> The assembler gives the following error:
> 
> ```
> /tmp/ccim5Evd.s: Assembler messages:
> /tmp/ccim5Evd.s:9031: Error: unknown architectural extension `memtag'
> /tmp/ccim5Evd.s:9031: Error: unknown mnemonic `stg' -- `stg x2,[x2]'
> /tmp/ccim5Evd.s:9040: Error: unknown architectural extension `memtag'
> /tmp/ccim5Evd.s:9040: Error: unknown mnemonic `stg' -- `stg x2,[x2]'
> ```
> 
> Is there a way to add a guard to only insert the `stg` instruction in supported ISAs?
You'll need to use the latest Clang to build the file. Older Clang is not supported. See https://libcxx.llvm.org/BuildingLibcxx.html


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128998



More information about the llvm-commits mailing list