3 // RUN
: llvm-mc
-filetype
=obj
-triple
=powerpc64le-unknown-linux
%s
-o
%t.o
4 // RUN
: llvm-mc
-filetype
=obj
-triple
=powerpc64le-unknown-linux
%p
/Inputs
/shared-ppc64.s
-o
%t2.o
5 // RUN
: llvm-mc
-filetype
=obj
-triple
=powerpc64le-unknown-linux
%p
/Inputs
/ppc64-func.s
-o
%t3.o
6 // RUN
: ld.lld
-shared
-soname
=t2.so
%t2.o
-o
%t2.so
7 // RUN
: ld.lld
%t.o
%t2.so
%t3.o
-o
%t
8 // RUN
: llvm-objdump
-d
--no-show-raw-insn
%t | FileCheck
%s
10 // RUN
: llvm-mc
-filetype
=obj
-triple
=powerpc64-unknown-linux
%s
-o
%t.o
11 // RUN
: llvm-mc
-filetype
=obj
-triple
=powerpc64-unknown-linux
%p
/Inputs
/shared-ppc64.s
-o
%t2.o
12 // RUN
: llvm-mc
-filetype
=obj
-triple
=powerpc64-unknown-linux
%p
/Inputs
/ppc64-func.s
-o
%t3.o
13 // RUN
: ld.lld
-shared
-soname
=t2.so
%t2.o
-o
%t2.so
14 // RUN
: ld.lld
%t.o
%t2.so
%t3.o
-o
%t
15 // RUN
: llvm-objdump
-d
--no-show-raw-insn
%t | FileCheck
%s
24 # Calling external function foo in a shared object needs a nop.
25 # Calling local function bar_local doe not need a nop.
31 // CHECK-LABEL
: <_start
>:
32 // CHECK-NEXT
: 100102c8
: bl 0x10010310
33 // CHECK-NEXT
: 100102cc
: ld 2, 24(1)
34 // CHECK-NEXT
: 100102d0
: bl 0x100102c0
37 # Calling a function in another object file which will have same
38 # TOC base does not need a nop. If nop present, do not rewrite to
45 // CHECK-LABEL
: <_diff_object
>:
46 // CHECK-NEXT
: 100102d4
: bl 0x100102f0
47 // CHECK-NEXT
: 100102d8
: bl 0x100102f0
48 // CHECK-NEXT
: 100102dc
: nop
50 # Branching to a local function does not need a nop
54 // CHECK-LABEL
: <noretbranch
>:
55 // CHECK-NEXT
: 100102e0
: b 0x100102c0
58 // This should come last to check the end-of-buffer condition.
63 // CHECK-LABEL
: <last
>:
64 // CHECK-NEXT
: 100102e4
: bl 0x10010310
65 // CHECK-NEXT
: 100102e8
: ld 2, 24(1)