Commit | Line | Data |
---|---|---|
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. | |
6 | gas_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. | |
14 | if [istarget hppa*-*-*] then { | |
15 | setup_xfail *-*-* | |
16 | fail "simplifiable double subtraction" | |
17 | setup_xfail *-*-* | |
18 | fail "simplifiable double subtraction, with listings" | |
19 | } else { | |
20 | setup_xfail *-*-* | |
21 | gas_test "p1480.s" "" "" "simplifiable double subtraction" | |
22 | setup_xfail *-*-* | |
23 | gas_test "p1480.s" "-a" "" "simplifiable double subtraction, with listings" | |
24 | } | |
25 | ||
26 | gas_test "float.s" "" "" "simple FP constants" | |
27 | ||
28 | gas_test_error "diff1.s" "" "difference of two undefined symbols" | |
29 | ||
30 | proc do_comment {} { | |
31 | set testname "comment.s: comments in listings" | |
32 | set x1 0 | |
33 | set x2 0 | |
34 | set x3 0 | |
35 | set white {[ \t]*} | |
36 | gas_start "comment.s" "-al" | |
37 | while 1 { | |
38 | # Apparently CRLF is received when using ptys for subprocesses; hence the | |
39 | # \r\n for line 3. | |
40 | expect { | |
41 | -re "^ +1\[ \t\]+# This\[^\n\]*\n" { set x1 1 } | |
42 | -re "^ +2\[ \t\]+# correctly\[^\n\]*\n" { set x2 1 } | |
43 | -re "^ +3\[ \t\]+/. C comments too. ./\r\n" { set x3 1 } | |
44 | -re "\[^\n\]*\n" { } | |
45 | timeout { error "timeout\n"; break } | |
46 | eof { break } | |
47 | } | |
48 | } | |
49 | gas_finish | |
50 | if [all_ones $x1 $x2 $x3] then { pass $testname } else { fail $testname } | |
51 | } | |
52 | ||
53 | do_comment | |
54 | ||
55 | # | |
56 | # Test x930509a -- correct assembly of differences involving forward | |
57 | # references. | |
58 | # | |
59 | ||
60 | proc do_930509a {} { | |
61 | set testname "difference between forward references" | |
62 | set x 0 | |
63 | gas_start "x930509.s" "-al" | |
64 | while 1 { | |
65 | # We need to accomodate both byte orders here. | |
66 | # If ".long" means an 8-byte value on some target someday, this test will have | |
67 | # to be fixed. | |
68 | expect { | |
69 | -re "^ +1 .... 00000000" { fail $testname; set x 1 } | |
70 | -re "^ +1 .... 04000000" { pass $testname; set x 1 } | |
71 | -re "^ +1 .... 00000004" { pass $testname; set x 1 } | |
72 | -re "\[^\n\]*\n" { } | |
73 | timeout { error "timeout\n"; break } | |
74 | eof { break } | |
75 | } | |
76 | } | |
77 | gas_finish | |
78 | if !$x then { fail $testname } | |
79 | } | |
80 | ||
81 | do_930509a | |
ae61c2de RS |
82 | # FIXME: this is here cause of a bug in DejaGnu 1.1.1. When it is no longer |
83 | # in use, then this can be removed. | |
84 | if [info exists errorInfo] then { | |
85 | unset errorInfo | |
86 | } |