[PATCH] D96184: [AIX][TLS] Generate TLS variables in assembly files
David Tenty via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 2 10:22:14 PST 2021
daltenty added inline comments.
================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:2268
+ XCOFF::CsectProperties(Kind.isThreadData() ? XCOFF::XMC_TL
+ : XCOFF::XMC_UL,
+ XCOFF::XTY_SD));
----------------
As we recently found out `XCOFF::XMC_UL` implies `XCOFF::XTY_CM` in the assembler.
Since we may have external linkage symbols inside this section, we cannot use `XCOFF::XTY_CM`, so we must use `XMC_TL` here.
================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:2271
+ }
+ return Kind.isThreadData() ? TLSDataSection : TLSBSSSection;
+ }
----------------
Same as earlier, we cannot emit this to TLSBSSSection. Any external linkage symbols inside it will make the assembler unhappy.
================
Comment at: llvm/lib/MC/MCObjectFileInfo.cpp:898
+ ".tbss", SectionKind::getThreadBSS(),
+ XCOFF::CsectProperties(XCOFF::StorageMappingClass::XMC_UL, XCOFF::XTY_SD),
+ /* MultiSymbolsAllowed*/ true);
----------------
Based on testing `XMC_UL` implies `XMC_CM` so this isn't actually a legal combination. We should probably add an assert to that extent in a follow on patch.
Also, we can't actually use this section as is in this patch anymore, so I suggest we leave out the initialization and move it to a follow on patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96184/new/
https://reviews.llvm.org/D96184
More information about the llvm-commits
mailing list