[PATCH] D86893: [PowerPC] Add support for TLS Initial Exec
Stefan Pintilie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 12:51:31 PDT 2020
stefanp created this revision.
stefanp added reviewers: nemanjai, sfertile, MaskRay, NeHuang, hfinkel, PowerPC.
Herald added subscribers: shchenz, kbarton, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
stefanp requested review of this revision.
Add Thread Local Storage Initial Exec support to LLD.
This patch adds the computation for the relocations as well as the relaxation from Initial Exec to Local Exec.
Initial Exec:
pld r9, x at got@tprel at pcrel
add r9, r9, x at tls@pcrel
or
pld r9, x at got@tprel at pcrel
lbzx r10, r9, x at tls@pcrel
Note that @tls at pcrel is actually encoded as R_PPC64_TLS with a one byte
displacement.
For the above examples relaxing Intitial Exec to Local Exec:
paddi r9, r9, x at tprel
nop
or
paddi r9, r13, x at tprel
lbz r10, 0(r9)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86893
Files:
lld/ELF/Arch/PPC64.cpp
lld/test/ELF/Inputs/ppc64-tls-vardef.s
lld/test/ELF/ppc64-tls-pcrel-ie.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86893.289009.patch
Type: text/x-patch
Size: 7735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200831/d84c94ae/attachment.bin>
More information about the llvm-commits
mailing list