Typo fix in most recent entry.
[binutils.git] / ld / testsuite / ld-powerpc / tls32.s
blob1c3092d5d2ee95e6c296c0f2897dfb706a20a287
1 .section ".tbss","awT",@nobits
2 .global _start,gd0,ld0,ld1,ld2,ie0,le0,le1
3 .align 2
4 gd0: .space 4
5 ld0: .space 4
6 ld1: .space 4
7 ld2: .space 4
8 ie0: .space 4
9 le0: .space 4
10 le1: .space 4
12 .section ".tdata","awT",@progbits
13 .align 2
14 gd4: .long 0x12345678
15 ld4: .long 0x23456789
16 ld5: .long 0x3456789a
17 ld6: .long 0x456789ab
18 ie4: .long 0x56789abc
19 le4: .long 0x6789abcd
20 le5: .long 0x789abcde
22 .text
23 _start:
24 #extern syms
25 #GD
26 addi 3,31,gd@got@tlsgd #R_PPC_GOT_TLSGD16 gd
27 bl __tls_get_addr #R_PPC_REL24 __tls_get_addr
29 #LD
30 addi 3,31,ld@got@tlsld #R_PPC_GOT_TLSLD16 ld
31 bl __tls_get_addr #R_PPC_REL24 __tls_get_addr
33 #global syms
34 #GD
35 addi 3,31,gd0@got@tlsgd #R_PPC_GOT_TLSGD16 gd0
36 bl __tls_get_addr+0x8000@plt #R_PPC_PLTREL24 __tls_get_addr
38 #LD
39 addi 3,31,ld0@got@tlsld #R_PPC_GOT_TLSLD16 ld0
40 bl __tls_get_addr+0x8000@plt #R_PPC_PLTREL24 __tls_get_addr
42 addi 9,3,ld0@dtprel #R_PPC_DTPREL16 ld0
44 addis 9,3,ld1@dtprel@ha #R_PPC_DTPREL16_HA ld1
45 lwz 10,ld1@dtprel@l(9) #R_PPC_DTPREL16_LO ld1
47 #IE
48 lwz 9,ie0@got@tprel(31) #R_PPC_GOT_TPREL16 ie0
49 lhzx 10,9,ie0@tls #R_PPC_TLS ie0
51 #LE
52 lbz 10,le0@tprel(2) #R_PPC_TPREL16 le0
54 addis 9,2,le1@tprel@ha #R_PPC_TPREL16_HA le1
55 stb 10,le1@tprel@l(9) #R_PPC_TPREL16_LO le1
57 #local syms, use a different got reg too.
58 #GD
59 addi 3,30,gd4@got@tlsgd #R_PPC_GOT_TLSGD16 gd4
60 bl __tls_get_addr #R_PPC_REL24 __tls_get_addr
62 #LD
63 addi 3,30,ld4@got@tlsld #R_PPC_GOT_TLSLD16 ld4
64 bl __tls_get_addr #R_PPC_REL24 __tls_get_addr
66 stw 10,ld4@dtprel(3) #R_PPC_DTPREL16 ld4
68 addis 9,3,ld5@dtprel@ha #R_PPC_DTPREL16_HA ld5
69 stw 10,ld5@dtprel@l(9) #R_PPC_DTPREL16_LO ld5
71 #IE
72 lwz 9,ie0@got@tprel(30) #R_PPC_GOT_TPREL16 ie4
73 sthx 10,9,ie0@tls #R_PPC_TLS ie4
75 #LE
76 lhz 10,le4@tprel(2) #R_PPC_TPREL16 le4
78 addis 9,2,le5@tprel@ha #R_PPC_TPREL16_HA le5
79 lha 10,le5@tprel@l(9) #R_PPC_TPREL16_LO le5