]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gas/testsuite/gas/macros/macros.exp
gas/
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / macros / macros.exp
1 # Run some tests of gas macros.
2
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
16 if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
17 run_dump_test test1
18 }
19
20 if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] } {
21 run_dump_test test2
22 }
23
24 run_dump_test test3
25
26 if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] } {
27 run_dump_test irp
28 run_dump_test rept
29 }
30
31
32 gas_test_error "err.s" "" "macro infinite recursion"
33
34 gas_test "and.s" "" "" "logical and in macro definition"
35
36 case $target_triplet in {
37 { hppa*-*-* } { if [istarget *-*-linux*] { run_dump_test semi } }
38 { *c4x*-*-* } { }
39 { *c54x*-*-* } { }
40 default {
41 run_dump_test semi
42 }
43 }
44
45 if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
46 # FIXME: Due to macro mishandling of ONLY_STANDARD_ESCAPES.
47 setup_xfail "avr-*" "cris-*" "crisv32-*"
48
49 # These fail due to NO_STRING_ESCAPES
50 setup_xfail "powerpc*-*-aix*" "powerpc*-*-beos*" "powerpc*-*-macos*"
51 setup_xfail "powerpc*-*-pe" "powerpc*-*-*win*"
52 setup_xfail "rs6000-*-*"
53
54 # FIXME: Due to difference in what "consecutive octets" means.
55 setup_xfail "*c4x*-*-*" "*c54x*-*"
56 run_dump_test strings
57 }
58
59 run_dump_test app1
60 run_dump_test app2
61 run_dump_test app3
62 run_dump_test app4
63
64 run_list_test badarg ""
65 run_list_test end ""
66 run_list_test redef ""