Upload Tizen:Base source
[external/binutils.git] / gas / testsuite / gas / macros / macros.exp
1 # Run some tests of gas macros.
2
3 if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
4     run_dump_test test1
5 }
6
7 if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] } {
8     run_dump_test test2
9 }
10
11 run_dump_test test3
12
13 if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] } {
14     run_dump_test irp
15     run_dump_test rept
16     run_dump_test repeat
17     run_dump_test vararg
18 }
19
20 gas_test_error "err.s" "" "macro infinite recursion"
21
22 # The tic4x-coff target fails the next test because it defines '&'
23 # as its line separator character, so the expression "(0 & TFLAG_C)"
24 # becomes divided up into two lines and the parser complains about
25 # a missing closing parenthesis for the first line.
26 setup_xfail "tic4x*-*"
27 gas_test "and.s" "" "" "logical and in macro definition"
28
29 case $target_triplet in {
30     { hppa*-*-* } { if [istarget *-*-linux*] { run_dump_test semi } }
31     { *c4x*-*-* } { }
32     { *c54x*-*-* } { }
33     default {
34         run_dump_test semi
35     }
36 }
37
38 if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
39     # FIXME: Due to macro mishandling of ONLY_STANDARD_ESCAPES.
40     setup_xfail "avr-*" "cris-*" "crisv32-*" "msp430-*"
41
42     # These fail due to NO_STRING_ESCAPES
43     setup_xfail "powerpc*-*-aix*" "powerpc*-*-beos*" "powerpc*-*-macos*"
44     setup_xfail "powerpc*-*-pe" "powerpc*-*-*win*"
45     setup_xfail "rs6000-*-*"
46     setup_xfail "z80-*-*"
47
48     # FIXME: Due to difference in what "consecutive octets" means.
49     setup_xfail "*c4x*-*-*" "*c54x*-*"
50     run_dump_test strings
51 }
52
53 run_dump_test app1
54 run_dump_test app2
55 run_dump_test app3
56 remote_download host "$srcdir/$subdir/app4b.s"
57 run_dump_test app4
58
59 run_list_test badarg ""
60
61 case $target_triplet in {
62     { *c54x*-*-* } { }
63     { *c4x*-*-* } { }
64     { mmix-* } { }
65     { rx-*-* } { }
66     default { run_list_test dot "-alm" }
67 }
68 run_list_test end ""
69 run_list_test purge "--hash-size=8000"
70 run_list_test redef ""
71
72 # This test is valid only when '!' is not a comment character
73 # (it is allowed to be a line comment character).
74 if [string match "" [lindex [gas_run ../all/excl.s "-o /dev/null" ""] 0]] {
75     run_dump_test paren
76 }
77
78 # PR 58925: A .exitm pseudo-op outside of a macro definition
79 #  prevented the assembler from parsing the rest of the file,
80 #  and hence catching an erroroneous instruction.
81 gas_test_error "exit.s" "" ".exitm outside of a macro"