3 # RUN: llvm-mc --filetype=obj --triple=loongarch32-unknown-elf %s -o %t.la32.o
4 # RUN: llvm-mc --filetype=obj --triple=loongarch64-unknown-elf %s -o %t.la64.o
6 # RUN: ld.lld %t.la32.o -o %t.la32
7 # RUN: ld.lld %t.la64.o -o %t.la64
8 # RUN: llvm-objdump -d --no-show-raw-insn %t.la32 | FileCheck %s
9 # RUN: llvm-objdump -d --no-show-raw-insn %t.la64 | FileCheck %s
10 # CHECK: pcalau12i $t0, -1
11 # CHECK-NEXT: jirl $ra, $t0, 564
12 # CHECK-NEXT: pcalau12i $t0, 0
13 # CHECK-NEXT: jirl $zero, $t0, -1348
15 ## PLT shouldn't get generated in this case.
16 # CHECK-NOT: Disassembly of section .plt:
34 ## The nops are for pushing the relocs off page boundary, to better see the
35 ## page-aligned semantics in action.
39 pcalau12i $t0
, %pc_hi20
(foo
)
40 jirl $ra
, $t0
, %pc_lo12
(foo
)
41 pcalau12i $t0
, %pc_hi20
(bar
)
42 jirl $zero
, $t0
, %pc_lo12
(bar
)