[PATCH] D65028: [WebAssembly] Compute and export TLS block alignment

Guanzhong Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 19 16:22:20 PDT 2019


quantum created this revision.
quantum added reviewers: tlively, aheejin, sbc100, sunfish, alexcrichton.
Herald added subscribers: llvm-commits, cfe-commits, hiraditya, jgravelle-google, dschuff.
Herald added projects: clang, LLVM.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65028

Files:
  clang/include/clang/Basic/BuiltinsWebAssembly.def
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/test/CodeGen/builtins-wasm.c
  lld/test/wasm/tls-align.ll
  lld/test/wasm/tls.ll
  lld/wasm/Driver.cpp
  lld/wasm/Symbols.cpp
  lld/wasm/Symbols.h
  lld/wasm/Writer.cpp
  llvm/include/llvm/IR/IntrinsicsWebAssembly.td
  llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
  llvm/test/CodeGen/WebAssembly/tls-general-dynamic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65028.210930.patch
Type: text/x-patch
Size: 12510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190719/c46232f6/attachment-0001.bin>


More information about the cfe-commits mailing list