[llvm] [RISCV] Add support for vendor relocations on Xqci extensions (PR #135400)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue May 6 23:55:06 PDT 2025


================
@@ -19,6 +21,15 @@ qc.e.bgeui x8, 12, foo
 # RELOC: R_RISCV_JAL foo 0x0
 # INSTR: qc.e.bgeui s0, 12, foo
 
+# Check that we print the correct relocations in exact mode
+.option exact
+qc.e.bgeui x8, 12, foo
+# RELOC: R_RISCV_VENDOR QUALCOMM 0x0
----------------
MaskRay wrote:

For relocation generation testing we should use llvm-objdump -dr to test r_offset and test that we don't incorrectly emit redundant relocations. See Sparc/Relocations/relocation-specifier.s for a modern example using llvm-objdump -dr

Looks like R_RISCV_VENDOR is only generated with `exact`. We should test that without `exact` there is no `QUALCOMM`. This is unclear from the PR description.



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


More information about the llvm-commits mailing list