Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | # Run some tests of gas macros. |
2 | ||
057f53c1 JB |
3 | proc run_list_test { name opts } { |
4 | global srcdir subdir | |
5 | set testname "macros $name" | |
6 | set file $srcdir/$subdir/$name | |
7 | gas_run ${name}.s $opts ">&dump.out" | |
8 | if { [regexp_diff "dump.out" "${file}.l"] } then { | |
9 | fail $testname | |
10 | verbose "output is [file_contents "dump.out"]" 2 | |
11 | return | |
12 | } | |
13 | pass $testname | |
14 | } | |
15 | ||
81366cb8 | 16 | if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } { |
252b5132 RH |
17 | run_dump_test test1 |
18 | } | |
19 | ||
48c5eb8a | 20 | if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] } { |
39bec121 TW |
21 | run_dump_test test2 |
22 | } | |
252b5132 RH |
23 | |
24 | run_dump_test test3 | |
25 | ||
48c5eb8a | 26 | if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] } { |
39bec121 TW |
27 | run_dump_test irp |
28 | run_dump_test rept | |
ca3bc58f | 29 | run_dump_test repeat |
39bec121 | 30 | } |
252b5132 | 31 | |
252b5132 RH |
32 | |
33 | gas_test_error "err.s" "" "macro infinite recursion" | |
34 | ||
be20d78e NC |
35 | # The tic4x-coff target fails the next test because it defines '&' |
36 | # as its line separator character, so the expression "(0 & TFLAG_C)" | |
37 | # becomes divided up into two lines and the parser complains about | |
38 | # a missing closing parenthesis for the first line. | |
39 | setup_xfail "tic4x*-*" | |
405525ec AM |
40 | gas_test "and.s" "" "" "logical and in macro definition" |
41 | ||
252b5132 | 42 | case $target_triplet in { |
81366cb8 | 43 | { hppa*-*-* } { if [istarget *-*-linux*] { run_dump_test semi } } |
48c5eb8a | 44 | { *c4x*-*-* } { } |
39bec121 | 45 | { *c54x*-*-* } { } |
252b5132 RH |
46 | default { |
47 | run_dump_test semi | |
48 | } | |
49 | } | |
aa787a89 | 50 | |
48c5eb8a | 51 | if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } { |
483f05e3 | 52 | # FIXME: Due to macro mishandling of ONLY_STANDARD_ESCAPES. |
5e1e0414 | 53 | setup_xfail "avr-*" "cris-*" "crisv32-*" "msp430-*" |
bcd93207 AM |
54 | |
55 | # These fail due to NO_STRING_ESCAPES | |
56 | setup_xfail "powerpc*-*-aix*" "powerpc*-*-beos*" "powerpc*-*-macos*" | |
6c71dbc4 | 57 | setup_xfail "powerpc*-*-pe" "powerpc*-*-*win*" |
63ba7a1c | 58 | setup_xfail "rs6000-*-*" |
bcd93207 | 59 | |
6e917903 | 60 | # FIXME: Due to difference in what "consecutive octets" means. |
48c5eb8a | 61 | setup_xfail "*c4x*-*-*" "*c54x*-*" |
81366cb8 AM |
62 | run_dump_test strings |
63 | } | |
fdf63aff HPN |
64 | |
65 | run_dump_test app1 | |
66 | run_dump_test app2 | |
67 | run_dump_test app3 | |
68 | run_dump_test app4 | |
057f53c1 JB |
69 | |
70 | run_list_test badarg "" | |
71 | run_list_test end "" | |
72 | run_list_test redef "" |