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 7 8.long foo 9 10call foo 11# RELOC: R_RISCV_CALL foo 0x0 12# INSTR: auipc ra, 0 13# INSTR: jalr ra 14# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call 15call bar 16# RELOC: R_RISCV_CALL bar 0x0 17# INSTR: auipc ra, 0 18# INSTR: jalr ra 19# FIXUP: fixup A - offset: 0, value: bar, kind: fixup_riscv_call 20 21# Ensure that calls to functions whose names coincide with register names work. 22 23call zero 24# RELOC: R_RISCV_CALL zero 0x0 25# INSTR: auipc ra, 0 26# INSTR: jalr ra 27# FIXUP: fixup A - offset: 0, value: zero, kind: fixup_riscv_call 28 29call f1 30# RELOC: R_RISCV_CALL f1 0x0 31# INSTR: auipc ra, 0 32# INSTR: jalr ra 33# FIXUP: fixup A - offset: 0, value: f1, kind: fixup_riscv_call 34 35call ra 36# RELOC: R_RISCV_CALL ra 0x0 37# INSTR: auipc ra, 0 38# INSTR: jalr ra 39# FIXUP: fixup A - offset: 0, value: ra, kind: fixup_riscv_call 40