[clang-tools-extra] [llvm] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 18 11:31:35 PST 2023
================
@@ -3107,6 +3136,41 @@ void RISCVAsmParser::emitLoadTLSGDAddress(MCInst &Inst, SMLoc IDLoc,
RISCV::ADDI, IDLoc, Out);
}
+void RISCVAsmParser::emitLoadTLSDescAddress(MCInst &Inst, SMLoc IDLoc,
+ MCStreamer &Out) {
+ // The load TLS GD address pseudo-instruction "la.tlsdesc" is used in
+ // global-dynamic TLS model addressing of global symbols:
+ // la.tlsdesc rdest, symbol
+ // expands to
+ // TmpLabel: AUIPC rdest, %tlsdesc_hi(symbol)
+ // ADDI rdest, rdest, %pcrel_lo(TmpLabel)
----------------
ilovepi wrote:
I've gone ahead and dropped the AsmParser bits for `la.tlsdesc`, since we won't output that into assembly. Le tme now if you're happy with that change, or you'd prefer a different solution.
https://github.com/llvm/llvm-project/pull/66915
More information about the llvm-commits
mailing list