[llvm] [RISCV] Vendor Relocations for Xqci extension (PR #135400)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Sun May 18 17:05:39 PDT 2025
================
@@ -1,46 +1,72 @@
-# RUN: llvm-mc -triple riscv32 -mattr=+experimental-xqcilb %s -show-encoding \
-# RUN: | FileCheck -check-prefix=INSTR %s
-# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcilb %s -o %t.o
-# RUN: llvm-readobj -r %t.o | FileCheck -check-prefix=RELOC %s
+# RUN: llvm-mc -triple riscv32 -mattr=+experimental-xqcilb %s \
+# RUN: | FileCheck -check-prefix=ASM %s
+# RUN: llvm-mc -triple riscv32 -mattr=+experimental-xqcilb %s \
+# RUN: -filetype=obj -o - \
+# RUN: | llvm-objdump -dr --mattr=+experimental-xqcilb - \
+# RUN: | FileCheck -check-prefix=OBJ %s
-# Check prefixes:
-# RELOC - Check the relocation in the object.
-# INSTR - Check the instruction is handled properly by the ASMPrinter.
-
-.text
+## This test checks that we emit the right relocations for Xqcilb
+## relative jumps. These can be resolved within the same section
----------------
lenary wrote:
Yeah, I think these always need a relocation. I forgot these are to the PLT, was just focussed on them being pc-relative.
I don't think I found the LLVM code to always emit the relocation (that I expect for call_plt), i will look over it all again.
https://github.com/llvm/llvm-project/pull/135400
More information about the llvm-commits
mailing list