[llvm] [RISCV] Add symbol parsing support for XAndesPerf branch and gp-related instructions (PR #137748)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 28 22:50:49 PDT 2025
================
@@ -26,3 +26,14 @@ ELF_RISCV_NONSTANDARD_RELOC(QUALCOMM, R_RISCV_QC_ABS20_U, 192)
ELF_RISCV_NONSTANDARD_RELOC(QUALCOMM, R_RISCV_QC_E_BRANCH, 193)
ELF_RISCV_NONSTANDARD_RELOC(QUALCOMM, R_RISCV_QC_E_32, 194)
ELF_RISCV_NONSTANDARD_RELOC(QUALCOMM, R_RISCV_QC_E_JUMP_PLT, 195)
+
+// Andes Nonstandard Relocations
+ELF_RISCV_NONSTANDARD_RELOC(ANDES, R_RISCV_NDS_BRANCH_10, 241)
+ELF_RISCV_NONSTANDARD_RELOC(ANDES, R_RISCV_NDS_GPREL_18S0_I, 246)
+ELF_RISCV_NONSTANDARD_RELOC(ANDES, R_RISCV_NDS_GPREL_17S1_I, 247)
+ELF_RISCV_NONSTANDARD_RELOC(ANDES, R_RISCV_NDS_GPREL_17S2_I, 248)
+ELF_RISCV_NONSTANDARD_RELOC(ANDES, R_RISCV_NDS_GPREL_17S3_I, 249)
+ELF_RISCV_NONSTANDARD_RELOC(ANDES, R_RISCV_NDS_GPREL_18S0_S, 250)
+ELF_RISCV_NONSTANDARD_RELOC(ANDES, R_RISCV_NDS_GPREL_17S1_S, 251)
+ELF_RISCV_NONSTANDARD_RELOC(ANDES, R_RISCV_NDS_GPREL_17S2_S, 252)
+ELF_RISCV_NONSTANDARD_RELOC(ANDES, R_RISCV_NDS_GPREL_17S3_S, 253)
----------------
lenary wrote:
Is there non-llvm documentation for these relocations and the instructions/formats they apply to?
Separately, I am thinking of refactoring this file as with these changes, ELD (an external user) will break: https://github.com/qualcomm/eld/blob/b3197fa1e54b470d36d8bdff7a10b469287caa3a/lib/Target/RISCV/RISCVRelocationInternal.h#L70 - this is because I didn't do a good job originally to predict this, rather than a problem you have caused with these changes.
https://github.com/llvm/llvm-project/pull/137748
More information about the llvm-commits
mailing list