[PATCH] D152669: [AIX][TLS] Generate 32-bit local-exec access code sequence

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 11 20:41:56 PDT 2023


amyk created this revision.
amyk added reviewers: PowerPC, kamaub, stefanp, nemanjai, DiggerLin, sfertile, hubert.reinterpretcast.
amyk added projects: LLVM, PowerPC.
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 32-bit (specifically, non-optimized) code sequence.
This work is a follow up of D149722 <https://reviews.llvm.org/D149722>.

The particular sequence that is generated for this sequence is as follows:

  .tc var[TC],var[TL]@le.   // variable offset, with the le relocation specifier
  
  bla __get_tpointer()      // get the thread pointer, modifies r3
  lwz reg1, var[TC](2)      // load the variable offset
  add reg2, r3, reg1        // add the variable offset to the retrieved thread pointer


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152669

Files:
  llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/lib/Target/PowerPC/PPCISelLowering.h
  llvm/lib/Target/PowerPC/PPCInstrInfo.td
  llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
  llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-double.ll
  llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-float.ll
  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-large32.ll
  llvm/test/CodeGen/PowerPC/aix-tls-le-xcoff-reloc32.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152669.530372.patch
Type: text/x-patch
Size: 125979 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230612/934a0c71/attachment-0001.bin>


More information about the llvm-commits mailing list