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
8 # RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
9 # RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR %s
10 # RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
11 # RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
12 # RUN: llvm-mc -triple riscv64 < %s -show-encoding \
13 # RUN: | FileCheck -check-prefix=FIXUP %s
15 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-zicfilp < %s \
16 # RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR-ZICFILP %s
17 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-zicfilp < %s \
18 # RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
19 # RUN: llvm-mc -triple riscv32 -mattr=+experimental-zicfilp < %s -show-encoding \
20 # RUN: | FileCheck -check-prefix=FIXUP %s
22 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+experimental-zicfilp < %s \
23 # RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR-ZICFILP %s
24 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+experimental-zicfilp < %s \
25 # RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
26 # RUN: llvm-mc -triple riscv64 -mattr=+experimental-zicfilp < %s -show-encoding \
27 # RUN: | FileCheck -check-prefix=FIXUP %s
32 # RELOC: R_RISCV_CALL_PLT foo 0x0
35 # INSTR-ZICFILP: auipc t2, 0
36 # INSTR-ZICFILP: jr t2
37 # FIXUP: fixup A - offset: 0, value: foo, kind:
40 # RELOC: R_RISCV_CALL_PLT bar 0x0
43 # INSTR-ZICFILP: auipc t2, 0
44 # INSTR-ZICFILP: jr t2
45 # FIXUP: fixup A - offset: 0, value: bar, kind:
47 # Ensure that tail calls to functions whose names coincide with register names
51 # RELOC: R_RISCV_CALL_PLT zero 0x0
54 # INSTR-ZICFILP: auipc t2, 0
55 # INSTR-ZICFILP: jr t2
56 # FIXUP: fixup A - offset: 0, value: zero, kind:
59 # RELOC: R_RISCV_CALL_PLT f1 0x0
62 # INSTR-ZICFILP: auipc t2, 0
63 # INSTR-ZICFILP: jr t2
64 # FIXUP: fixup A - offset: 0, value: f1, kind:
67 # RELOC: R_RISCV_CALL_PLT ra 0x0
70 # INSTR-ZICFILP: auipc t2, 0
71 # INSTR-ZICFILP: jr t2
72 # FIXUP: fixup A - offset: 0, value: ra, kind:
75 # RELOC: R_RISCV_CALL_PLT foo 0x0
78 # INSTR-ZICFILP: auipc t2, 0
79 # INSTR-ZICFILP: jr t2
80 # FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call_plt