Commit | Line | Data |
---|---|---|
82704155 | 1 | # Copyright (C) 2012-2019 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 | # Run some tests of gas macros. |
18 | ||
81366cb8 | 19 | if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } { |
252b5132 RH |
20 | run_dump_test test1 |
21 | } | |
22 | ||
35c08157 | 23 | if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] && ![istarget "nds32*-*-*"] } { |
39bec121 TW |
24 | run_dump_test test2 |
25 | } | |
252b5132 RH |
26 | |
27 | run_dump_test test3 | |
28 | ||
35c08157 | 29 | if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] && ![istarget "nds32*-*-*"] } { |
39bec121 TW |
30 | run_dump_test irp |
31 | run_dump_test rept | |
ca3bc58f | 32 | run_dump_test repeat |
6eaeac8a | 33 | run_dump_test vararg |
39bec121 | 34 | } |
252b5132 | 35 | |
252b5132 RH |
36 | gas_test_error "err.s" "" "macro infinite recursion" |
37 | ||
be20d78e NC |
38 | # The tic4x-coff target fails the next test because it defines '&' |
39 | # as its line separator character, so the expression "(0 & TFLAG_C)" | |
40 | # becomes divided up into two lines and the parser complains about | |
41 | # a missing closing parenthesis for the first line. | |
42 | setup_xfail "tic4x*-*" | |
405525ec AM |
43 | gas_test "and.s" "" "" "logical and in macro definition" |
44 | ||
252b5132 | 45 | case $target_triplet in { |
81366cb8 | 46 | { hppa*-*-* } { if [istarget *-*-linux*] { run_dump_test semi } } |
48c5eb8a | 47 | { *c4x*-*-* } { } |
39bec121 | 48 | { *c54x*-*-* } { } |
252b5132 RH |
49 | default { |
50 | run_dump_test semi | |
51 | } | |
52 | } | |
aa787a89 | 53 | |
48c5eb8a | 54 | if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } { |
483f05e3 | 55 | # FIXME: Due to macro mishandling of ONLY_STANDARD_ESCAPES. |
5e1e0414 | 56 | setup_xfail "avr-*" "cris-*" "crisv32-*" "msp430-*" |
bcd93207 AM |
57 | |
58 | # These fail due to NO_STRING_ESCAPES | |
59 | setup_xfail "powerpc*-*-aix*" "powerpc*-*-beos*" "powerpc*-*-macos*" | |
6c71dbc4 | 60 | setup_xfail "powerpc*-*-pe" "powerpc*-*-*win*" |
63ba7a1c | 61 | setup_xfail "rs6000-*-*" |
3c9b82ba | 62 | setup_xfail "z80-*-*" |
bcd93207 | 63 | |
6e917903 | 64 | # FIXME: Due to difference in what "consecutive octets" means. |
48c5eb8a | 65 | setup_xfail "*c4x*-*-*" "*c54x*-*" |
81366cb8 AM |
66 | run_dump_test strings |
67 | } | |
fdf63aff HPN |
68 | |
69 | run_dump_test app1 | |
70 | run_dump_test app2 | |
71 | run_dump_test app3 | |
7f6a71ff | 72 | remote_download host "$srcdir/$subdir/app4b.s" |
fdf63aff | 73 | run_dump_test app4 |
057f53c1 JB |
74 | |
75 | run_list_test badarg "" | |
dfeb0666 | 76 | |
5e75c3ab JB |
77 | case $target_triplet in { |
78 | { *c54x*-*-* } { } | |
79 | { *c4x*-*-* } { } | |
5e75c3ab | 80 | { mmix-* } { } |
3ee6e4fb NC |
81 | { ns32k-*-* } { } |
82 | { rl78-*-* } { } | |
c7927a3c | 83 | { rx-*-* } { } |
3ee6e4fb | 84 | { vax-*-* } { } |
5e75c3ab JB |
85 | default { run_list_test dot "-alm" } |
86 | } | |
057f53c1 | 87 | run_list_test end "" |
3ee6e4fb | 88 | setup_xfail "ns32k-*-*" "vax-*-*" |
e6ca91be | 89 | run_list_test purge "--hash-size=8000" |
057f53c1 | 90 | run_list_test redef "" |
0e31b3e1 JB |
91 | |
92 | # This test is valid only when '!' is not a comment character | |
93 | # (it is allowed to be a line comment character). | |
94 | if [string match "" [lindex [gas_run ../all/excl.s "-o /dev/null" ""] 0]] { | |
95 | run_dump_test paren | |
96 | } | |
5808f4a6 NC |
97 | |
98 | # PR 58925: A .exitm pseudo-op outside of a macro definition | |
99 | # prevented the assembler from parsing the rest of the file, | |
100 | # and hence catching an erroroneous instruction. | |
101 | gas_test_error "exit.s" "" ".exitm outside of a macro" |