brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 7e7a29d Raw
57 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.long foo7 8call foo9# RELOC: R_RISCV_CALL_PLT foo 0x010# INSTR: auipc ra, 011# INSTR: jalr  ra12call bar13# RELOC: R_RISCV_CALL_PLT bar 0x014# INSTR: auipc ra, 015# INSTR: jalr  ra16 17# Ensure that calls to functions whose names coincide with register names work.18 19call zero20# RELOC: R_RISCV_CALL_PLT zero 0x021# INSTR: auipc ra, 022# INSTR: jalr  ra23 24call f125# RELOC: R_RISCV_CALL_PLT f1 0x026# INSTR: auipc ra, 027# INSTR: jalr  ra28 29call ra30# RELOC: R_RISCV_CALL_PLT ra 0x031# INSTR: auipc ra, 032# INSTR: jalr  ra33 34call mstatus35# RELOC: R_RISCV_CALL_PLT mstatus 0x036# INSTR: auipc ra, 037# INSTR: jalr  ra38 39# Ensure that calls to procedure linkage table symbols work.40 41call foo@plt42# RELOC: R_RISCV_CALL_PLT foo 0x043# INSTR: auipc ra, 044# INSTR: jalr  ra45 46# Ensure that an explicit register operand can be parsed.47 48call a0, foo49# RELOC: R_RISCV_CALL_PLT foo 0x050# INSTR: auipc a0, 051# INSTR: jalr  a052 53call a0, foo@plt54# RELOC: R_RISCV_CALL_PLT foo 0x055# INSTR: auipc a0, 056# INSTR: jalr  a057