Stream: git-wasmtime

Topic: wasmtime / issue #5433 Cranelift: Support tls_value on aa...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 14 2022 at 02:22):

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

view this post on Zulip Wasmtime GitHub notifications bot (Dec 14 2022 at 02:36):

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!

view this post on Zulip Wasmtime GitHub notifications bot (Dec 14 2022 at 02:51):

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)

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2023 at 18:27):

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: Dec 23 2024 at 12:05 UTC