[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / loongarch-pcala-lo12-jirl.s
blob1a03152aaa2afc40afff23422dd9aa39fd128282
1 # REQUIRES: loongarch
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:
18 .p2align 12
19 .org 0x234
20 .global foo
21 foo:
22 li.w $a0, 42
23 ret
25 .org 0xabc
26 .global bar
27 bar:
28 li.w $a7, 94
29 syscall 0
31 .org 0x1000
32 .global _start
33 _start:
34 ## The nops are for pushing the relocs off page boundary, to better see the
35 ## page-aligned semantics in action.
36 nop
37 nop
38 nop
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)