aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-csky/tls-ld-v1.s
blob: e0a8e76f7cfb756503698e324d16b76bb18be8eb (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
	.global	__tls_get_addr
	.text
	.align	2
	.global	foo
	.type	foo, @function
foo:
	subi	sp, sp, 8
	st.w	gb, (sp)
	st.w	r15, (sp, 4)
	bsr	.L2
.L2:
	lrw	gb, .L2@GOTPC
	addu	gb, gb, r15
	lrw	r7, __tls_get_addr@PLT
	addu	r7, r7, gb
	ld.w	r7, (r7)
	bsr	.LTLS0
.LTLS0:
	lrw	r2, var@TLSLDM32
	addu	r2, r15
	jsr		r7
	lrw	r7, var@TLSLDO32
	addu	r2, r2, r7
	ld.w	r15, (sp, 4)
	ld.w	gb, (sp)
	addi	sp, sp, 8
	jmp	r15
	.size	foo, .-foo
	.section	.tbss,"awT",@nobits
	.align	2
	.type	var, @object
	.size	var, 4
var:
	.fill 4, 1