1 # RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
2 # RUN: | llvm-objdump -d - | FileCheck -check-prefix=INSTR %s
3 # RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
4 # RUN: | llvm-readobj -r | FileCheck -check-prefix=RELOC %s
5 # RUN: llvm-mc -triple riscv32 < %s -show-encoding \
6 # RUN: | FileCheck -check-prefix=FIXUP %s
11 # RELOC: R_RISCV_CALL foo 0x0
14 # FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call
16 # RELOC: R_RISCV_CALL bar 0x0
19 # FIXUP: fixup A - offset: 0, value: bar, kind: fixup_riscv_call
21 # Ensure that calls to functions whose names coincide with register names work.
24 # RELOC: R_RISCV_CALL zero 0x0
27 # FIXUP: fixup A - offset: 0, value: zero, kind: fixup_riscv_call
30 # RELOC: R_RISCV_CALL f1 0x0
33 # FIXUP: fixup A - offset: 0, value: f1, kind: fixup_riscv_call
36 # RELOC: R_RISCV_CALL ra 0x0
39 # FIXUP: fixup A - offset: 0, value: ra, kind: fixup_riscv_call
42 # RELOC: R_RISCV_CALL mstatus 0x0
45 # FIXUP: fixup A - offset: 0, value: mstatus, kind: fixup_riscv_call
47 # Ensure that calls to procedure linkage table symbols work.
50 # RELOC: R_RISCV_CALL_PLT foo 0x0
53 # FIXUP: fixup A - offset: 0, value: foo@plt, kind: fixup_riscv_call_plt
55 # Ensure that an explicit register operand can be parsed.
58 # RELOC: R_RISCV_CALL foo 0x0
61 # FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call
64 # RELOC: R_RISCV_CALL_PLT foo 0x0
67 # FIXUP: fixup A - offset: 0, value: foo@plt, kind: fixup_riscv_call_plt