[PATCH] D151335: [AIX][TLS] Generate .extern and .ref references to __tls_get_addr for local-exec accesses.

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 08:48:06 PDT 2023


amyk added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:2878
+    MCSymbol *TlsGetAddrDescriptor =
+        createMCSymbolForTlsGetAddr(OutContext, PPC::LDtoc, XCOFF::XMC_DS);
+
----------------
DiggerLin wrote:
> DiggerLin wrote:
> > I know that any value of non PPC::GETtlsTpointer32AIX is OK here
> > but why it is PPC::LDtoc here ? can we use "PPC::GETtlsADDR" here ?
>  use  PPC::GETtlsADDR64AIX maybe more specific.
Yeah, that's a good point. I just needed any other opcode and just chose `PPC::LDtoc` as that is the instruction that I was adding it to (since we have a load from the TOC in 64-bit local-exec). 
That being said, using that opcode also makes sense to me since we're creating a reference to `__tls_get_addr` to begin with.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151335/new/

https://reviews.llvm.org/D151335



More information about the llvm-commits mailing list