[llvm] [RISCV] Add symbol parsing support for the Xqcibi branch immediate instructions (PR #134233)

Sudharsan Veeravalli via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 3 04:22:11 PDT 2025


================
@@ -0,0 +1,44 @@
+# RUN: llvm-mc -triple riscv32 -mattr=+experimental-xqcibi %s -show-encoding \
+# RUN:     | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcibi %s -o %t.o
+# RUN: llvm-readobj -r %t.o | FileCheck -check-prefix=RELOC %s
+
+# Check prefixes:
+# RELOC - Check the relocation in the object.
+# FIXUP - Check the fixup on the instruction.
+# INSTR - Check the instruction is handled properly by the ASMPrinter.
+
+.text
+
+# Check that branch to an undefined symbol is handled
+# FIXME: This should be relaxed to an inverse  branch and jump
----------------
svs-quic wrote:

I will be adding support for relaxing potentially out of range branches in a follow-up patch.

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


More information about the llvm-commits mailing list