aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2021-08-26 15:29:32 -0400
committerSam Clegg <sbc@chromium.org>2021-09-14 06:47:37 -0700
commitef8c9135efcb3847fc0e5bbdb55eae18751090df (patch)
treee309496d229bfb1f249f830e9df05f33b1f895cf /llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
parent5041a485b948e55e54338779f2248c45402b0ae7 (diff)
downloadllvm-ef8c9135efcb3847fc0e5bbdb55eae18751090df.zip
llvm-ef8c9135efcb3847fc0e5bbdb55eae18751090df.tar.gz
llvm-ef8c9135efcb3847fc0e5bbdb55eae18751090df.tar.bz2
[WebAssembly] Allow import and export of TLS symbols between DSOs
We previously had a limitation that TLS variables could not be exported (and therefore could also not be imported). This change removed that limitation. Differential Revision: https://reviews.llvm.org/D108877
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
index 4d5d6bd..8c6f571 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
@@ -102,6 +102,9 @@ MCOperand WebAssemblyMCInstLower::lowerSymbolOperand(const MachineOperand &MO,
switch (TargetFlags) {
case WebAssemblyII::MO_NO_FLAG:
break;
+ case WebAssemblyII::MO_GOT_TLS:
+ Kind = MCSymbolRefExpr::VK_WASM_GOT_TLS;
+ break;
case WebAssemblyII::MO_GOT:
Kind = MCSymbolRefExpr::VK_GOT;
break;