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 and Z80.
27 if { ![istarget cris
-*-*] && ![istarget crisv32
-*-*]
28 && ![istarget z80
-*-*] } then {
29 gas_test
"float.s" "" "" "simple FP constants"
32 # This test is meaningless
for the PA
; the difference of two undefined
33 # symbols is something that is
(and must be
) supported
on the PA.
34 if ![istarget hppa
*-*-*] then {
35 gas_test_error
"diff1.s" "" "difference of two undefined symbols"
38 gas_test_error
"equiv1.s" "" ".equiv for symbol already set to another one"
39 gas_test_error
"equiv2.s" "" ".equiv for symbol already set to an expression"
41 # .equ works differently
on some targets.
42 case $target_triplet in
{
46 gas_test
"equ-ok.s" "" "" ".equ for symbol already set"
47 gas_test_error
"equ-bad.s" "" ".equ for symbol already set through .eqv"
51 gas_test
"eqv-ok.s" "" "" ".eqv support"
52 gas_test_error
"eqv-bad.s" "" ".eqv for symbol already set"
54 gas_test
"assign-ok.s" "" "" "== assignment support"
55 gas_test_error
"assign-bad.s" "" "== assignment for symbol already set"
57 # .equ works differently
on some targets.
58 # linkrelax
-ing prevents most forward references from working.
59 case $target_triplet in
{
63 { mn10\
[23\
]00*-*-* } { }
66 # Some targets don
't manage to resolve BFD_RELOC_8 for constants.
67 setup_xfail "alpha*-*-*" "avr-*-*" "*c30*-*-*" "*c4x*-*-*" \
68 "d\[13\]0v*-*-*" "i860-*-*" "mips*-*-*" "msp430-*-*" \
69 "pdp11-*-*" "sparc*-*-*" "xtensa-*-*"
74 # .set works differently on some targets.
75 case $target_triplet in {
82 setup_xfail "*c30*-*-*" "*c4x*-*-*" "pdp11-*-*"
88 set testname "comment.s: comments in listings"
93 gas_start "comment.s" "-al"
95 # Apparently CRLF is received when using ptys for subprocesses; hence the
98 -re "^ +1\[ \t\]+# This\[^\n\]*\n" { set x1 1 }
99 -re "^ +2\[ \t\]+# correctly\[^\n\]*\n" { set x2 1 }
100 -re "^ +3\[ \t\]+/. C comments too. ./\r?\n" { set x3 1 }
102 timeout { perror "timeout\n"; break }
107 if [all_ones $x1 $x2 $x3] then { pass $testname } else { fail $testname }
113 # Test x930509a -- correct assembly of differences involving forward
118 set testname "difference between forward references"
120 gas_start "x930509.s" "-al"
122 # We need to accomodate both byte orders here.
123 # If ".long" means an 8-byte value on some target someday, this test will have
126 -re "^ +1 .... 00 ?00 ?00 ?00" { fail $testname; set x 1 }
127 -re "^ +1 .... 04 ?00 ?00 ?00" { pass $testname; set x 1 }
128 -re "^ +1 .... 00 ?00 ?00 ?04" { pass $testname; set x 1 }
130 timeout { perror "timeout\n"; break }
135 if !$x then { fail $testname }
138 # This test is meaningless for the PA and CRX; the difference of two symbols
139 # must not be resolved by the assembler.
140 # C54x assembler (for compatibility) does not allow differences between
142 # C30 counts a four byte offset as a difference of one.
143 if { ![istarget hppa*-*-*] &&
144 ![istarget crx*-*-*] &&
145 ![istarget *c30*-*-*] &&
146 ![istarget *c4x*-*-*] &&
147 ![istarget *c54x*-*-*] } then {
148 # the vax fails because VMS can apparently actually handle this
149 # case in relocs, so gas doesn't handle it itself.
150 setup_xfail
"h8300*-*-elf*" "mn10200*-*-*" "mn10300*-*-*" "vax*-*-vms*"
154 #
".struct" and ".align" have different meanings on c54x
155 # These directives are done in the c54x
-specific tests instead
156 case $target_triplet in
{
167 #
'<' and
'>' appear to have special meanings
on the excluded targets
168 case $target_triplet in
{
177 run_dump_test altmacro
178 # The second test is valid only when
'!' is not a comment
179 # character
(it is allowed to be a line comment character
).
180 if [string match
"" [lindex [gas_run excl.s "-o /dev/null" ""] 0]] {
181 run_dump_test altmac2
182 # Similarly this test does not work when
! is a line seperator.
188 # This test is
for any COFF target.
189 # We omit the ARM toolchains because they
define locals to
190 # start with
'.', which eliminates .eos
, .
text etc from the output.
191 # Omit c54x
, since .tag and .def mean something different
on that target
192 # Omit Z80
, since octal numbers need a suffix
on that target
193 if { ([istarget
*-*-coff
*] && ![istarget
*arm
*-*-coff
] && ![istarget thumb
*-*-coff
] && ![istarget xscale
-*-coff
] && ![istarget
*c4x
*-*-coff
] && ![istarget
*c54x
*-*-coff
] && ![istarget z80
-*-coff
]) \
194 ||
([istarget
*-*-pe
*] && ![istarget arm
*-*-pe
*] && ![istarget thumb
*-*-pe
*]) \
195 ||
[istarget i
*86-*-aix
*] \
196 ||
[istarget i
*86-*-sco
*] \
197 ||
[istarget i
*86-*-isc
*] \
198 ||
[istarget i
*86-*-go32
*] \
199 ||
[istarget i
*86-*-cygwin
*] \
200 ||
[istarget i
*86-*-*nt
] \
201 ||
[istarget i
*86-*-interix
*] \
202 ||
([istarget i960
-*-vxworks5.
*] && ![istarget i960
-*-vxworks5.0
*]) } {
203 run_dump_test cofftag
206 # Test omitting conditionals from listings.
212 set testname
"conditional listings"
213 gas_run cond.s
"-alc" ">dump.out"
214 if ![string match
"" $comp_output] {
215 send_log
"$comp_output\n"
218 if { [regexp_diff dump.out $srcdir
/$subdir
/cond.l
] } {
226 # This test is not suitable
for the PA
for various reasons
227 # not limited to the fact that it depends
on specific section
228 # names appearing in the output file.
229 # again
, p2align doesn
't work on c54x target
230 case $target_triplet in {
240 if { ([istarget "i*86-*-*pe*"] && ![istarget "i*86-*-openbsd*"]) \
241 || [istarget "i*86-*-cygwin*"] \
242 || [istarget "i*86-*-mingw32*"] } {
243 gas_test "fastcall.s" "" "" "fastcall labels"
247 run_dump_test sleb128
249 # .quad is 16 bytes on i960.
250 if { ![istarget "i960-*-*"] } {
255 # .set works differently on some targets.
256 case $target_triplet in {
259 run_dump_test weakref1
260 run_dump_test weakref1g
261 run_dump_test weakref1l
262 run_dump_test weakref1u
263 run_dump_test weakref1w
266 gas_test_error "weakref2.s" "" "e: would close weakref loop: e => a => b => c => d => e"
267 gas_test_error "weakref3.s" "" "a: would close weakref loop: a => b => c => d => e => a"
268 gas_test_error "weakref4.s" "" "is already defined"
272 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/err-*.s $srcdir/$subdir/warn-*.s]] "" ""