File: tls-o32.s

package info (click to toggle)
binutils 2.34-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 328,380 kB
  • sloc: ansic: 1,180,155; asm: 665,310; cpp: 130,540; exp: 69,822; makefile: 57,183; sh: 22,559; yacc: 14,469; lisp: 13,785; perl: 2,112; ada: 1,681; lex: 1,650; pascal: 1,446; cs: 879; sed: 195; python: 154; xml: 95; awk: 25
file content (85 lines) | stat: -rw-r--r-- 1,339 bytes parent folder | download | duplicates (39)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
	.file	1 "tls.s"
	.abicalls
	.text
	.align	2
	.globl	fn
	.ent	fn
	.type	fn,@function
fn:
	.frame	$fp,16,$31
	.mask	0x40000000,-8
	.fmask	0x00000000,0
	.set	noreorder
	.cpload $25
	.set	reorder
	addiu	$sp,$sp,-16
	sw	$fp,8($sp)
	move	$fp,$sp
	.cprestore	0

	# General Dynamic
	lw	$25,%call16(__tls_get_addr)($28)
	addiu	$4,$28,%tlsgd(tlsvar_gd)
	jal	$25

	# Local Dynamic
	lw	$25,%call16(__tls_get_addr)($28)
	addiu	$4,$28,%tlsldm(tlsvar_ld)
	jal	$25

	move	$2,$2		# Arbitrary instructions

	lui	$3,%dtprel_hi(tlsvar_ld)
	addiu	$3,$3,%dtprel_lo(tlsvar_ld)
	addu	$3,$3,$2

	# Initial Exec
	.set	push
	.set	mips32r2
	rdhwr	$2, $5
	.set	pop
	lw	$3,%gottprel(tlsvar_ie)($28)
	addu	$3,$3,$2

	# Local Exec
	.set	push
	.set	mips32r2
	rdhwr	$2, $5
	.set	pop
	lui	$3,%tprel_hi(tlsvar_le)
	ori	$3,$3,%tprel_lo(tlsvar_le)
	addu	$3,$3,$2

	move	$sp,$fp
	lw	$fp,8($sp)
	addiu	$sp,$sp,16
	j	$31
	.end	fn

	.section		.tbss,"awT",@nobits
	.align	2
	.global	tlsvar_gd
	.type	tlsvar_gd,@object
	.size	tlsvar_gd,4
tlsvar_gd:
	.space	4
	.global	tlsvar_ie
	.type	tlsvar_ie,@object
	.size	tlsvar_ie,4
tlsvar_ie:
	.space	4

	.section		.tdata,"awT"
	.align	2
	.global	tlsvar_ld
	.hidden	tlsvar_ld
	.type	tlsvar_ld,@object
	.size	tlsvar_ld,4
tlsvar_ld:
	.word	1
	.global	tlsvar_le
	.hidden	tlsvar_le
	.type	tlsvar_le,@object
	.size	tlsvar_le,4
tlsvar_le:
	.word	1