38 lines · plain
1# RUN: llvm-mc --triple=riscv32 -mattr=+relax,+experimental-xqcili \2# RUN: %s -filetype=obj -o - -riscv-add-build-attributes \3# RUN: | llvm-objdump -dr -M no-aliases - \4# RUN: | FileCheck %s5 6## This tests that we correctly emit relocations for linker relaxation when7## emitting `QC.E.LI` and `QC.LI`.8 9 .section .text.ex1, "ax", @progbits10# CHECK-LABEL: <.text.ex1>:11 blez a1, .L112# CHECK-NEXT: bge zero, a1, 0x0 <.text.ex1>13# CHECK-NEXT: R_RISCV_BRANCH .L1{{$}}14 qc.e.li a0, sym15# CHECK-NEXT: qc.e.li a0, 0x016# CHECK-NEXT: R_RISCV_VENDOR QUALCOMM{{$}}17# CHECK-NEXT: R_RISCV_CUSTOM194 sym{{$}}18# CHECK-NEXT: R_RISCV_RELAX *ABS*{{$}}19.L1:20# CHECK: <.L1>:21 ret22# CHECK-NEXT: c.jr ra23 24 .section .text.ex2, "ax", @progbits25# CHECK-LABEL: <.text.ex2>:26 blez a1, .L227# CHECK-NEXT: bge zero, a1, 0x0 <.text.ex2>28# CHECK-NEXT: R_RISCV_BRANCH .L2{{$}}29 qc.li a0, %qc.abs20(sym)30# CHECK-NEXT: qc.li a0, 0x031# CHECK-NEXT: R_RISCV_VENDOR QUALCOMM{{$}}32# CHECK-NEXT: R_RISCV_CUSTOM192 sym{{$}}33# CHECK-NEXT: R_RISCV_RELAX *ABS*{{$}}34.L2:35# CHECK: <.L2>:36 ret37# CHECK-NEXT: c.jr ra38