This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Compute and export TLS block alignment
ClosedPublic

Authored by quantum on Jul 19 2019, 4:22 PM.

Details

Summary

Add immutable WASM global __tls_align which stores the alignment
requirements of the TLS segment.

Add __builtin_wasm_tls_align() intrinsic to get this alignment in Clang.

The expected usage has now changed to:

__wasm_init_tls(memalign(__builtin_wasm_tls_align(),
                         __builtin_wasm_tls_size()));

Diff Detail

Repository
rL LLVM

Event Timeline

quantum created this revision.Jul 19 2019, 4:22 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 19 2019, 4:22 PM
tlively accepted this revision.Jul 19 2019, 4:32 PM

Nice

This revision is now accepted and ready to land.Jul 19 2019, 4:32 PM
This revision was automatically updated to reflect the committed changes.
sbc100 added inline comments.Jul 19 2019, 5:41 PM
lld/trunk/wasm/Symbols.h
438

__tls_align

439

Is this stored as power of 2?