fixed bash/dash/sh issue (Ubuntu)
[zpugcc/jano.git] / toolchain / binutils / ld / testsuite / ld-s390 / tlsbinpic_64.s
blobeaeff7351e94364aef94c2ce2db569fcb0f976fa
1 .section ".tdata", "awT", @progbits
2 .globl sg1, sg2, sg3, sg4, sg5, sg6, sg7, sg8
3 .globl sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
4 .hidden sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
5 .hidden sh1, sh2
6 sg1: .long 17
7 sg2: .long 18
8 sg3: .long 19
9 sg4: .long 20
10 sg5: .long 21
11 sg6: .long 22
12 sg7: .long 23
13 sg8: .long 24
14 sl1: .long 65
15 sl2: .long 66
16 sl3: .long 67
17 sl4: .long 68
18 sl5: .long 69
19 sl6: .long 70
20 sl7: .long 71
21 sl8: .long 72
22 sh1: .long 257
23 sh2: .long 258
24 sh3: .long 259
25 sh4: .long 260
26 sh5: .long 261
27 sh6: .long 262
28 sh7: .long 263
29 sh8: .long 264
30 .text
31 .globl fn2
32 .type fn2,@function
33 fn2:
34 /* Function prolog */
35 stmg %r6,%r14,48(%r15)
36 bras %r13,.LTN1
37 /* Literal pool */
38 .LT1:
39 .LC2:
40 .quad sG1@tlsgd
41 .LC3:
42 .quad sG2@tlsgd
43 .LC4:
44 .quad sg1@tlsgd
45 .LC5:
46 .quad sl1@tlsgd
47 .LC6:
48 .quad sh1@tlsgd
49 .LC7:
50 .quad sl1@tlsldm
51 .LC8:
52 .quad sl1@dtpoff
53 .LC9:
54 .quad sl2@dtpoff
55 .LC10:
56 .quad sh1@tlsldm
57 .LC11:
58 .quad sh1@dtpoff
59 .LC12:
60 .quad sh2@dtpoff
61 .LC13:
62 .quad sG2@gotntpoff
63 .LC14:
64 .quad sg1@gotntpoff
65 .LC15:
66 .quad sl1@gotntpoff
67 .LC16:
68 .quad sh1@gotntpoff
69 .LTN1:
70 /* Function prolog */
71 lgr %r14,%r15
72 aghi %r15,-160
73 larl %r12,_GLOBAL_OFFSET_TABLE_
74 stg %r14,0(%r14)
76 /* Extract TCB */
77 ear %r9,%a0
78 sllg %r9,%r4,32
79 ear %r9,%a1
81 /* GD -> IE because variable is not defined in executable */
82 lg %r12,.LC2-.LT1(%r13)
83 brasl %r14,__tls_get_offset@plt:tls_gdcall:sG1
84 la %r2,0(%r2,%r9)
86 /* GD -> IE because variable is not defined in executable where
87 the variable is referenced through IE too */
88 lg %r2,.LC3-.LT1(%r13)
89 brasl %r14,__tls_get_offset@plt:tls_gdcall:sG2
90 la %r2,0(%r2,%r9)
92 /* GD -> LE with global variable defined in executable */
93 lg %r2,.LC4-.LT1(%r13)
94 brasl %r14,__tls_get_offset@plt:tls_gdcall:sg1
95 la %r2,0(%r2,%r9)
97 /* GD -> LE with local variable defined in executable */
98 lg %r2,.LC5-.LT1(%r13)
99 brasl %r14,__tls_get_offset@plt:tls_gdcall:sl1
100 la %r2,0(%r2,%r9)
102 /* GD -> LE with hidden variable defined in executable */
103 lg %r2,.LC6-.LT1(%r13)
104 brasl %r14,__tls_get_offset@plt:tls_gdcall:sh1
105 la %r2,0(%r2,%r9)
107 /* LD -> LE */
108 lg %r2,.LC7-.LT1(%r13)
109 brasl %r14,__tls_get_offset@plt:tls_ldcall:sl1
110 la %r3,0(%r2,%r9)
111 lg %r4,.LC8-.LT1(%r13)
112 la %r5,0(%r4,%r3)
113 lg %r4,.LC9-.LT1(%r13)
114 la %r5,0(%r4,%r3)
116 /* LD -> LE against hidden variables */
117 lg %r2,.LC10-.LT1(%r13)
118 brasl %r14,__tls_get_offset@plt:tls_ldcall:sh1
119 la %r3,0(%r2,%r9)
120 lg %r4,.LC11-.LT1(%r13)
121 la %r5,0(%r4,%r3)
122 lg %r4,.LC12-.LT1(%r13)
123 la %r5,0(%r4,%r3)
125 /* IE against global var */
126 lg %r3,.LC13-.LT1(%r13)
127 lg %r3,0(%r3,%r12):tls_load:sG2
128 la %r3,0(%r3,%r9)
130 /* IE -> LE against global var defined in exec */
131 lg %r3,.LC14-.LT1(%r13)
132 lg %r4,0(%r3,%r12):tls_load:sg1
133 la %r5,0(%r4,%r9)
135 /* IE -> LE against local var */
136 lg %r3,.LC15-.LT1(%r13)
137 lg %r4,0(%r3,%r12):tls_load:sl2
138 la %r5,0(%r4,%r9)
140 /* IE -> LE against hidden var */
141 lg %r3,.LC16-.LT1(%r13)
142 lg %r4,0(%r3,%r12):tls_load:sh1
143 la %r5,0(%r4,%r9)
145 /* IE against global var with larl got access */
146 larl %r3,sG3@indntpoff
147 lg %r3,0(%r3,%r12):tls_load:sG3
148 la %r3,0(%r3,%r9)
150 /* IE against global var defined in exec with larl got access */
151 larl %r3,sg3@indntpoff
152 lg %r4,0(%r3,%r12):tls_load:sg3
153 la %r5,0(%r4,%r9)
155 /* IE against local var with larl got access */
156 larl %r3,sl3@indntpoff
157 lg %r4,0(%r3,%r12):tls_load:sl3
158 la %r5,0(%r4,%r9)
160 /* IE against hidden var with larl got access */
161 larl %r3,sh3@indntpoff
162 lg %r4,0(%r3,%r12):tls_load:sh3
163 la %r5,0(%r4,%r9)
165 /* IE against global var with small got access (no optimization) */
166 lg %r3,sG3@gotntpoff(%r12)
167 la %r3,0(%r3,%r9)
169 /* IE against global var defined in exec with small got access
170 (no optimization) */
171 lg %r3,sg3@gotntpoff(%r12)
172 la %r3,0(%r3,%r9)
174 /* IE against local var with small got access (no optimization) */
175 lg %r3,sl3@gotntpoff(%r12)
176 la %r3,0(%r3,%r9)
178 /* IE against hidden var with small got access (no optimization) */
179 lg %r3,sh3@gotntpoff(%r12)
180 la %r3,0(%r3,%r9)
182 /* Function epilog */
183 lmg %r6,%r14,208(%r15)
184 br %r14