* Updated DVP test case to match new alignment code that was checked in two
[deliverable/binutils-gdb.git] / gas / testsuite / gas / all / gas.exp
CommitLineData
644df6f6
JL
1#
2# These tests should be valid on all targets.
3#
4
5# I think currently all targets fail this one when listings are enabled.
6gas_test "p2425.s" "" "" "pcrel values in assignment"
7
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".
10#
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
13# it fails.
14if [istarget hppa*-*-*] then {
15 setup_xfail *-*-*
16 fail "simplifiable double subtraction"
644df6f6 17} else {
5cd26e22 18 gas_test "p1480.s" "" "-a>" "simplifiable double subtraction"
644df6f6
JL
19}
20
21gas_test "float.s" "" "" "simple FP constants"
22
5cd26e22
ILT
23# This test is meaningless for the PA; the difference of two undefined
24# symbols is something that is (and must be) supported on the PA.
25if ![istarget hppa*-*-*] then {
26 # the h8300 fails because we skip all the logic in fixup_segment
27 setup_xfail "h8300*-*-*"
28 gas_test_error "diff1.s" "" "difference of two undefined symbols"
29}
644df6f6
JL
30
31proc do_comment {} {
32 set testname "comment.s: comments in listings"
33 set x1 0
34 set x2 0
35 set x3 0
36 set white {[ \t]*}
37 gas_start "comment.s" "-al"
38 while 1 {
39# Apparently CRLF is received when using ptys for subprocesses; hence the
40# \r\n for line 3.
41 expect {
42 -re "^ +1\[ \t\]+# This\[^\n\]*\n" { set x1 1 }
43 -re "^ +2\[ \t\]+# correctly\[^\n\]*\n" { set x2 1 }
5cd26e22 44 -re "^ +3\[ \t\]+/. C comments too. ./\r?\n" { set x3 1 }
644df6f6 45 -re "\[^\n\]*\n" { }
5cd26e22 46 timeout { perror "timeout\n"; break }
644df6f6
JL
47 eof { break }
48 }
49 }
50 gas_finish
51 if [all_ones $x1 $x2 $x3] then { pass $testname } else { fail $testname }
52}
53
54do_comment
55
56#
57# Test x930509a -- correct assembly of differences involving forward
58# references.
59#
60
61proc do_930509a {} {
62 set testname "difference between forward references"
63 set x 0
64 gas_start "x930509.s" "-al"
65 while 1 {
66# We need to accomodate both byte orders here.
67# If ".long" means an 8-byte value on some target someday, this test will have
68# to be fixed.
69 expect {
5cd26e22
ILT
70 -re "^ +1 .... 0000 *0000" { fail $testname; set x 1 }
71 -re "^ +1 .... 0400 *0000" { pass $testname; set x 1 }
72 -re "^ +1 .... 0000 *0004" { pass $testname; set x 1 }
644df6f6 73 -re "\[^\n\]*\n" { }
5cd26e22 74 timeout { perror "timeout\n"; break }
644df6f6
JL
75 eof { break }
76 }
77 }
78 gas_finish
79 if !$x then { fail $testname }
80}
81
5cd26e22
ILT
82# This test is meaningless for the PA; the difference of two symbols
83# must not be resolved by the assembler.
84if ![istarget hppa*-*-*] then {
85 # the h8300 fails because we skip all the logic in fixup_segment
86 setup_xfail "h8300*-*-*"
87 # the vax fails because VMS can apparently actually handle this
88 # case in relocs, so gas doesn't handle it itself.
89 setup_xfail "vax*-*-vms*"
90 do_930509a
91}
92
93if ![istarget hppa*-*-*] then {
94 run_dump_test struct
95}
96
97# This test is for any COFF target.
98if { [istarget *-*-coff*] \
99 || [istarget *-*-pe*] \
100 || [istarget a29k-*-udi*] \
101 || [istarget a29k-*-ebmon*] \
102 || [istarget a29k-*-sym*] \
103 || [istarget a29k-*-vxworks*] \
104 || [istarget i*86-*-aix*] \
105 || [istarget i*86-*-sco*] \
106 || [istarget i*86-*-isc*] \
107 || [istarget i*86-*-go32*] \
108 || [istarget i*86-*-cygwin*] \
109 || [istarget i*86-*-*nt] \
110 || ([istarget i960-*-vxworks5.*] && ![istarget i960-*-vxworks5.0*]) } {
111 run_dump_test cofftag
112}
113
ae61c2de
RS
114# FIXME: this is here cause of a bug in DejaGnu 1.1.1. When it is no longer
115# in use, then this can be removed.
116if [info exists errorInfo] then {
117 unset errorInfo
118}
This page took 0.166878 seconds and 4 git commands to generate.