nathanwhit opened issue #5433:
Feature
Support the
tls_value
instruction on aarch64 Mach-O (darwin)Benefit
Needed for cg_clif to support TLS on Apple silicon
Implementation
The instruction sequence emitted for this is https://github.com/llvm/llvm-project/blob/ad68586a37e8e23eeb269d03bd28eb46e16bf48c/llvm/test/CodeGen/AArch64/GlobalISel/darwin-tls-call-clobber.ll#L33-L36 (That link is a little confusing because it's a test, but couldn't immediately find a better example).
The x86_64 implementation and aarch64 ELF implementation should provide some guidance as well.
Alternatives
None
cfallin commented on issue #5433:
This would be great to have; would you be willing to try putting together a PR? The existing implementation for TLS on ELF aarch64 platforms (see this file and this file, grep for
ElfTlsGetAddr
in both; and see this lowering rule) should be a reasonable guide. Happy to answer further questions if you (or anyone) wants to attempt this!
nathanwhit commented on issue #5433:
@cfallin Not sure if you saw, but I actually just posted a PR (#5434)!
(I was preparing the PR when I realized there wasn't an issue for it yet)
cfallin closed issue #5433:
Feature
Support the
tls_value
instruction on aarch64 Mach-O (darwin)Benefit
Needed for cg_clif to support TLS on Apple silicon
Implementation
The instruction sequence emitted for this is https://github.com/llvm/llvm-project/blob/ad68586a37e8e23eeb269d03bd28eb46e16bf48c/llvm/test/CodeGen/AArch64/GlobalISel/darwin-tls-call-clobber.ll#L33-L36 (That link is a little confusing because it's a test, but couldn't immediately find a better example).
The x86_64 implementation and aarch64 ELF implementation should provide some guidance as well.
Alternatives
None
Last updated: Nov 22 2024 at 16:03 UTC