1// REQUIRES: ppc
2
3// RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o
4// RUN: ld.lld -shared %t.o -o %t.so
5// RUN: llvm-readelf -dyn-relocations %t.so | FileCheck %s
6
7// RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o
8// RUN: ld.lld -shared %t.o -o %t.so
9// RUN: llvm-readelf -dyn-relocations %t.so | FileCheck %s
10
11
12// CHECK-NOT: foo
13// CHECK-NOT: bar
14
15	.text
16	.abiversion 2
17	.globl	baz
18	.p2align	4
19	.type	baz,@function
20baz:
21.Lfunc_begin0:
22.Lfunc_gep0:
23	addis 2, 12, .TOC.-.Lfunc_gep0@ha
24	addi 2, 2, .TOC.-.Lfunc_gep0@l
25.Lfunc_lep0:
26	.localentry	baz, .Lfunc_lep0-.Lfunc_gep0
27	mflr 0
28	std 0, 16(1)
29	stdu 1, -64(1)
30	std 30, 48(1)
31	std 29, 40(1)
32	mr 30, 3
33	bl foo
34	mr 29, 3
35	mr 3, 30
36	bl bar
37	mullw 3, 3, 29
38	ld 30, 48(1)
39	ld 29, 40(1)
40	extsw 3, 3
41	addi 1, 1, 64
42	ld 0, 16(1)
43	mtlr 0
44	blr
45	.long	0
46	.quad	0
47.Lfunc_end0:
48	.size	baz, .Lfunc_end0-.Lfunc_begin0
49
50	.p2align	4
51	.type	foo,@function
52foo:
53.Lfunc_begin1:
54	mullw 3, 3, 3
55	extsw 3, 3
56	blr
57	.long	0
58	.quad	0
59.Lfunc_end1:
60	.size	foo, .Lfunc_end1-.Lfunc_begin1
61
62        .p2align	4
63	.type	bar,@function
64bar:
65.Lfunc_begin2:
66.Lfunc_gep2:
67	addis 2, 12, .TOC.-.Lfunc_gep2@ha
68	addi 2, 2, .TOC.-.Lfunc_gep2@l
69.Lfunc_lep2:
70	.localentry	bar, .Lfunc_lep2-.Lfunc_gep2
71	mflr 0
72	std 0, 16(1)
73	stdu 1, -48(1)
74	std 30, 32(1)
75	mr 30, 3
76	bl foo
77	mullw 3, 3, 30
78	ld 30, 32(1)
79	extsw 3, 3
80	addi 1, 1, 48
81	ld 0, 16(1)
82	mtlr 0
83	blr
84	.long	0
85	.quad	0
86.Lfunc_end2:
87	.size	bar, .Lfunc_end2-.Lfunc_begin2
88