[lld] [lld][ELF][LoongArch] Support relaxing R_LARCH_CALL36 (PR #127312)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 15 13:57:50 PST 2025


================
@@ -830,6 +833,45 @@ static void relaxPCHi20Lo12(Ctx &ctx, const InputSection &sec, size_t i,
   remove = 4;
 }
 
+static bool isInsnPairCall36(uint64_t pair) {
+  const uint32_t insn1 = extractBits(pair, 31, 0);
+  const uint32_t insn2 = extractBits(pair, 63, 32);
+  if ((insn1 & 0xfe000000) != PCADDU18I)
----------------
MaskRay wrote:

There is an instruction that #123576 doesn't have. We typically avoid instruction checks unless absolutely necessary.

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


More information about the llvm-commits mailing list