36 lines · plain
1## Test that non-relaxable edges have their offset adjusted by relaxation2 3# RUN: rm -rf %t && mkdir %t && cd %t4 5# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+relax %s -o %t.rv326# RUN: llvm-jitlink -noexec \7# RUN: -slab-allocate 100Kb -slab-address 0x0 -slab-page-size 4096 \8# RUN: -check %s %t.rv329 10# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+relax %s -o %t.rv6411# RUN: llvm-jitlink -noexec \12# RUN: -slab-allocate 100Kb -slab-address 0x0 -slab-page-size 4096 \13# RUN: -check %s %t.rv6414 15 .globl main,nonrelaxable,nonrelaxable_target16 .size nonrelaxable, 417 .size nonrelaxable_target, 418main:19 call f20nonrelaxable:21 ## Non-relaxable R_RISCV_BRANCH edge after a relaxable R_RISCV_CALL edge.22 ## Even though this edge isn't relaxable, its offset should still be23 ## adjusted.24 beq zero, zero, nonrelaxable_target25nonrelaxable_target:26 ret27 .size main, .-main28 29 .globl f30f:31 ret32 .size f, .-f33 34# jitlink-check: decode_operand(nonrelaxable, 2) = (nonrelaxable_target - nonrelaxable)35 36