2 # These tests should be valid on all targets.
5 # I think currently all targets fail this one when listings are enabled.
6 gas_test "p2425.s" "" "" "pcrel values in assignment"
8 # p1480.s uses a ".space" directive which for most assemblers means
9 # "allocate some space". On the PA it means "switch into this space".
11 # Therefore this test (as it is currently written) is completely bogus
12 # for any PA target. Do not bother trying to run it and just claim
15 # The C54x uses ".space" to allocate bits, and requires absolute expressions;
16 # The ".space" directive is taken care of in the C54x-specific tests, so fail
19 if { [istarget hppa*-*-*] || [istarget *c54x*-*-*] } then {
21 fail "simplifiable double subtraction"
23 gas_test "p1480.s" "" "-a>" "simplifiable double subtraction"
26 # No floating point support in assembly code for CRIS.
27 if { ![istarget cris-*-*] && ![istarget crisv32-*-*] } then {
28 gas_test "float.s" "" "" "simple FP constants"
31 # This test is meaningless for the PA; the difference of two undefined
32 # symbols is something that is (and must be) supported on the PA.
33 if ![istarget hppa*-*-*] then {
34 gas_test_error "diff1.s" "" "difference of two undefined symbols"
38 set testname "comment.s: comments in listings"
43 gas_start "comment.s" "-al"
45 # Apparently CRLF is received when using ptys for subprocesses; hence the
48 -re "^ +1\[ \t\]+# This\[^\n\]*\n" { set x1 1 }
49 -re "^ +2\[ \t\]+# correctly\[^\n\]*\n" { set x2 1 }
50 -re "^ +3\[ \t\]+/. C comments too. ./\r?\n" { set x3 1 }
52 timeout { perror "timeout\n"; break }
57 if [all_ones $x1 $x2 $x3] then { pass $testname } else { fail $testname }
63 # Test x930509a -- correct assembly of differences involving forward
68 set testname "difference between forward references"
70 gas_start "x930509.s" "-al"
72 # We need to accomodate both byte orders here.
73 # If ".long" means an 8-byte value on some target someday, this test will have
76 -re "^ +1 .... 00 ?00 ?00 ?00" { fail $testname; set x 1 }
77 -re "^ +1 .... 04 ?00 ?00 ?00" { pass $testname; set x 1 }
78 -re "^ +1 .... 00 ?00 ?00 ?04" { pass $testname; set x 1 }
80 timeout { perror "timeout\n"; break }
85 if !$x then { fail $testname }
88 # This test is meaningless for the PA and CRX; the difference of two symbols
89 # must not be resolved by the assembler.
90 # C54x assembler (for compatibility) does not allow differences between
92 # C30 counts a four byte offset as a difference of one.
93 if { ![istarget hppa*-*-*] &&
94 ![istarget crx*-*-*] &&
95 ![istarget *c30*-*-*] &&
96 ![istarget *c4x*-*-*] &&
97 ![istarget *c54x*-*-*] } then {
98 # the vax fails because VMS can apparently actually handle this
99 # case in relocs, so gas doesn't handle it itself.
100 setup_xfail "h8300*-*-elf*" "mn10200*-*-*" "mn10300*-*-*" "vax*-*-vms*"
104 # ".struct" and ".align" have different meanings on c54x
105 # These directives are done in the c54x-specific tests instead
106 case $target_triplet in {
117 # '<' and '>' appear to have special meanings on the excluded targets
118 case $target_triplet in {
127 run_dump_test altmacro
128 # The second test is valid only when '!' is not a comment
129 # character (it is allowed to be a line comment character).
130 if [string match "" [lindex [gas_run excl.s "-o /dev/null" ""] 0]] {
131 run_dump_test altmac2
136 # This test is for any COFF target.
137 # We omit m88k COFF because it uses weird pseudo-op names.
138 # We omit the ARM toolchains because they define locals to
139 # start with '.', which eliminates .eos, .text etc from the output.
140 # Omit c54x, since .tag and .def mean something different on that target
141 if { ([istarget *-*-coff*] && ![istarget m88*-*-*] && ![istarget *arm*-*-coff] && ![istarget thumb*-*-coff] && ![istarget xscale-*-coff] && ![istarget *c4x*-*-coff] && ![istarget *c54x*-*-coff]) \
142 ||([istarget *-*-pe*] && ![istarget arm*-*-pe*] && ![istarget thumb*-*-pe*]) \
143 || [istarget a29k-*-udi*] \
144 || [istarget a29k-*-ebmon*] \
145 || [istarget a29k-*-sym*] \
146 || [istarget a29k-*-vxworks*] \
147 || [istarget i*86-*-aix*] \
148 || [istarget i*86-*-sco*] \
149 || [istarget i*86-*-isc*] \
150 || [istarget i*86-*-go32*] \
151 || [istarget i*86-*-cygwin*] \
152 || [istarget i*86-*-*nt] \
153 || [istarget i*86-*-interix*] \
154 || ([istarget i960-*-vxworks5.*] && ![istarget i960-*-vxworks5.0*]) } {
155 run_dump_test cofftag
158 # Test omitting conditionals from listings.
164 set testname "conditional listings"
165 gas_run cond.s "-alc" ">dump.out"
166 if ![string match "" $comp_output] {
167 send_log "$comp_output\n"
170 if { [regexp_diff dump.out $srcdir/$subdir/cond.d] } {
178 # This test is not suitable for the PA for various reasons
179 # not limited to the fact that it depends on specific section
180 # names appearing in the output file.
181 # again, p2align doesn't work on c54x target
182 case $target_triplet in {
192 if { [istarget "i*86-*-*pe*"] \
193 || [istarget "i*86-*-cygwin*"] \
194 || [istarget "i*86-*-mingw32*"] } {
195 gas_test "fastcall.s" "" "" "fastcall labels"