67 lines · plain
1# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \2# RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR %s3# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \4# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s5 6# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \7# RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR %s8# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \9# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s10 11# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-zicfilp < %s \12# RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR-ZICFILP %s13# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-zicfilp < %s \14# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s15 16# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+experimental-zicfilp < %s \17# RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR-ZICFILP %s18# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+experimental-zicfilp < %s \19# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s20 21.long foo22 23tail foo24# RELOC: R_RISCV_CALL_PLT foo 0x025# INSTR: auipc t1, 026# INSTR: jr t127# INSTR-ZICFILP: auipc t2, 028# INSTR-ZICFILP: jr t229 30tail bar31# RELOC: R_RISCV_CALL_PLT bar 0x032# INSTR: auipc t1, 033# INSTR: jr t134# INSTR-ZICFILP: auipc t2, 035# INSTR-ZICFILP: jr t236 37# Ensure that tail calls to functions whose names coincide with register names38# work.39 40tail zero41# RELOC: R_RISCV_CALL_PLT zero 0x042# INSTR: auipc t1, 043# INSTR: jr t144# INSTR-ZICFILP: auipc t2, 045# INSTR-ZICFILP: jr t246 47tail f148# RELOC: R_RISCV_CALL_PLT f1 0x049# INSTR: auipc t1, 050# INSTR: jr t151# INSTR-ZICFILP: auipc t2, 052# INSTR-ZICFILP: jr t253 54tail ra55# RELOC: R_RISCV_CALL_PLT ra 0x056# INSTR: auipc t1, 057# INSTR: jr t158# INSTR-ZICFILP: auipc t2, 059# INSTR-ZICFILP: jr t260 61tail foo@plt62# RELOC: R_RISCV_CALL_PLT foo 0x063# INSTR: auipc t1, 064# INSTR: jr t165# INSTR-ZICFILP: auipc t2, 066# INSTR-ZICFILP: jr t267