Typo fix in most recent entry.
[binutils.git] / ld / testsuite / ld-mips-elf / tlsbin-o32.s
blob8ff9831cf58376e985b797eca9381f5599a074ae
1 .file 1 "tlsbin-o32.s"
2 .abicalls
3 .text
4 .align 2
5 .globl __start
6 .ent __start
7 .type __start,@function
8 __start:
9 .frame $fp,16,$31
10 .mask 0x40000000,-8
11 .fmask 0x00000000,0
12 .set noreorder
13 .cpload $25
14 .set reorder
15 addiu $sp,$sp,-16
16 sw $fp,8($sp)
17 move $fp,$sp
18 .cprestore 0
20 # General Dynamic
21 lw $25,%call16(__tls_get_addr)($28)
22 addiu $4,$28,%tlsgd(tlsvar_gd)
23 jal $25
25 # Local Dynamic
26 lw $25,%call16(__tls_get_addr)($28)
27 addiu $4,$28,%tlsldm(tlsvar_ld)
28 jal $25
30 move $2,$2 # Arbitrary instructions
32 lui $3,%dtprel_hi(tlsvar_ld)
33 addiu $3,$3,%dtprel_lo(tlsvar_ld)
34 addu $3,$3,$2
36 # Initial Exec
37 .set push
38 .set mips32r2
39 rdhwr $2, $5
40 .set pop
41 lw $3,%gottprel(tlsvar_ie)($28)
42 addu $3,$3,$2
44 # Local Exec
45 .set push
46 .set mips32r2
47 rdhwr $2, $5
48 .set pop
49 lui $3,%tprel_hi(tlsvar_le)
50 addiu $3,$3,%tprel_lo(tlsvar_le)
51 addu $3,$3,$2
53 move $sp,$fp
54 lw $fp,8($sp)
55 addiu $sp,$sp,16
56 j $31
57 .end __start
59 .globl __tls_get_addr
60 __tls_get_addr:
61 j $31
63 .section .tbss,"awT",@nobits
64 .align 2
65 .global tlsvar_gd
66 .type tlsvar_gd,@object
67 .size tlsvar_gd,4
68 tlsvar_gd:
69 .space 4
70 .global tlsvar_ie
71 .type tlsvar_ie,@object
72 .size tlsvar_ie,4
73 tlsvar_ie:
74 .space 4
76 .section .tdata,"awT"
77 .align 2
78 .global tlsvar_ld
79 .hidden tlsvar_ld
80 .type tlsvar_ld,@object
81 .size tlsvar_ld,4
82 tlsvar_ld:
83 .word 1
84 .global tlsvar_le
85 .hidden tlsvar_le
86 .type tlsvar_le,@object
87 .size tlsvar_le,4
88 tlsvar_le:
89 .word 1