33 lines · plain
1# REQUIRES: riscv2# RUN: rm -rf %t && split-file %s %t && cd %t3# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+c,+relax a.s -o a.o4# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=-c,+relax b.s -o b.o5 6# RUN: ld.lld a.o b.o --shared -o a -Ttext=0x100007# RUN: llvm-objdump -d --no-show-raw-insn -M no-aliases a | FileCheck %s8 9## This needs to be a *uncompressed* jal instruction since it came from the10## source file which does not enable C11# CHECK-LABEL: <foo>:12# CHECK-NEXT: 10000: jal zero, {{.*}} <foo>13# CHECK-NEXT: 10004: sub zero, zero, zero14 15# w/ C16#--- a.s17 .text18 .attribute 4, 1619 .attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"20 21# w/o C22#--- b.s23 .text24 .attribute 4, 1625 .attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_zicsr2p0_zifencei2p0"26 .p2align 527 .type foo,@function28foo:29 tail foo30 # Pick a non-canonical nop to ensure test output can't be confused31 # with riscv_align padding32 sub zero, zero, zero33