aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-csky/tls-gd-v1.s
blob: 617aac0899d8b6fe1629a465954034f519e98017 (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
	.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@TLSGD32
	addu	r2, r15
	jsr		r7
	ld.w	r2, (r2)
	ld.w	r15, (sp, 4)
	ld.w	gb, (sp)
	addi	sp, sp, 8
	jmp	r15