[PATCH] D109293: [JITLink][WIP] Add initial native TLS support to ELFNix platform
Moritz Sichert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 8 02:53:08 PDT 2021
MoritzS added inline comments.
================
Comment at: compiler-rt/lib/orc/elfnix_tls.x86-64.S:20
+ .globl ___orc_rt_elfnix_tls_get_addr
+___orc_rt_elfnix_tls_get_addr:
+ pushq %rbp
----------------
Do we need to save all registers here? I saw you took this from the implementation in MachO and I'm not familiar with the ABI there. But for ELFNix I don't think that is necessary. For TLSGD/TLSLD relocations the compiler already emits a regular function call to `__tls_get_addr` which means that it already takes care of saving the caller saved registers. Also, since you implemented `__orc_rt_elfnix_tls_get_addr_impl` as a regular function in C++, its generated assembly will also correctly store all callee saved registers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109293/new/
https://reviews.llvm.org/D109293
More information about the llvm-commits
mailing list