1 ! Test inter-file DataLabel support.
3 ! We need to test symbols that are
:
4 ! * Global
, defined in this file
, with
/without
/both-with-without datalabel
6 ! * The above in combinations where the reference is
/is
not from within
7 ! the same section. The implementation is currently indifferent to that
8 ! fact
, but it seems likely to
be something that can change.
9 ! * Extern with
/without
/both-with-without datalabel-qualified references.
10 ! * The above with reference from same
*and* other file.
11 ! * The above in combinations for where the symbol is
/is
not a
12 ! STO_SH5_ISA32-marked symbol.
14 ! There will
be omissions
and overlap in combinations.
Add spotted
15 ! omissions with complementary tests in other files.
20 ! For good measure
, we start with
a nop to get
a non-zero offset within
27 ! Referenced from the same file
, same section
, is ISA32
, only referenced
28 ! with datalabel qualifier.
32 movi
(datalabel foo
+ 8) & 65535,r30
34 ! Referenced from same file
, same section
, both with
and without
35 ! datalabel qualifier
, is ISA32.
39 movi
(datalabel fooboth
+ 16) & 65535,r40
40 movi
(fooboth
+ 12) & 65535,r40
42 ! Same as above
, but in different order.
46 movi
(fooboth2
+ 12) & 65535,r40
47 movi
(datalabel fooboth2
+ 16) & 65535,r40
49 ! Referenced from this file
and another
, same section
, is ISA32.
53 movi
(foowithout
+ 24) & 65535,r30
55 ! Same as above
, different section than definition.
63 .global foo_otherboth2
66 .global foo_otherwithout
71 .long datalabel foo_other + 4
72 .long datalabel foo_otherboth + 40
73 .long foo_otherboth + 24
74 .long foo_otherboth2 + 24
75 .long datalabel foo_otherboth2 + 40
76 .long foo_otherwithout
80 ! Same as above
, mixing references from same
and other section.
84 movi
(datalabel foo_mix
+ 8) & 65535,r30
88 movi
(foo_mix2
+ 8) & 65535,r30
92 movi
(datalabel foo_mixboth
+ 80) & 65535,r30
93 movi
(foo_mixboth
+ 80) & 65535,r30
97 movi
(foo_mixboth2
+ 64) & 65535,r30
98 movi
(datalabel foo_mixboth2
+ 64) & 65535,r30
99 .global foo_mixwithout
102 movi
(foo_mixwithout
+ 42) & 65535,r30
103 .global foo_mixwithout2
106 movi
(foo_mixwithout2
+ 24) & 65535,r30
110 .long datalabel foo_mix2 + 48
111 .long datalabel foo_mixboth + 400
112 .long foo_mixboth + 420
113 .long foo_mixboth2 + 248
114 .long datalabel foo_mixboth2 + 240
117 ! Same as above
, referencing symbol in other file
(reference only from
118 ! this to other file
).
122 movi
(datalabel bar
+ 8) & 65535,r30
124 movi
(datalabel barboth
+ 16) & 65535,r40
125 movi
(barboth
+ 12) & 65535,r40
127 movi
(barboth2
+ 12) & 65535,r40
128 movi
(datalabel barboth2
+ 16) & 65535,r40
130 movi
(barwithout
+ 24) & 65535,r30
133 .long datalabel bar_other + 4
134 .long datalabel bar_otherboth + 40
135 .long bar_otherboth + 24
136 .long bar_otherboth2 + 24
137 .long datalabel bar_otherboth2 + 40
138 .long bar_otherwithout
141 movi
(datalabel bar_mix
+ 8) & 65535,r30
142 movi
(bar_mix2
+ 8) & 65535,r30
143 movi
(datalabel bar_mixboth
+ 80) & 65535,r30
144 movi
(bar_mixboth
+ 80) & 65535,r30
145 movi
(bar_mixboth2
+ 64) & 65535,r30
146 movi
(datalabel bar_mixboth2
+ 64) & 65535,r30
147 movi
(bar_mixwithout
+ 42) & 65535,r30
148 movi
(bar_mixwithout2
+ 24) & 65535,r30
152 .long datalabel bar_mix2 + 48
153 .long datalabel bar_mixboth + 400
154 .long bar_mixboth + 420
155 .long bar_mixboth2 + 248
156 .long datalabel bar_mixboth2 + 240
159 ! Same as above
, referencing symbol in other file
*and* within that file.
162 movi
(datalabel baz
+ 8) & 65535,r30
164 movi
(datalabel bazboth
+ 16) & 65535,r40
165 movi
(bazboth
+ 12) & 65535,r40
167 movi
(bazboth2
+ 12) & 65535,r40
168 movi
(datalabel bazboth2
+ 16) & 65535,r40
170 movi
(bazwithout
+ 24) & 65535,r30
173 .long datalabel baz_other + 4
174 .long datalabel baz_otherboth + 40
175 .long baz_otherboth + 24
176 .long baz_otherboth2 + 24
177 .long datalabel baz_otherboth2 + 40
178 .long baz_otherwithout
181 movi
(datalabel baz_mix
+ 8) & 65535,r30
182 movi
(baz_mix2
+ 8) & 65535,r30
183 movi
(datalabel baz_mixboth
+ 80) & 65535,r30
184 movi
(baz_mixboth
+ 80) & 65535,r30
185 movi
(baz_mixboth2
+ 64) & 65535,r30
186 movi
(datalabel baz_mixboth2
+ 64) & 65535,r30
187 movi
(baz_mixwithout
+ 42) & 65535,r30
188 movi
(baz_mixwithout2
+ 24) & 65535,r30
192 .long datalabel baz_mix2 + 48
193 .long datalabel baz_mixboth + 400
194 .long baz_mixboth + 420
195 .long baz_mixboth2 + 248
196 .long datalabel baz_mixboth2 + 240
199 ! Same as all of the above
, but where the symbol is
not an ISA32 one.
205 .long (datalabel dfoo + 8)
210 .long (datalabel dfooboth + 16)
211 .long (dfooboth + 12)
216 .long (dfooboth2 + 12)
217 .long (datalabel dfooboth2 + 16)
222 .long (dfoowithout + 24)
227 .global dfoo_otherboth
230 .global dfoo_otherboth2
233 .global dfoo_otherwithout
238 .long datalabel dfoo_other + 4
239 .long datalabel dfoo_otherboth + 40
240 .long dfoo_otherboth + 24
241 .long dfoo_otherboth2 + 24
242 .long datalabel dfoo_otherboth2 + 40
243 .long dfoo_otherwithout
247 ! Same as above
, mixing references from same
and other section.
251 .long (datalabel dfoo_mix + 8)
255 .long (dfoo_mix2 + 8)
259 .long (datalabel dfoo_mixboth + 80)
260 .long (dfoo_mixboth + 80)
261 .global dfoo_mixboth2
264 .long (dfoo_mixboth2 + 64)
265 .long (datalabel dfoo_mixboth2 + 64)
266 .global dfoo_mixwithout
269 .long (dfoo_mixwithout + 42)
270 .global dfoo_mixwithout2
273 .long (dfoo_mixwithout2 + 24)
277 .long datalabel dfoo_mix2 + 48
278 .long datalabel dfoo_mixboth + 400
279 .long dfoo_mixboth + 420
280 .long dfoo_mixboth2 + 248
281 .long datalabel dfoo_mixboth2 + 240
282 .long dfoo_mixwithout
284 ! Same as above
, referencing symbol in other file
(reference only from
285 ! this to other file
).
288 movi
(datalabel dbarboth
+ 16) & 65535,r40
289 movi
(dbarboth
+ 12) & 65535,r40
290 movi
(dbarboth2
+ 12) & 65535,r40
291 movi
(datalabel dbarboth2
+ 16) & 65535,r40
292 movi
(dbarwithout
+ 24) & 65535,r30
295 .long (datalabel dbar + 8)
296 .long datalabel dbar_other + 4
297 .long datalabel dbar_otherboth + 40
298 .long dbar_otherboth + 24
299 .long dbar_otherboth2 + 24
300 .long datalabel dbar_otherboth2 + 40
301 .long dbar_otherwithout
304 movi
(datalabel dbar_mix
+ 8) & 65535,r30
305 movi
(dbar_mix2
+ 8) & 65535,r30
306 movi
(datalabel dbar_mixboth
+ 80) & 65535,r30
307 movi
(dbar_mixboth
+ 80) & 65535,r30
308 movi
(dbar_mixboth2
+ 64) & 65535,r30
309 movi
(datalabel dbar_mixboth2
+ 64) & 65535,r30
310 movi
(dbar_mixwithout
+ 42) & 65535,r30
311 movi
(dbar_mixwithout2
+ 24) & 65535,r30
315 .long datalabel dbar_mix2 + 48
316 .long datalabel dbar_mixboth + 400
317 .long dbar_mixboth + 420
318 .long dbar_mixboth2 + 248
319 .long datalabel dbar_mixboth2 + 240
320 .long dbar_mixwithout
322 ! Same as above
, referencing symbol in other file
*and* within that file.
325 movi
(datalabel dbazboth
+ 16) & 65535,r40
326 movi
(dbazboth
+ 12) & 65535,r40
328 movi
(dbazboth2
+ 12) & 65535,r40
329 movi
(datalabel dbazboth2
+ 16) & 65535,r40
331 movi
(dbazwithout
+ 24) & 65535,r30
334 .long (datalabel dbaz + 8)
335 .long datalabel dbaz_other + 4
336 .long datalabel dbaz_otherboth + 40
337 .long dbaz_otherboth + 24
338 .long dbaz_otherboth2 + 24
339 .long datalabel dbaz_otherboth2 + 40
340 .long dbaz_otherwithout
343 movi
(datalabel dbaz_mix
+ 8) & 65535,r30
344 movi
(dbaz_mix2
+ 8) & 65535,r30
345 movi
(datalabel dbaz_mixboth
+ 80) & 65535,r30
346 movi
(dbaz_mixboth
+ 80) & 65535,r30
347 movi
(dbaz_mixboth2
+ 64) & 65535,r30
348 movi
(datalabel dbaz_mixboth2
+ 64) & 65535,r30
349 movi
(dbaz_mixwithout
+ 42) & 65535,r30
350 movi
(dbaz_mixwithout2
+ 24) & 65535,r30
354 .long datalabel dbaz_mix2 + 48
355 .long datalabel dbaz_mixboth + 400
356 .long dbaz_mixboth + 420
357 .long dbaz_mixboth2 + 248
358 .long datalabel dbaz_mixboth2 + 240
359 .long dbaz_mixwithout