]>
Commit | Line | Data |
---|---|---|
250d07de | 1 | # Copyright (C) 2012-2021 Free Software Foundation, Inc. |
5bf135a7 NC |
2 | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 3 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. | |
16 | ||
252b5132 RH |
17 | # |
18 | # These tests should be valid on all targets. | |
19 | # | |
20 | ||
21 | # I think currently all targets fail this one when listings are enabled. | |
22 | gas_test "p2425.s" "" "" "pcrel values in assignment" | |
23 | ||
24 | # p1480.s uses a ".space" directive which for most assemblers means | |
25 | # "allocate some space". On the PA it means "switch into this space". | |
26 | # | |
27 | # Therefore this test (as it is currently written) is completely bogus | |
28 | # for any PA target. Do not bother trying to run it and just claim | |
29 | # it fails. | |
39bec121 TW |
30 | # |
31 | # The C54x uses ".space" to allocate bits, and requires absolute expressions; | |
32 | # The ".space" directive is taken care of in the C54x-specific tests, so fail | |
33 | # here | |
34 | # | |
280d71bf DB |
35 | # The test also doesn't work on mep targets, since they use RELC, and it |
36 | # will avoid simplifying the expression since it conservatively assumes | |
37 | # ugly expressions can be saved until link-time. | |
38 | if { [istarget hppa*-*-*] || [istarget *c54x*-*-*] || [istarget mep*-*-*]} then { | |
252b5132 RH |
39 | setup_xfail *-*-* |
40 | fail "simplifiable double subtraction" | |
41 | } else { | |
42 | gas_test "p1480.s" "" "-a>" "simplifiable double subtraction" | |
43 | } | |
44 | ||
3c9b82ba NC |
45 | # No floating point support in assembly code for CRIS and Z80. |
46 | if { ![istarget cris-*-*] && ![istarget crisv32-*-*] | |
47 | && ![istarget z80-*-*] } then { | |
6e425ff4 AM |
48 | if { [istarget tic4x-*-*] } then { |
49 | set as_opt "" | |
50 | } else { | |
51 | set as_opt "--defsym hasnan=1" | |
52 | } | |
53 | gas_test "float.s" $as_opt "" "simple FP constants" | |
483f05e3 | 54 | } |
252b5132 RH |
55 | |
56 | # This test is meaningless for the PA; the difference of two undefined | |
57 | # symbols is something that is (and must be) supported on the PA. | |
3ee6e4fb | 58 | # The same is true for ALPHA-VMS. |
569006e5 | 59 | # |
3ee6e4fb NC |
60 | # The AVR, MICROBLAZE, MN10300, RL78 and RX ports all support link time |
61 | # relaxation, which in turn allows for link time resolution of the | |
62 | # differences of two previously undefined symbols. Hence this test will | |
63 | # not pass for these targets. | |
64 | if { ![istarget alpha*-*-*vms*] | |
65 | && ![istarget am3*-*-*] | |
edc9e9a6 | 66 | && ![istarget avr-*-*] |
81b42bca | 67 | && ![istarget ft32-*-*] |
3ee6e4fb NC |
68 | && ![istarget hppa*-*-*] |
69 | && ![istarget microblaze-*-*] | |
c7927a3c | 70 | && ![istarget mn10300-*-*] |
13761a11 | 71 | && ![istarget msp430*-*-*] |
8d6502d2 | 72 | && ![istarget powerpc*-*-aix*] |
8dfa5d5a | 73 | && ![istarget riscv*-*-*] |
3ee6e4fb | 74 | && ![istarget rl78-*-*] |
8d6502d2 | 75 | && ![istarget rs6000*-*-aix*] |
4462d7c4 | 76 | && ![istarget rx-*-*] |
77 | && ![istarget loongarch*-*-*] } then { | |
252b5132 RH |
78 | gas_test_error "diff1.s" "" "difference of two undefined symbols" |
79 | } | |
80 | ||
9497f5ac NC |
81 | gas_test_error "equiv1.s" "" ".equiv for symbol already set to another one" |
82 | gas_test_error "equiv2.s" "" ".equiv for symbol already set to an expression" | |
83 | ||
ca60b3af SL |
84 | # The inode comparison used to detect identical input and output files |
85 | # doesn't work on non-Posix hosts. | |
86 | if { ![ishost "*-*-mingw*"] } then { | |
87 | gas_test_error "none.s" "-o $srcdir/$subdir/none.s" "Output file must be distinct from input" | |
88 | } | |
67f846b5 | 89 | |
9497f5ac | 90 | # .equ works differently on some targets. |
e3696f67 AM |
91 | switch -glob $target_triplet { |
92 | hppa*-*-* { } | |
93 | *c54x*-*-* { } | |
9497f5ac NC |
94 | default { |
95 | gas_test "equ-ok.s" "" "" ".equ for symbol already set" | |
96 | gas_test_error "equ-bad.s" "" ".equ for symbol already set through .eqv" | |
97 | } | |
98 | } | |
99 | ||
100 | gas_test "eqv-ok.s" "" "" ".eqv support" | |
101 | gas_test_error "eqv-bad.s" "" ".eqv for symbol already set" | |
66e3eb08 SC |
102 | if { [istarget "pdp11-*-*"] } then { |
103 | run_dump_test eqv-dot-pdp11 | |
104 | } else { | |
105 | run_dump_test eqv-dot | |
106 | } | |
9497f5ac | 107 | |
3f904b16 AM |
108 | if { ![istarget "bfin-*-*"] } then { |
109 | gas_test "assign-ok.s" "" "" "== assignment support" | |
110 | } | |
9497f5ac | 111 | gas_test_error "assign-bad.s" "" "== assignment for symbol already set" |
2a50b401 | 112 | run_dump_test assign-bad-recursive |
d27aad4e | 113 | run_dump_test local-label-overflow |
9497f5ac | 114 | |
1f38083f | 115 | run_dump_test simple-forward |
7553c869 | 116 | run_dump_test forward |
9497f5ac | 117 | |
e8044f35 | 118 | # aout relocs are often weird, so is mep. don't bother testing |
f9022510 AM |
119 | # som doesn't use a .text section |
120 | # mmix doesn't like .L1: | |
121 | # ti addresses aren't octets. | |
122 | if { ![is_aout_format] } { | |
e3696f67 AM |
123 | switch -glob $target_triplet { |
124 | hppa*64*-*-* { | |
01c51e44 DA |
125 | run_dump_test fwdexp |
126 | } | |
e3696f67 AM |
127 | alpha-*-*linux*ecoff { } |
128 | alpha-*-osf* { } | |
129 | hppa*-*-hpux* { } | |
130 | mep-*-* { } | |
131 | mmix-*-* { } | |
132 | nds32*-*-* { } | |
133 | tic30*-*-* { } | |
134 | tic4x*-*-* { } | |
135 | tic54x*-*-* { } | |
f9022510 AM |
136 | default { |
137 | run_dump_test fwdexp | |
138 | } | |
139 | } | |
140 | } | |
141 | ||
9497f5ac | 142 | # .set works differently on some targets. |
f42fb574 AM |
143 | # most of the tests won't work on targets that set linkrelax. |
144 | # 4 octet bytes confuse address matching on ti targets. | |
145 | # pdp11 gets unexpected reloc types. | |
e3696f67 AM |
146 | switch -glob $target_triplet { |
147 | alpha*-*-* { } | |
148 | am3*-*-* { } | |
149 | cr16*-*-* { } | |
150 | crx*-*-* { } | |
151 | h8300-*-* { } | |
152 | mips*-*-* { } | |
153 | mn10200-*-* { } | |
154 | mn10300-*-* { } | |
155 | msp430*-*-* { } | |
156 | nds32*-*-* { } | |
157 | pdp11-*-* { } | |
158 | tic30*-*-* { } | |
159 | tic4x*-*-* { } | |
160 | tic54x*-*-* { } | |
161 | xtensa*-*-* { } | |
162 | z80-*-* { } | |
9497f5ac | 163 | default { |
9497f5ac | 164 | run_dump_test redef |
8b0aac0f AM |
165 | # These targets fail redef2 because they disallow redefined |
166 | # symbols on relocs. | |
3ee6e4fb | 167 | setup_xfail "m68hc1*-*-*" "m6811-*-*" "m6812-*-*" "rl78-*-*" |
e23eba97 | 168 | setup_xfail "riscv*-*-*" "rx-*-*" "vax*-*-*" "xgate*-*-*" "z8k-*-*" |
4462d7c4 | 169 | setup_xfail "loongarch*-*-*" |
5ca0ee01 | 170 | run_dump_test redef2 |
3ee6e4fb | 171 | setup_xfail "m68hc1*-*-*" "m6811-*-*" "m6812-*-*" "rl78-*-*" |
e23eba97 | 172 | setup_xfail "riscv*-*-*" "rx-*-*" "vax*-*-*" "xgate*-*-*" "z8k-*-*" |
4462d7c4 | 173 | setup_xfail "loongarch*-*-*" |
8b0aac0f | 174 | # rs6000-aix disallows redefinition via .comm. |
34e79798 AM |
175 | if [is_xcoff_format] { |
176 | setup_xfail *-*-* | |
177 | } | |
8b0aac0f AM |
178 | # These targets fail redef3 because section contents for the |
179 | # word referencing the .comm sym is not zero and/or its reloc | |
180 | # has a non-zero addend. Relaxing the test would hide real | |
73589c9d | 181 | # failures. |
8b0aac0f AM |
182 | setup_xfail "bfin-*-*" "i\[3-7\]86-*-*coff" \ |
183 | "i\[3-7\]86-*-*pe" "i\[3-7\]86-*-go32*" \ | |
3ee6e4fb NC |
184 | "i\[3-7\]86-*-cygwin*" "i\[3-7\]86-*-mingw*" \ |
185 | "x86_64-*-cygwin*" "x86_64-*-mingw*" | |
92757bc9 | 186 | run_dump_test redef3 |
92757bc9 | 187 | gas_test_error "redef4.s" "" ".set for symbol already used as label" |
92757bc9 | 188 | gas_test_error "redef5.s" "" ".set for symbol already defined through .comm" |
9497f5ac NC |
189 | } |
190 | } | |
191 | ||
252b5132 RH |
192 | proc do_comment {} { |
193 | set testname "comment.s: comments in listings" | |
194 | set x1 0 | |
195 | set x2 0 | |
196 | set x3 0 | |
197 | set white {[ \t]*} | |
198 | gas_start "comment.s" "-al" | |
199 | while 1 { | |
200 | # Apparently CRLF is received when using ptys for subprocesses; hence the | |
201 | # \r\n for line 3. | |
202 | expect { | |
203 | -re "^ +1\[ \t\]+# This\[^\n\]*\n" { set x1 1 } | |
204 | -re "^ +2\[ \t\]+# correctly\[^\n\]*\n" { set x2 1 } | |
7f6a71ff | 205 | -re "^ +3\[ \t\]+/. C comments too. ./\r?\r?\n" { set x3 1 } |
252b5132 RH |
206 | -re "\[^\n\]*\n" { } |
207 | timeout { perror "timeout\n"; break } | |
208 | eof { break } | |
209 | } | |
210 | } | |
211 | gas_finish | |
212 | if [all_ones $x1 $x2 $x3] then { pass $testname } else { fail $testname } | |
213 | } | |
214 | ||
27cdfa03 | 215 | do_comment |
252b5132 | 216 | |
83f10cb2 NC |
217 | # This test checks the output of the -ag switch. It must detect at least |
218 | # the name of the input file, output file, and options passed. | |
219 | proc general_info_section {} { | |
220 | set testname "general info section in listings" | |
221 | set x1 0 | |
222 | set x2 0 | |
223 | set x3 0 | |
224 | set white {[ \t]*} | |
225 | gas_start "comment.s" "-agn" | |
226 | while 1 { | |
227 | expect { | |
c7927a3c | 228 | -re "^ \[^\n\]*\t: .*\-agn\[^\n\]*\n" { set x1 1 } |
83f10cb2 NC |
229 | -re "^ \[^\n\]*\t: \[^\n\]*comment\.s\[^\n\]*\n" { set x2 1 } |
230 | -re "^ \[^\n\]*\t: a\.out\[^\n\]*\n" { set x3 1 } | |
231 | -re "\[^\n\]*\n" { } | |
232 | timeout { perror "timeout\n"; break } | |
233 | eof { break } | |
234 | } | |
235 | } | |
236 | gas_finish | |
237 | if [all_ones $x1 $x2 $x3] then { pass $testname } else { fail $testname } | |
238 | } | |
239 | ||
240 | general_info_section | |
241 | ||
252b5132 RH |
242 | # |
243 | # Test x930509a -- correct assembly of differences involving forward | |
244 | # references. | |
245 | # | |
246 | ||
247 | proc do_930509a {} { | |
248 | set testname "difference between forward references" | |
249 | set x 0 | |
250 | gas_start "x930509.s" "-al" | |
251 | while 1 { | |
c29ae970 | 252 | # We need to accommodate both byte orders here. |
252b5132 RH |
253 | # If ".long" means an 8-byte value on some target someday, this test will have |
254 | # to be fixed. | |
255 | expect { | |
224de7a5 AM |
256 | -re "^ +1 .... 00 ?00 ?00 ?00" { fail $testname; set x 1 } |
257 | -re "^ +1 .... 04 ?00 ?00 ?00" { pass $testname; set x 1 } | |
258 | -re "^ +1 .... 00 ?00 ?00 ?04" { pass $testname; set x 1 } | |
252b5132 RH |
259 | -re "\[^\n\]*\n" { } |
260 | timeout { perror "timeout\n"; break } | |
261 | eof { break } | |
262 | } | |
263 | } | |
264 | gas_finish | |
265 | if !$x then { fail $testname } | |
266 | } | |
267 | ||
3ccac826 NC |
268 | # This test is meaningless for the PA and CR16/CRX: the difference of two |
269 | # symbols cannot be resolved by the assembler. | |
39bec121 | 270 | # C54x assembler (for compatibility) does not allow differences between |
3ccac826 | 271 | # forward references. |
8bda4946 | 272 | # C30 counts a four byte offset as a difference of one. |
3ee6e4fb NC |
273 | if { ![istarget *c30*-*-*] |
274 | && ![istarget *c4x*-*-*] | |
275 | && ![istarget *c54x*-*-*] | |
276 | && ![istarget cr16*-*-*] | |
277 | && ![istarget crx*-*-*] | |
81b42bca | 278 | && ![istarget ft32-*-*] |
3ee6e4fb NC |
279 | && ![istarget h8300*-*-*] |
280 | && ![istarget hppa*-*-*] } then { | |
281 | # The vax fails because VMS can apparently actually handle this | |
252b5132 | 282 | # case in relocs, so gas doesn't handle it itself. |
e23eba97 | 283 | # msp430, mn10[23]00 and riscv emit two relocs to handle the difference of two symbols. |
75800d2c | 284 | setup_xfail "am3*-*-*" "mn10200-*-*" "mn10300*-*-*" "msp430*-*-*" "riscv*-*-*" "vax*-*-vms*" |
252b5132 RH |
285 | do_930509a |
286 | } | |
287 | ||
39bec121 TW |
288 | # ".struct" and ".align" have different meanings on c54x |
289 | # These directives are done in the c54x-specific tests instead | |
e3696f67 AM |
290 | switch -glob $target_triplet { |
291 | hppa*-*-* { } | |
292 | *c4x*-*-* { } | |
293 | *c54x*-*-* { } | |
252b5132 RH |
294 | default { |
295 | run_dump_test struct | |
296 | run_dump_test align | |
76101304 | 297 | run_dump_test align2 |
252b5132 RH |
298 | } |
299 | } | |
300 | ||
5069eab2 | 301 | # '<' and '>' appear to have special meanings on the excluded targets |
e3696f67 AM |
302 | switch -glob $target_triplet { |
303 | frv-*-* { } | |
304 | hppa*-*-* { } | |
305 | m32r-*-* { } | |
306 | mmix-*-* { } | |
307 | *c4x*-*-* { } | |
308 | *c54x*-*-* { } | |
309 | bfin-*-* { } | |
5069eab2 NC |
310 | default { |
311 | run_dump_test altmacro | |
312 | # The second test is valid only when '!' is not a comment | |
313 | # character (it is allowed to be a line comment character). | |
26a78d4a | 314 | if [string match "" [lindex [gas_run excl.s "-o /dev/null" ""] 0]] { |
5069eab2 | 315 | run_dump_test altmac2 |
c29ae970 | 316 | # Similarly this test does not work when ! is a line separator. |
9497f5ac | 317 | run_dump_test eval |
5069eab2 NC |
318 | } |
319 | } | |
320 | } | |
caa32fe5 | 321 | |
252b5132 | 322 | # This test is for any COFF target. |
252b5132 RH |
323 | # We omit the ARM toolchains because they define locals to |
324 | # start with '.', which eliminates .eos, .text etc from the output. | |
39bec121 | 325 | # Omit c54x, since .tag and .def mean something different on that target |
8c5fc800 JM |
326 | if { ([istarget *-*-coff*] && ![istarget arm*-*-coff] && ![istarget *c4x*-*-coff] && ![istarget *c54x*-*-coff]) \ |
327 | ||([istarget *-*-pe*] && ![istarget arm*-*-pe*]) \ | |
252b5132 RH |
328 | || [istarget i*86-*-aix*] \ |
329 | || [istarget i*86-*-sco*] \ | |
330 | || [istarget i*86-*-isc*] \ | |
331 | || [istarget i*86-*-go32*] \ | |
332 | || [istarget i*86-*-cygwin*] \ | |
42037fe5 | 333 | || [istarget x86_64-*-mingw*] \ |
252b5132 | 334 | || [istarget i*86-*-*nt] \ |
a8eb42a8 | 335 | || [istarget i*86-*-interix*] } { |
252b5132 RH |
336 | run_dump_test cofftag |
337 | } | |
338 | ||
339 | # Test omitting conditionals from listings. | |
340 | proc test_cond {} { | |
341 | global comp_output | |
342 | global srcdir | |
343 | global subdir | |
344 | ||
345 | set testname "conditional listings" | |
66e3eb08 SC |
346 | if { [istarget "pdp11-*-*"] } then { |
347 | set listing "cond-pdp11.l" | |
348 | } else { | |
349 | set listing "cond.l" | |
350 | } | |
224de7a5 | 351 | gas_run cond.s "-alc" ">dump.out" |
252b5132 RH |
352 | if ![string match "" $comp_output] { |
353 | send_log "$comp_output\n" | |
354 | fail $testname | |
355 | } else { | |
66e3eb08 | 356 | if { [regexp_diff dump.out $srcdir/$subdir/$listing] } { |
252b5132 RH |
357 | fail $testname |
358 | } else { | |
359 | pass $testname | |
360 | } | |
361 | } | |
362 | } | |
363 | ||
c8060cba JL |
364 | # This test is not suitable for the PA for various reasons |
365 | # not limited to the fact that it depends on specific section | |
366 | # names appearing in the output file. | |
3ee6e4fb | 367 | # Again, p2align doesn't work on c54x and related targets. |
e3696f67 AM |
368 | switch -glob $target_triplet { |
369 | alpha-*-linux*ecoff { } | |
370 | alpha-*-osf* { } | |
371 | hppa*-*-* { } | |
372 | *c4x*-*-* { } | |
373 | *c54x*-*-* { } | |
374 | rl78-*-* { } | |
375 | rx-*-* { } | |
aceebfd6 NC |
376 | default { |
377 | test_cond | |
7f6a71ff | 378 | remote_download host "$srcdir/$subdir/incbin.dat" |
aceebfd6 NC |
379 | run_dump_test incbin |
380 | } | |
39bec121 | 381 | } |
c9e38879 | 382 | |
4504a634 JB |
383 | # Various targets use too custom handling to be able to sensibly create |
384 | # common expecations for this test. Also .equ works differently on some | |
385 | # targets. | |
386 | if { ![istarget avr-*-*] | |
387 | && ![istarget bfin-*-*] | |
388 | && ![istarget cris*-*-*] | |
389 | && ![istarget dlx-*-*] | |
390 | && ![istarget hppa*-*-*] | |
391 | && ![istarget m68k-*-*] | |
392 | && ![istarget nios2-*-*] | |
393 | && ![istarget pj-*-*] | |
394 | && ![istarget sh*-*-*] | |
395 | && ![istarget *c4x-*-*] | |
396 | && ![istarget *c54x-*-*] | |
397 | && ![istarget *c6x-*-*] | |
398 | && ![istarget z80-*-*] } then { | |
399 | # Some further targets' custom handling fails to recognize the overflows. | |
400 | setup_xfail "crx-*-*" "h8300-*-*" "mcore-*-*" "mn10200-*-*" "mn10300-*-*" "msp430-*-*" "ns32k-*-*" | |
401 | run_list_test "overflow" | |
402 | } | |
403 | ||
01ed09aa | 404 | if { ([istarget "i*86-*-*pe*"] && ![istarget "i*86-*-openbsd*"]) \ |
b46c1691 NC |
405 | || [istarget "i*86-*-cygwin*"] \ |
406 | || [istarget "i*86-*-mingw32*"] } { | |
407 | gas_test "fastcall.s" "" "" "fastcall labels" | |
408 | } | |
a7eec876 | 409 | |
35c08157 | 410 | if { ![istarget "bfin-*-*"] && ![istarget "nds32*-*-*"] } then { |
3f904b16 AM |
411 | run_dump_test assign |
412 | } | |
e5604d79 | 413 | run_dump_test sleb128 |
956a6ba3 JB |
414 | run_dump_test sleb128-2 |
415 | run_dump_test sleb128-3 | |
416 | run_dump_test sleb128-4 | |
417 | run_dump_test sleb128-5 | |
4455e9ad JB |
418 | # .byte is not 8 bits on either tic4x or tic54x |
419 | if { ![istarget "tic4x*-*-*"] && ![istarget "tic54x*-*-*"] } { | |
420 | run_dump_test sleb128-7 | |
1a94eb29 | 421 | run_dump_test sleb128-8 |
4455e9ad | 422 | } |
ba8826a8 | 423 | run_dump_test sleb128-9 |
ddc07134 | 424 | |
5e9ed83f | 425 | # .byte is 32 bits on tic4x, and .p2align isn't supported on tic54x |
17b939cd | 426 | # .space is different on hppa*-hpux. |
ec0c103c NC |
427 | # MeP put bytes into packets. |
428 | if { ![istarget "tic4x*-*-*"] && ![istarget "tic54x*-*-*"] && ![istarget "hppa*-*-hpux*"] && ![istarget "mep*-*-*"] } { | |
5e9ed83f L |
429 | run_dump_test relax |
430 | } | |
431 | ||
a8eb42a8 | 432 | run_dump_test quad |
66e3eb08 SC |
433 | |
434 | # poor little PDP-11 can't handle 16-byte values | |
435 | if { ![istarget "pdp11-*-*"] } { | |
436 | run_dump_test octa | |
437 | } | |
3c9b82ba NC |
438 | |
439 | # .set works differently on some targets. | |
e3696f67 AM |
440 | switch -glob $target_triplet { |
441 | alpha*-*-* { } | |
442 | mips*-*-* { } | |
443 | *c54x*-*-* { } | |
444 | z80-*-* { } | |
3c9b82ba NC |
445 | default { |
446 | run_dump_test weakref1 | |
447 | run_dump_test weakref1g | |
448 | run_dump_test weakref1l | |
449 | run_dump_test weakref1u | |
450 | run_dump_test weakref1w | |
451 | } | |
452 | } | |
06e77878 AO |
453 | gas_test_error "weakref2.s" "" "e: would close weakref loop: e => a => b => c => d => e" |
454 | gas_test_error "weakref3.s" "" "a: would close weakref loop: a => b => c => d => e => a" | |
b54788f8 | 455 | gas_test_error "weakref4.s" "" "is already defined" |
06e77878 | 456 | |
38a57ae7 | 457 | run_dump_test string |
740bdc67 AM |
458 | if [is_elf_format] { |
459 | run_dump_test none | |
460 | } | |
38a57ae7 | 461 | |
d02603dc NC |
462 | run_dump_test quoted-sym-names |
463 | ||
93a24ba7 MR |
464 | run_list_test pr20312 |
465 | ||
a7eec876 HPN |
466 | load_lib gas-dg.exp |
467 | dg-init | |
468 | dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/err-*.s $srcdir/$subdir/warn-*.s]] "" "" | |
469 | dg-finish | |
9875b365 MR |
470 | |
471 | # Set $nop_type appropriately to indicate the NOP instruction mnemonic. | |
b1766e7c | 472 | # Note - this code is made obsolete by the new .nops pseudo-op. |
e3696f67 AM |
473 | switch -glob $target_triplet { |
474 | bpf-*-* { | |
f8861f5d JM |
475 | set nop_type 6 |
476 | } | |
e3696f67 | 477 | mmix-*-* { |
9875b365 MR |
478 | set nop_type 5 |
479 | } | |
e3696f67 | 480 | or1k*-*-* { |
9875b365 MR |
481 | set nop_type 2 |
482 | } | |
e3696f67 | 483 | ia64-*-* { |
9875b365 MR |
484 | set nop_type 1 |
485 | } | |
486 | default { | |
487 | set nop_type 0 | |
488 | } | |
489 | } | |
490 | run_dump_test "org-1" [list [list as "--defsym nop_type=$nop_type"]] | |
491 | run_dump_test "org-2" | |
492 | run_dump_test "org-3" | |
493 | run_dump_test "org-4" | |
494 | run_dump_test "org-5" | |
495 | run_dump_test "org-6" | |
4f2358bc | 496 | |
fa57faa0 | 497 | run_dump_test "fill-1" |
0acc7632 AM |
498 | |
499 | gas_test "pr23938.s" "" "" ".xstabs" | |
b1766e7c NC |
500 | |
501 | run_dump_test "nop" | |
3d955acb | 502 | run_dump_test "asciz" |
4a68fcd7 | 503 | run_dump_test "pr27384" |
284beb43 | 504 | run_dump_test "pr27381" |