Commit | Line | Data |
---|---|---|
5bf135a7 NC |
1 | # Copyright 2012 |
2 | # Free Software Foundation, Inc. | |
3 | ||
4 | # This program is free software; you can redistribute it and/or modify | |
5 | # it under the terms of the GNU General Public License as published by | |
6 | # the Free Software Foundation; either version 3 of the License, or | |
7 | # (at your option) any later version. | |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. | |
13 | # | |
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. | |
17 | ||
252b5132 RH |
18 | # Run some tests of gas macros. |
19 | ||
81366cb8 | 20 | if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } { |
252b5132 RH |
21 | run_dump_test test1 |
22 | } | |
23 | ||
48c5eb8a | 24 | if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] } { |
39bec121 TW |
25 | run_dump_test test2 |
26 | } | |
252b5132 RH |
27 | |
28 | run_dump_test test3 | |
29 | ||
48c5eb8a | 30 | if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] } { |
39bec121 TW |
31 | run_dump_test irp |
32 | run_dump_test rept | |
ca3bc58f | 33 | run_dump_test repeat |
6eaeac8a | 34 | run_dump_test vararg |
39bec121 | 35 | } |
252b5132 | 36 | |
252b5132 RH |
37 | gas_test_error "err.s" "" "macro infinite recursion" |
38 | ||
be20d78e NC |
39 | # The tic4x-coff target fails the next test because it defines '&' |
40 | # as its line separator character, so the expression "(0 & TFLAG_C)" | |
41 | # becomes divided up into two lines and the parser complains about | |
42 | # a missing closing parenthesis for the first line. | |
43 | setup_xfail "tic4x*-*" | |
405525ec AM |
44 | gas_test "and.s" "" "" "logical and in macro definition" |
45 | ||
252b5132 | 46 | case $target_triplet in { |
81366cb8 | 47 | { hppa*-*-* } { if [istarget *-*-linux*] { run_dump_test semi } } |
48c5eb8a | 48 | { *c4x*-*-* } { } |
39bec121 | 49 | { *c54x*-*-* } { } |
252b5132 RH |
50 | default { |
51 | run_dump_test semi | |
52 | } | |
53 | } | |
aa787a89 | 54 | |
48c5eb8a | 55 | if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } { |
483f05e3 | 56 | # FIXME: Due to macro mishandling of ONLY_STANDARD_ESCAPES. |
5e1e0414 | 57 | setup_xfail "avr-*" "cris-*" "crisv32-*" "msp430-*" |
bcd93207 AM |
58 | |
59 | # These fail due to NO_STRING_ESCAPES | |
60 | setup_xfail "powerpc*-*-aix*" "powerpc*-*-beos*" "powerpc*-*-macos*" | |
6c71dbc4 | 61 | setup_xfail "powerpc*-*-pe" "powerpc*-*-*win*" |
63ba7a1c | 62 | setup_xfail "rs6000-*-*" |
3c9b82ba | 63 | setup_xfail "z80-*-*" |
bcd93207 | 64 | |
6e917903 | 65 | # FIXME: Due to difference in what "consecutive octets" means. |
48c5eb8a | 66 | setup_xfail "*c4x*-*-*" "*c54x*-*" |
81366cb8 AM |
67 | run_dump_test strings |
68 | } | |
fdf63aff HPN |
69 | |
70 | run_dump_test app1 | |
71 | run_dump_test app2 | |
72 | run_dump_test app3 | |
7f6a71ff | 73 | remote_download host "$srcdir/$subdir/app4b.s" |
fdf63aff | 74 | run_dump_test app4 |
057f53c1 JB |
75 | |
76 | run_list_test badarg "" | |
dfeb0666 | 77 | |
5e75c3ab JB |
78 | case $target_triplet in { |
79 | { *c54x*-*-* } { } | |
80 | { *c4x*-*-* } { } | |
5e75c3ab | 81 | { mmix-* } { } |
c7927a3c | 82 | { rx-*-* } { } |
5e75c3ab JB |
83 | default { run_list_test dot "-alm" } |
84 | } | |
057f53c1 | 85 | run_list_test end "" |
e6ca91be | 86 | run_list_test purge "--hash-size=8000" |
057f53c1 | 87 | run_list_test redef "" |
0e31b3e1 JB |
88 | |
89 | # This test is valid only when '!' is not a comment character | |
90 | # (it is allowed to be a line comment character). | |
91 | if [string match "" [lindex [gas_run ../all/excl.s "-o /dev/null" ""] 0]] { | |
92 | run_dump_test paren | |
93 | } | |
5808f4a6 NC |
94 | |
95 | # PR 58925: A .exitm pseudo-op outside of a macro definition | |
96 | # prevented the assembler from parsing the rest of the file, | |
97 | # and hence catching an erroroneous instruction. | |
98 | gas_test_error "exit.s" "" ".exitm outside of a macro" |