fixed bash/dash/sh issue (Ubuntu)
[zpugcc/jano.git] / toolchain / binutils / ld / testsuite / ld-s390 / tlsbinpic.s
blob9779c0581ed1b9017b446e96c2caeef44613a5e3
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 stm %r6,%r14,24(%r15)
36 bras %r13,.LTN1
37 /* Literal pool */
38 .LT1:
39 .LC0:
40 .long _GLOBAL_OFFSET_TABLE_-.LT1
41 .LC1:
42 .long __tls_get_offset@plt-.LT1
43 .LC2:
44 .long sG1@tlsgd
45 .LC3:
46 .long sG2@tlsgd
47 .LC4:
48 .long sg1@tlsgd
49 .LC5:
50 .long sl1@tlsgd
51 .LC6:
52 .long sh1@tlsgd
53 .LC7:
54 .long sl1@tlsldm
55 .LC8:
56 .long sl1@dtpoff
57 .LC9:
58 .long sl2@dtpoff
59 .LC10:
60 .long sh1@tlsldm
61 .LC11:
62 .long sh1@dtpoff
63 .LC12:
64 .long sh2@dtpoff
65 .LC13:
66 .long sG2@gotntpoff
67 .LC14:
68 .long sg1@gotntpoff
69 .LC15:
70 .long sl1@gotntpoff
71 .LC16:
72 .long sh1@gotntpoff
73 .LTN1:
74 /* Function prolog */
75 lr %r14,%r15
76 l %r12,.LC0-.LT1(%r13)
77 ahi %r15,-96
78 la %r12,0(%r12,%r13)
79 st %r14,0(%r14)
81 /* Extract TCB and load branch offset */
82 ear %r9,%a0
83 l %r7,.LC1-.LT1(%r13)
85 /* GD -> IE because variable is not defined in executable */
86 l %r2,.LC2-.LT1(%r13)
87 bas %r14,0(%r7,%r13):tls_gdcall:sG1
88 la %r2,0(%r2,%r9)
90 /* GD -> IE because variable is not defined in executable where
91 the variable is referenced through IE too */
92 l %r2,.LC3-.LT1(%r13)
93 bas %r14,0(%r7,%r13):tls_gdcall:sG2
94 la %r2,0(%r2,%r9)
96 /* GD -> LE with global variable defined in executable */
97 l %r2,.LC4-.LT1(%r13)
98 bas %r14,0(%r7,%r13):tls_gdcall:sg1
99 la %r2,0(%r2,%r9)
101 /* GD -> LE with local variable defined in executable */
102 l %r2,.LC5-.LT1(%r13)
103 bas %r14,0(%r7,%r13):tls_gdcall:sl1
104 la %r2,0(%r2,%r9)
106 /* GD -> LE with hidden variable defined in executable */
107 l %r2,.LC6-.LT1(%r13)
108 bas %r14,0(%r7,%r13):tls_gdcall:sh1
109 la %r2,0(%r2,%r9)
111 /* LD -> LE */
112 l %r2,.LC7-.LT1(%r13)
113 bas %r14,0(%r7,%r13):tls_ldcall:sl1
114 la %r3,0(%r2,%r9)
115 l %r4,.LC8-.LT1(%r13)
116 la %r5,0(%r4,%r3)
117 l %r4,.LC9-.LT1(%r13)
118 la %r5,0(%r4,%r3)
120 /* LD -> LE against hidden variables */
121 l %r2,.LC10-.LT1(%r13)
122 bas %r14,0(%r7,%r13):tls_ldcall:sh1
123 la %r3,0(%r2,%r9)
124 l %r4,.LC11-.LT1(%r13)
125 la %r5,0(%r4,%r3)
126 l %r4,.LC12-.LT1(%r13)
127 la %r5,0(%r4,%r3)
129 /* IE against global var */
130 l %r3,.LC13-.LT1(%r13)
131 l %r3,0(%r3,%r12):tls_load:sG2
132 l %r3,0(%r3,%r9)
134 /* IE -> LE against global var defined in exec */
135 l %r3,.LC14-.LT1(%r13)
136 l %r4,0(%r3,%r12):tls_load:sg1
137 la %r5,0(%r4,%r9)
139 /* IE -> LE against local var */
140 l %r3,.LC15-.LT1(%r13)
141 l %r4,0(%r3,%r12):tls_load:sl1
142 la %r5,0(%r4,%r9)
144 /* IE -> LE against hidden var */
145 l %r3,.LC16-.LT1(%r13)
146 l %r4,0(%r3,%r12):tls_load:sh1
147 la %r5,0(%r4,%r9)
149 /* IE against global var with small got access (no optimization) */
150 l %r3,sG3@gotntpoff(%r12)
151 la %r3,0(%r3,%r9)
153 /* IE against global var defined in exec with small got access
154 (no optimization) */
155 l %r3,sg3@gotntpoff(%r12)
156 la %r3,0(%r3,%r9)
158 /* IE against local var with small got access (no optimization) */
159 l %r3,sl3@gotntpoff(%r12)
160 la %r3,0(%r3,%r9)
162 /* IE against hidden var with small got access (no optimization) */
163 l %r3,sh3@gotntpoff(%r12)
164 la %r3,0(%r3,%r9)
166 /* Function epilog */
167 lm %r6,%r14,120(%r15)
168 br %r14