[llvm] [RISCV] Support Parsing Nonstandard Relocations (PR #119909)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 04:09:18 PST 2024


================
@@ -33,3 +33,20 @@
   nop
   # CHECK-ASM: nop
   # CHECK-OBJ: addi zero, zero, 0x0
+
+  .reloc ., R_RISCV_VENDOR,    QUALCOMM
+  .reloc ., R_RISCV_QC_LO20_U, my_bar + 2
+  addi a1, a1, 0
+  # CHECK-ASM: [[L3:.L[^:]+]]:
+  # CHECK-ASM-NEXT: .reloc [[L3]], R_RISCV_VENDOR, QUALCOMM
+  # CHECK-ASM-NEXT: [[L4:.L[^:]+]]:
+  # CHECK-ASM-NEXT: .reloc [[L4]], R_RISCV_QC_LO20_U, my_bar+2
----------------
lenary wrote:

The assembly streamer here just re-emits the string which it was passed from the directive parser in the call. I don't know if we want to do anything to normalise this into `R_RISCV_CUSTOM<n>` - it's a possibility.

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


More information about the llvm-commits mailing list