HomePhabricator

[WebAssembly] Compute and export TLS block alignment

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

Description

[WebAssembly] Compute and export TLS block alignment

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()));

Reviewers: tlively, aheejin, sbc100, sunfish, alexcrichton

Reviewed By: tlively

Subscribers: dschuff, jgravelle-google, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D65028

llvm-svn: 366624

Details

Committed
quantumJul 19 2019, 4:34 PM
Reviewer
tlively
Differential Revision
D65028: [WebAssembly] Compute and export TLS block alignment
Parents
rG604f802fd30d: [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1
Branches
Unknown
Tags
Unknown