brintos

brintos / llvm-project-archived public Read only

0
0
Text · 950 B · 3cc10bb Raw
25 lines · plain
1# RUN: not llvm-mc -filetype=obj -triple=riscv32 -mattr=+relax %s -o /dev/null 2>&1 | FileCheck %s2# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=-relax %s | llvm-objdump -d - | FileCheck %s --check-prefix=NORELAX3 4# Check the assembler rejects hi and lo expressions with constant expressions5# involving labels when diff expressions are emitted as relocation pairs.6# Test case derived from test/MC/Mips/hilo-addressing.s7 8# NORELAX:      lui t0, 0x09# NORELAX-NEXT: lw ra, 0x8(t0)10# NORELAX:      lui t1, 0x011# NORELAX-NEXT: lw sp, -0x8(t1)12 13tmp1:14tmp2:15# CHECK: :[[#@LINE+1]]:[[#]]: error: expected relocatable expression16  lui t0, %hi(tmp3-tmp1)17# CHECK: :[[#@LINE+1]]:[[#]]: error: expected relocatable expression18  lw ra, %lo(tmp3-tmp1)(t0)19 20tmp3:21# CHECK: :[[#@LINE+1]]:[[#]]: error: expected relocatable expression22  lui t1, %hi(tmp2-tmp3)23# CHECK: :[[#@LINE+1]]:[[#]]: error: expected relocatable expression24  lw sp, %lo(tmp2-tmp3)(t1)25