blob: 26abb8ee6bd87f040315083f3fd0416ba46f960d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
#
# These tests should be valid on all targets.
#
# I think currently all targets fail this one when listings are enabled.
gas_test "p2425.s" "" "" "pcrel values in assignment"
# p1480.s uses a ".space" directive which for most assemblers means
# "allocate some space". On the PA it means "switch into this space".
#
# Therefore this test (as it is currently written) is completely bogus
# for any PA target. Do not bother trying to run it and just claim
# it fails.
if [istarget hppa*-*-*] then {
setup_xfail *-*-*
fail "simplifiable double subtraction"
} else {
gas_test "p1480.s" "" "-a>" "simplifiable double subtraction"
}
gas_test "float.s" "" "" "simple FP constants"
# This test is meaningless for the PA; the difference of two undefined
# symbols is something that is (and must be) supported on the PA.
if ![istarget hppa*-*-*] then {
# the h8300 fails because we skip all the logic in fixup_segment
setup_xfail "h8300*-*-*"
gas_test_error "diff1.s" "" "difference of two undefined symbols"
}
proc do_comment {} {
set testname "comment.s: comments in listings"
set x1 0
set x2 0
set x3 0
set white {[ \t]*}
gas_start "comment.s" "-al"
while 1 {
# Apparently CRLF is received when using ptys for subprocesses; hence the
# \r\n for line 3.
expect {
-re "^ +1\[ \t\]+# This\[^\n\]*\n" { set x1 1 }
-re "^ +2\[ \t\]+# correctly\[^\n\]*\n" { set x2 1 }
-re "^ +3\[ \t\]+/. C comments too. ./\r?\n" { set x3 1 }
-re "\[^\n\]*\n" { }
timeout { perror "timeout\n"; break }
eof { break }
}
}
gas_finish
if [all_ones $x1 $x2 $x3] then { pass $testname } else { fail $testname }
}
do_comment
#
# Test x930509a -- correct assembly of differences involving forward
# references.
#
proc do_930509a {} {
set testname "difference between forward references"
set x 0
gas_start "x930509.s" "-al"
while 1 {
# We need to accomodate both byte orders here.
# If ".long" means an 8-byte value on some target someday, this test will have
# to be fixed.
expect {
-re "^ +1 .... 0000 *0000" { fail $testname; set x 1 }
-re "^ +1 .... 0400 *0000" { pass $testname; set x 1 }
-re "^ +1 .... 0000 *0004" { pass $testname; set x 1 }
-re "\[^\n\]*\n" { }
timeout { perror "timeout\n"; break }
eof { break }
}
}
gas_finish
if !$x then { fail $testname }
}
# This test is meaningless for the PA; the difference of two symbols
# must not be resolved by the assembler.
if ![istarget hppa*-*-*] then {
# the h8300 fails because we skip all the logic in fixup_segment
setup_xfail "h8300*-*-*"
do_930509a
}
if ![istarget hppa*-*-*] then {
run_dump_test struct
}
# FIXME: this is here cause of a bug in DejaGnu 1.1.1. When it is no longer
# in use, then this can be removed.
if [info exists errorInfo] then {
unset errorInfo
}
|