[PATCH] D156292: [PowerPC] Support initial-exec TLS relocation on AIX
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 01:14:54 PDT 2023
shchenz added a comment.
@amyk @hubert.reinterpretcast , do you guys thinks it is ok to make initial exec mode have same code sequences with local exec mode? Seems OK to me.
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:838
return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSLE;
+ else if (Model == TLSModel::InitialExec)
+ return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSIE;
----------------
nit: no need for the `else`
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:3360
// handle is created with the MO_TLSGDM_FLAG flag and the global address
// for the TOC entry of the variable offset is created with MO_TLSGD_FLAG.
SDValue VariableOffsetTGA =
----------------
Nit: update the comments here. Now we support 3 modes.
================
Comment at: llvm/test/CodeGen/PowerPC/aix-tls-ie-xcoff-reloc.ll:214
+; REL32-NEXT: Relocations [
+; REL32: Virtual Address: 0xA
+; REL32-NEXT: Symbol: intern_int_zero (19)
----------------
It may be also necessary to check the relocations in the text section. We want to make sure we have call to `.__get_tpointer` at 32-bit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156292/new/
https://reviews.llvm.org/D156292
More information about the llvm-commits
mailing list