[X86][MC,LLD][NFC] Rename R_X86_64_REX2_GOTPCRELX (#116737)
[llvm-project.git] / llvm / test / MC / RISCV / hilo-constaddr-expr.s
blob8dc38702a24720a7f0b1cc24486082d838b63381
1 # RUN: not llvm-mc -filetype=obj -triple=riscv32 -mattr=+relax %s -o /dev/null 2>&1 | FileCheck %s
2 # RUN: not llvm-mc -filetype=obj -triple=riscv32 -mattr=-relax %s -o /dev/null 2>&1 | FileCheck %s
4 # Check the assembler rejects hi and lo expressions with constant expressions
5 # involving labels when diff expressions are emitted as relocation pairs.
6 # Test case derived from test/MC/Mips/hilo-addressing.s
8 tmp1:
9 tmp2:
10 # CHECK: :[[#@LINE+1]]:[[#]]: error: expected relocatable expression
11 lui t0, %hi(tmp3-tmp1)
12 # CHECK: :[[#@LINE+1]]:[[#]]: error: expected relocatable expression
13 lw ra, %lo(tmp3-tmp1)(t0)
15 tmp3:
16 # CHECK: :[[#@LINE+1]]:[[#]]: error: expected relocatable expression
17 lui t1, %hi(tmp2-tmp3)
18 # CHECK: :[[#@LINE+1]]:[[#]]: error: expected relocatable expression
19 lw sp, %lo(tmp2-tmp3)(t1)