aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-sparc/vxworks1-lib.s
blob: e1221a22153b986722004054ff7edcdff4e04775 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
	.text
	.globl	foo
	.type	foo, %function
foo:
	save	%sp, -104, %sp
	sethi	%hi(__GOTT_BASE__), %l7
	ld	[%l7+%lo(__GOTT_BASE__)],%l7
	ld	[%l7+%lo(__GOTT_INDEX__)],%l7
	sethi	%hi(x), %g1
	or	%g1, %lo(x), %g1
	ld	[%l7+%g1], %g1
	ld	[%g1], %g2
	add	%g2, 1, %g2

	call	slocal, 0
	st	%g2, [%g1]

	call	sexternal, 0
	nop

	call	sexternal, 0
	nop

	ret
	restore
	.size	foo, .-foo

	.type	slocal, %function
slocal:
	retl
	nop
	.size	slocal, .-slocal

	.globl	sglobal
	.type	sglobal, %function
sglobal:
	retl
	nop
	.size	sglobal, .-sglobal

	.data
	.4byte	slocal

	.comm	x,4,4