2 # RUN: rm -rf %t && split-file %s %t && cd %t
4 # RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=+relax a.s -o rv32.o
5 # RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=+relax a.s -o rv64.o
6 # RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=+relax a.s -o rv64-pie.o
8 # RUN: ld.lld --relax-gp --undefined=__global_pointer$ rv32.o lds -pie -o rv32
9 # RUN: ld.lld --relax-gp --undefined=__global_pointer$ rv64.o lds -shared -o rv64
10 # RUN: llvm-objdump -td -M no-aliases --no-show-raw-insn rv32 | FileCheck %s
11 # RUN: llvm-objdump -td -M no-aliases --no-show-raw-insn rv64 | FileCheck %s
13 # CHECK: lui a0, 0x200
14 # CHECK-NEXT: addi a0, a0, 0x1
15 # CHECK-NEXT: lw a0, 0x1(a0)
16 # CHECK-NEXT: sw a0, 0x1(a0)