[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / mips-npic-call-pic-os.s
blob98925c19b8d18a625f127581dabf72749ad93eb7
1 # REQUIRES: mips
2 # Check LA25 stubs creation with caller in different Output Section to callee.
3 # This stub code is necessary when non-PIC code calls PIC function.
5 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
6 # RUN: %p/Inputs/mips-fpic.s -o %t-fpic.o
7 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
8 # RUN: %p/Inputs/mips-fnpic.s -o %t-fnpic.o
9 # RUN: ld.lld -r %t-fpic.o %t-fnpic.o -o %t-sto-pic.o
10 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
11 # RUN: %p/Inputs/mips-pic.s -o %t-pic.o
12 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t-npic.o
13 # RUN: ld.lld %t-npic.o %t-pic.o %t-sto-pic.o -o %t.exe
14 # RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t.exe | FileCheck %s
16 # CHECK: Disassembly of section .text:
17 # CHECK-EMPTY:
18 # CHECK-NEXT: <__LA25Thunk_foo1a>:
19 # CHECK-NEXT: lui $25, 0x2
20 # CHECK-NEXT: j {{.*}} <foo1a>
21 # CHECK-NEXT: addiu $25, $25, {{.*}}
23 # CHECK: <__LA25Thunk_foo1b>:
24 # CHECK-NEXT: lui $25, 0x2
25 # CHECK-NEXT: j {{.*}} <foo1b>
26 # CHECK-NEXT: addiu $25, $25, {{.*}}
28 # CHECK: <foo1a>:
29 # CHECK-NEXT: nop
31 # CHECK: <foo1b>:
32 # CHECK-NEXT: nop
34 # CHECK: <__LA25Thunk_foo2>:
35 # CHECK-NEXT: lui $25, 0x2
36 # CHECK-NEXT: j {{.*}} <foo2>
37 # CHECK-NEXT: addiu $25, $25, {{.*}}
39 # CHECK: <foo2>:
40 # CHECK-NEXT: nop
42 # CHECK: <__LA25Thunk_fpic>:
43 # CHECK-NEXT: lui $25, 0x2
44 # CHECK-NEXT: j {{.*}} <fpic>
45 # CHECK-NEXT: addiu $25, $25, {{.*}}
47 # CHECK: <fpic>:
48 # CHECK-NEXT: nop
50 # CHECK: <fnpic>:
51 # CHECK-NEXT: nop
52 # CHECK-EMPTY:
53 # CHECK-NEXT: Disassembly of section .differentos:
54 # CHECK-EMPTY:
55 # CHECK-NEXT: <__start>:
56 # CHECK-NEXT: jal {{.*}} <__LA25Thunk_foo1a>
57 # CHECK-NEXT: nop
58 # CHECK-NEXT: jal {{.*}} <__LA25Thunk_foo2>
59 # CHECK-NEXT: nop
60 # CHECK-NEXT: jal {{.*}} <__LA25Thunk_foo1b>
61 # CHECK-NEXT: nop
62 # CHECK-NEXT: jal {{.*}} <__LA25Thunk_foo2>
63 # CHECK-NEXT: nop
64 # CHECK-NEXT: jal {{.*}} <__LA25Thunk_fpic>
65 # CHECK-NEXT: nop
66 # CHECK-NEXT: jal {{.*}} <fnpic>
68 .section .differentos, "ax", %progbits
69 .globl __start
70 __start:
71 jal foo1a
72 jal foo2
73 jal foo1b
74 jal foo2
75 jal fpic
76 jal fnpic