[llvm] [LoongArch] Add relax relocations for tls_le code sequence (PR #121329)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 23:52:31 PST 2025
================
@@ -387,11 +389,18 @@ void LoongArchMCCodeEmitter::expandAddTPRel(const MCInst &MI,
"Expected %le_add_r relocation on TP-relative symbol");
// Emit the correct %le_add_r relocation for the symbol.
- // TODO: Emit R_LARCH_RELAX for %le_add_r where the relax feature is enabled.
Fixups.push_back(MCFixup::create(
0, Expr, MCFixupKind(LoongArch::fixup_loongarch_tls_le_add_r),
MI.getLoc()));
+ // Emit R_LARCH_RELAX for %le_add_r when the relax feature is enabled.
+ bool EnableRelax = STI.hasFeature(LoongArch::FeatureRelax);
----------------
zhaoqi5 wrote:
I have modified. Thanks.
https://github.com/llvm/llvm-project/pull/121329
More information about the llvm-commits
mailing list