[lld] [lld][LoongArch] Relax R_LARCH_PCALA_HI20 and R_LARCH_PCALA_LO12 (PR #112696)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 18 00:52:29 PDT 2024
================
@@ -22,6 +22,40 @@ using namespace lld;
using namespace lld::elf;
namespace {
+#define LARCH_GET_RD(insn) (insn & 0x1f)
+#define LARCH_GET_RJ(insn) ((insn >> 5) & 0x1f)
+#define LARCH_MK_ADDI_D 0xffc00000
+#define LARCH_OP_ADDI_D 0x02c00000
----------------
ywgrit wrote:
> Can we reuse the values in below enum (i.e. line 93)?
Actually, I'm thinking if we could remove the enum values of Op and use the newly defined macros for all operations about instruction opcode? Because we may need to use the mask of instruction sometimes.
https://github.com/llvm/llvm-project/pull/112696
More information about the llvm-commits
mailing list