1 # RUN: llvm-mc -triple riscv32 -mattr=+c -riscv-no-aliases < %s -show-encoding \
2 # RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
3 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c < %s \
4 # RUN: | llvm-readobj -r | FileCheck -check-prefix=RELOC %s
5 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,+relax < %s \
6 # RUN: | llvm-readobj -r | FileCheck -check-prefix=RELOC %s
9 # RELOC - Check the relocation in the object.
10 # FIXUP - Check the fixup on the instruction.
11 # INSTR - Check the instruction is handled properly by the ASMPrinter
13 # A compressed jump (c.j) to an unresolved symbol will be relaxed to a (jal).
16 # FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_rvc_jump
19 # A compressed branch (c.bnez) to an unresolved symbol will be relaxed to a (bnez).
20 # RELOC: R_RISCV_BRANCH
21 # INSTR: c.bnez a0, foo
22 # FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_rvc_branch