[PATCH] D149722: [AIX][TLS] Generate 64-bit local-exec access code sequence

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 22:07:09 PDT 2023


amyk created this revision.
amyk added reviewers: PowerPC, stefanp, kamaub, nemanjai.
amyk added a project: LLVM.
Herald added subscribers: kbarton, hiraditya.
Herald added a project: All.
amyk requested review of this revision.
Herald added a subscriber: llvm-commits.

This patch adds support for the TLS local-exec access model on AIX to allow
for the ability to generate the 64-bit (specifically, non-optimized) code sequence.

The implementation that is put up in this patch is up for review in order to first gain
feedback on the initial design.

For this patch in particular, the sequence that is generated involves a load of the
variable offset, followed by an `add` of the loaded variable offset to `r13` (which is
thread pointer, respectively).

The TC entries generated in the assembly files are also changed where we add
the `@le` relocation for the variable offset.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149722

Files:
  llvm/include/llvm/MC/MCExpr.h
  llvm/lib/MC/MCExpr.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp
  llvm/lib/Target/PowerPC/PPC.h
  llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/lib/Target/PowerPC/PPCInstr64Bit.td
  llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-int.ll
  llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-longlong.ll
  llvm/test/CodeGen/PowerPC/aix-tls-le-xcoff-reloc-large.ll
  llvm/test/CodeGen/PowerPC/aix-tls-le-xcoff-reloc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149722.518965.patch
Type: text/x-patch
Size: 61011 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230503/6e11b707/attachment.bin>


More information about the llvm-commits mailing list