18 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=riscv32 %s \2# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INSTR3 4# RUN: llvm-mc -filetype=obj -triple=riscv32 %s \5# RUN: | llvm-readobj -r - | FileCheck %s -check-prefix=CHECK-REL6 7# Check the assembler can handle hi and lo expressions with a constant8# address. Test case derived from test/MC/Mips/hilo-addressing.s9 10# Check that 1 is added to the high 20 bits if bit 11 of the low part is 1.11.equ addr, 0xdeadbeef12 lui t0, %hi(addr)13 lw ra, %lo(addr)(t0)14# CHECK-INSTR: lui t0, 0xdeadc15# CHECK-INSTR: lw ra, -0x111(t0)16 17# CHECK-REL-NOT: R_RISCV18