[llvm] [LoongArch] Emit function call code sequence as `PCADDU18I+JIRL` in medium code model (PR #76555)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 00:35:04 PST 2024


================
@@ -108,7 +108,10 @@ enum Fixups {
   // 20-bit fixup corresponding to %gd_hi20(foo) for instruction lu12i.w.
   fixup_loongarch_tls_gd_hi20,
   // Generate an R_LARCH_RELAX which indicates the linker may relax here.
-  fixup_loongarch_relax = FirstLiteralRelocationKind + ELF::R_LARCH_RELAX
+  fixup_loongarch_relax = FirstLiteralRelocationKind + ELF::R_LARCH_RELAX,
+  // 36-bit fixup corresponding to %call36(foo) for a pair instructions:
+  // pcaddu18i+jirl.
+  fixup_loongarch_call36 = FirstLiteralRelocationKind + ELF::R_LARCH_CALL36
----------------
wangleiat wrote:

> Nit: Better to add a `,` at the end of this line to avoid touching it in future when we add new fixups.

Thank you very much. I will make the corrections during the merge.

https://github.com/llvm/llvm-project/pull/76555


More information about the llvm-commits mailing list