* config/tc-mips.c (append_insn): Correctly handle mips16 case
[binutils.git] / ld / testsuite / ld-mips-elf / tlslib-o32.s
blobc15829f509b77bf7d28692e7dd3276f9a708e8b1
1 .file 1 "tlslib-o32.s"
2 .abicalls
3 .text
4 .align 2
5 .globl fn
6 .ent fn
7 .type fn,@function
8 fn:
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 move $sp,$fp
45 lw $fp,8($sp)
46 addiu $sp,$sp,16
47 j $31
48 .end fn
50 .section .tbss,"awT",@nobits
51 .align 2
52 .global tlsvar_gd
53 .type tlsvar_gd,@object
54 .size tlsvar_gd,4
55 tlsvar_gd:
56 .space 4
57 .global tlsvar_ie
58 .type tlsvar_ie,@object
59 .size tlsvar_ie,4
60 tlsvar_ie:
61 .space 4
63 .section .tdata,"awT"
64 .align 2
65 .global tlsvar_ld
66 .hidden tlsvar_ld
67 .type tlsvar_ld,@object
68 .size tlsvar_ld,4
69 tlsvar_ld:
70 .word 1