OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [gas/] [testsuite/] [gas/] [hppa/] [basic/] [basic.exp] - Blame information for rev 205

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 205 julius
# Copyright (C) 1993, 1996, 1997, 1999, 2002, 2005, 2007
2
# Free Software Foundation, Inc.
3
 
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 3 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
17
 
18
# Please email any bugs, comments, and/or additions to this file to:
19
# dejagnu@gnu.org
20
 
21
# Written by the Center for Software Science at the Univeristy of Utah
22
# and by Cygnus Support.
23
 
24
proc do_imem {} {
25
    set testname "imem.s: integer memory loads and stores"
26
    set x 0
27
 
28
    gas_start "imem.s" "-al"
29
 
30
    # Check the assembled instruction against a table built by the HP assembler
31
    # Any differences should be checked by hand -- with the number of problems
32
    # I've seen in the HP assembler I don't completely trust it.
33
    #
34
    # Instead of having a variable for each match string just increment the
35
    # total number of matches seen.  That's simpler when testing large numbers
36
    # of instructions (as these tests to).
37
    while 1 {
38
        expect {
39
            -re "^ +\[0-9\]+ 0000 489A0000\[^\n\]*\n"   { set x [expr $x+1] }
40
            -re "^ +\[0-9\]+ 0000 0C80109A\[^\n\]*\n"   { set x [expr $x+1] }
41
            -re "^ +\[0-9\]+ 0004 449A0000\[^\n\]*\n"   { set x [expr $x+1] }
42
            -re "^ +\[0-9\]+ 0004 0C80105A\[^\n\]*\n"   { set x [expr $x+1] }
43
            -re "^ +\[0-9\]+ 0008 409A0000\[^\n\]*\n"   { set x [expr $x+1] }
44
            -re "^ +\[0-9\]+ 0008 0C80101A\[^\n\]*\n"   { set x [expr $x+1] }
45
            -re "^ +\[0-9\]+ 000c 689A0000\[^\n\]*\n"   { set x [expr $x+1] }
46
            -re "^ +\[0-9\]+ 000c 0C9A1280\[^\n\]*\n"   { set x [expr $x+1] }
47
            -re "^ +\[0-9\]+ 0010 649A0000\[^\n\]*\n"   { set x [expr $x+1] }
48
            -re "^ +\[0-9\]+ 0010 0C9A1240\[^\n\]*\n"   { set x [expr $x+1] }
49
            -re "^ +\[0-9\]+ 0014 609A0000\[^\n\]*\n"   { set x [expr $x+1] }
50
            -re "^ +\[0-9\]+ 0014 0C9A1200\[^\n\]*\n"   { set x [expr $x+1] }
51
            -re "^ +\[0-9\]+ 0018 4C9A0000\[^\n\]*\n"   { set x [expr $x+1] }
52
            -re "^ +\[0-9\]+ 001c 6C9A0000\[^\n\]*\n"   { set x [expr $x+1] }
53
            -re "^ +\[0-9\]+ 0020 0C85009A\[^\n\]*\n"   { set x [expr $x+1] }
54
            -re "^ +\[0-9\]+ 0024 0C85209A\[^\n\]*\n"   { set x [expr $x+1] }
55
            -re "^ +\[0-9\]+ 0028 0C8500BA\[^\n\]*\n"   { set x [expr $x+1] }
56
            -re "^ +\[0-9\]+ 002c 0C8520BA\[^\n\]*\n"   { set x [expr $x+1] }
57
            -re "^ +\[0-9\]+ 0030 0C85005A\[^\n\]*\n"   { set x [expr $x+1] }
58
            -re "^ +\[0-9\]+ 0034 0C85205A\[^\n\]*\n"   { set x [expr $x+1] }
59
            -re "^ +\[0-9\]+ 0038 0C85007A\[^\n\]*\n"   { set x [expr $x+1] }
60
            -re "^ +\[0-9\]+ 003c 0C85207A\[^\n\]*\n"   { set x [expr $x+1] }
61
            -re "^ +\[0-9\]+ 0040 0C85001A\[^\n\]*\n"   { set x [expr $x+1] }
62
            -re "^ +\[0-9\]+ 0044 0C85201A\[^\n\]*\n"   { set x [expr $x+1] }
63
            -re "^ +\[0-9\]+ 0048 0C85003A\[^\n\]*\n"   { set x [expr $x+1] }
64
            -re "^ +\[0-9\]+ 004c 0C85203A\[^\n\]*\n"   { set x [expr $x+1] }
65
            -re "^ +\[0-9\]+ 0050 0C85019A\[^\n\]*\n"   { set x [expr $x+1] }
66
            -re "^ +\[0-9\]+ 0054 0C85219A\[^\n\]*\n"   { set x [expr $x+1] }
67
            -re "^ +\[0-9\]+ 0058 0C8501BA\[^\n\]*\n"   { set x [expr $x+1] }
68
            -re "^ +\[0-9\]+ 005c 0C8521BA\[^\n\]*\n"   { set x [expr $x+1] }
69
            -re "^ +\[0-9\]+ 0060 0C8501DA\[^\n\]*\n"   { set x [expr $x+1] }
70
            -re "^ +\[0-9\]+ 0064 0C8521DA\[^\n\]*\n"   { set x [expr $x+1] }
71
            -re "^ +\[0-9\]+ 0068 0C8501FA\[^\n\]*\n"   { set x [expr $x+1] }
72
            -re "^ +\[0-9\]+ 006c 0C8521FA\[^\n\]*\n"   { set x [expr $x+1] }
73
            -re "^ +\[0-9\]+ 0070 0C80109A\[^\n\]*\n"   { set x [expr $x+1] }
74
            -re "^ +\[0-9\]+ 0074 0C8030BA\[^\n\]*\n"   { set x [expr $x+1] }
75
            -re "^ +\[0-9\]+ 0078 0C8010BA\[^\n\]*\n"   { set x [expr $x+1] }
76
            -re "^ +\[0-9\]+ 007c 0C80105A\[^\n\]*\n"   { set x [expr $x+1] }
77
            -re "^ +\[0-9\]+ 0080 0C80307A\[^\n\]*\n"   { set x [expr $x+1] }
78
            -re "^ +\[0-9\]+ 0084 0C80107A\[^\n\]*\n"   { set x [expr $x+1] }
79
            -re "^ +\[0-9\]+ 0088 0C80101A\[^\n\]*\n"   { set x [expr $x+1] }
80
            -re "^ +\[0-9\]+ 008c 0C80303A\[^\n\]*\n"   { set x [expr $x+1] }
81
            -re "^ +\[0-9\]+ 0090 0C80103A\[^\n\]*\n"   { set x [expr $x+1] }
82
            -re "^ +\[0-9\]+ 0094 0C80119A\[^\n\]*\n"   { set x [expr $x+1] }
83
            -re "^ +\[0-9\]+ 0098 0C8031BA\[^\n\]*\n"   { set x [expr $x+1] }
84
            -re "^ +\[0-9\]+ 009c 0C8011BA\[^\n\]*\n"   { set x [expr $x+1] }
85
            -re "^ +\[0-9\]+ 00a0 0C8011DA\[^\n\]*\n"   { set x [expr $x+1] }
86
            -re "^ +\[0-9\]+ 00a4 0C8031FA\[^\n\]*\n"   { set x [expr $x+1] }
87
            -re "^ +\[0-9\]+ 00a8 0C8011FA\[^\n\]*\n"   { set x [expr $x+1] }
88
            -re "^ +\[0-9\]+ 00ac 0C9A1280\[^\n\]*\n"   { set x [expr $x+1] }
89
            -re "^ +\[0-9\]+ 00b0 0C9A32A0\[^\n\]*\n"   { set x [expr $x+1] }
90
            -re "^ +\[0-9\]+ 00b4 0C9A12A0\[^\n\]*\n"   { set x [expr $x+1] }
91
            -re "^ +\[0-9\]+ 00b8 0C9A1240\[^\n\]*\n"   { set x [expr $x+1] }
92
            -re "^ +\[0-9\]+ 00bc 0C9A3260\[^\n\]*\n"   { set x [expr $x+1] }
93
            -re "^ +\[0-9\]+ 00c0 0C9A1260\[^\n\]*\n"   { set x [expr $x+1] }
94
            -re "^ +\[0-9\]+ 00c4 0C9A1200\[^\n\]*\n"   { set x [expr $x+1] }
95
            -re "^ +\[0-9\]+ 00c8 0C9A3220\[^\n\]*\n"   { set x [expr $x+1] }
96
            -re "^ +\[0-9\]+ 00cc 0C9A1220\[^\n\]*\n"   { set x [expr $x+1] }
97
            -re "^ +\[0-9\]+ 00d0 0C9A1380\[^\n\]*\n"   { set x [expr $x+1] }
98
            -re "^ +\[0-9\]+ 00d4 0C9A33A0\[^\n\]*\n"   { set x [expr $x+1] }
99
            -re "^ +\[0-9\]+ 00d8 0C9A13A0\[^\n\]*\n"   { set x [expr $x+1] }
100
            -re "^ +\[0-9\]+ 00dc 0C9A1300\[^\n\]*\n"   { set x [expr $x+1] }
101
            -re "^ +\[0-9\]+ 00e0 0C9A1300\[^\n\]*\n"   { set x [expr $x+1] }
102
            -re "^ +\[0-9\]+ 00e4 0C9A3300\[^\n\]*\n"   { set x [expr $x+1] }
103
            -re "^ +\[0-9\]+ 00e8 0C9A1320\[^\n\]*\n"   { set x [expr $x+1] }
104
            -re "^ +\[0-9\]+ 00ec 0C9A3320\[^\n\]*\n"   { set x [expr $x+1] }
105
            -re "\[^\n\]*\n"                            { }
106
            timeout                             { perror "timeout\n"; break }
107
            eof                                 { break }
108
        }
109
    }
110
 
111
    # This was intended to do any cleanup necessary.  It kinda looks like it
112
    # isn't needed, but just in case, please keep it in for now.
113
    gas_finish
114
 
115
    # Did we find what we were looking for?  If not, flunk it.
116
    if [expr $x==60] then { pass $testname } else { fail $testname }
117
}
118
 
119
proc do_immed {} {
120
    set testname "immed.s: immediate tests"
121
    set x 0
122
 
123
    gas_start "immed.s" "-al"
124
 
125
    # Check the assembled instruction against a table built by the HP assembler
126
    # Any differences should be checked by hand -- with the number of problems
127
    # I've seen in the HP assembler I don't completely trust it.
128
    #
129
    # Instead of having a variable for each match string just increment the
130
    # total number of matches seen.  That's simpler when testing large numbers
131
    # of instructions (as these tests to).
132
    while 1 {
133
        expect {
134
            -re "^ +\[0-9\]+ 0000 375A000A\[^\n\]*\n"   { set x [expr $x+1] }
135
            -re "^ +\[0-9\]+ 0004 234DFBD5\[^\n\]*\n"   { set x [expr $x+1] }
136
            -re "^ +\[0-9\]+ 0008 28ADFBD5\[^\n\]*\n"   { set x [expr $x+1] }
137
            -re "\[^\n\]*\n"                            { }
138
            timeout                             { perror "timeout\n"; break }
139
            eof                                 { break }
140
        }
141
    }
142
 
143
    # This was intended to do any cleanup necessary.  It kinda looks like it
144
    # isn't needed, but just in case, please keep it in for now.
145
    gas_finish
146
 
147
    # Did we find what we were looking for?  If not, flunk it.
148
    if [expr $x==3] then { pass $testname } else { fail $testname }
149
}
150
 
151
proc do_branch {} {
152
    set testname "branch.s: branch tests"
153
    set x 0
154
 
155
    gas_start "branch.s" "-al"
156
 
157
    # Check the assembled instruction against a table built by the HP assembler
158
    # Any differences should be checked by hand -- with the number of problems
159
    # I've seen in the HP assembler I don't completely trust it.
160
    #
161
    # Instead of having a variable for each match string just increment the
162
    # total number of matches seen.  That's simpler when testing large numbers
163
    # of instructions (as these tests to).
164
    while 1 {
165
        expect {
166
            -re "^ +\[0-9\]+ 0000 E85F1FF5\[^\n\]*\n"   { set x [expr $x+1] }
167
            -re "^ +\[0-9\]+ 0004 E85F1FEF\[^\n\]*\n"   { set x [expr $x+1] }
168
            -re "^ +\[0-9\]+ 0008 E81F1FE5\[^\n\]*\n"   { set x [expr $x+1] }
169
            -re "^ +\[0-9\]+ 000c E81F1FDF\[^\n\]*\n"   { set x [expr $x+1] }
170
            -re "^ +\[0-9\]+ 0010 E85F3FD5\[^\n\]*\n"   { set x [expr $x+1] }
171
            -re "^ +\[0-9\]+ 0014 E85F3FCF\[^\n\]*\n"   { set x [expr $x+1] }
172
            -re "^ +\[0-9\]+ 0018 E8444000\[^\n\]*\n"   { set x [expr $x+1] }
173
            -re "^ +\[0-9\]+ 001c E8444002\[^\n\]*\n"   { set x [expr $x+1] }
174
            -re "^ +\[0-9\]+ 0020 E8044000\[^\n\]*\n"   { set x [expr $x+1] }
175
            -re "^ +\[0-9\]+ 0024 E8044002\[^\n\]*\n"   { set x [expr $x+1] }
176
            -re "^ +\[0-9\]+ 0028 E840C000\[^\n\]*\n"   { set x [expr $x+1] }
177
            -re "^ +\[0-9\]+ 002c E840C002\[^\n\]*\n"   { set x [expr $x+1] }
178
            -re "^ +\[0-9\]+ 0030 E040446C\[^\n\]*\n"   { set x [expr $x+1] }
179
            -re "^ +\[0-9\]+ 0034 E040446E\[^\n\]*\n"   { set x [expr $x+1] }
180
            -re "^ +\[0-9\]+ 0038 E440446C\[^\n\]*\n"   { set x [expr $x+1] }
181
            -re "^ +\[0-9\]+ 003c E440446E\[^\n\]*\n"   { set x [expr $x+1] }
182
            -re "^ +\[0-9\]+ 0040 CB441FF5\[^\n\]*\n"   { set x [expr $x+1] }
183
            -re "^ +\[0-9\]+ 0044 CB443FED\[^\n\]*\n"   { set x [expr $x+1] }
184
            -re "^ +\[0-9\]+ 0048 CB445FE5\[^\n\]*\n"   { set x [expr $x+1] }
185
            -re "^ +\[0-9\]+ 004c CB447FDD\[^\n\]*\n"   { set x [expr $x+1] }
186
            -re "^ +\[0-9\]+ 0050 CB449FD5\[^\n\]*\n"   { set x [expr $x+1] }
187
            -re "^ +\[0-9\]+ 0054 CB44BFCD\[^\n\]*\n"   { set x [expr $x+1] }
188
            -re "^ +\[0-9\]+ 0058 CB44DFC5\[^\n\]*\n"   { set x [expr $x+1] }
189
            -re "^ +\[0-9\]+ 005c CB44FFBD\[^\n\]*\n"   { set x [expr $x+1] }
190
            -re "^ +\[0-9\]+ 0060 CB441FB7\[^\n\]*\n"   { set x [expr $x+1] }
191
            -re "^ +\[0-9\]+ 0064 CB443FAF\[^\n\]*\n"   { set x [expr $x+1] }
192
            -re "^ +\[0-9\]+ 0068 CB445FA7\[^\n\]*\n"   { set x [expr $x+1] }
193
            -re "^ +\[0-9\]+ 006c CB447F9F\[^\n\]*\n"   { set x [expr $x+1] }
194
            -re "^ +\[0-9\]+ 0070 CB449F97\[^\n\]*\n"   { set x [expr $x+1] }
195
            -re "^ +\[0-9\]+ 0074 CB44BF8F\[^\n\]*\n"   { set x [expr $x+1] }
196
            -re "^ +\[0-9\]+ 0078 CB44DF87\[^\n\]*\n"   { set x [expr $x+1] }
197
            -re "^ +\[0-9\]+ 007c CB44FF7F\[^\n\]*\n"   { set x [expr $x+1] }
198
            -re "^ +\[0-9\]+ 0080 CF4A1FF5\[^\n\]*\n"   { set x [expr $x+1] }
199
            -re "^ +\[0-9\]+ 0084 CF4A3FED\[^\n\]*\n"   { set x [expr $x+1] }
200
            -re "^ +\[0-9\]+ 0088 CF4A5FE5\[^\n\]*\n"   { set x [expr $x+1] }
201
            -re "^ +\[0-9\]+ 008c CF4A7FDD\[^\n\]*\n"   { set x [expr $x+1] }
202
            -re "^ +\[0-9\]+ 0090 CF4A9FD5\[^\n\]*\n"   { set x [expr $x+1] }
203
            -re "^ +\[0-9\]+ 0094 CF4ABFCD\[^\n\]*\n"   { set x [expr $x+1] }
204
            -re "^ +\[0-9\]+ 0098 CF4ADFC5\[^\n\]*\n"   { set x [expr $x+1] }
205
            -re "^ +\[0-9\]+ 009c CF4AFFBD\[^\n\]*\n"   { set x [expr $x+1] }
206
            -re "^ +\[0-9\]+ 00a0 CF4A1FB7\[^\n\]*\n"   { set x [expr $x+1] }
207
            -re "^ +\[0-9\]+ 00a4 CF4A3FAF\[^\n\]*\n"   { set x [expr $x+1] }
208
            -re "^ +\[0-9\]+ 00a8 CF4A5FA7\[^\n\]*\n"   { set x [expr $x+1] }
209
            -re "^ +\[0-9\]+ 00ac CF4A7F9F\[^\n\]*\n"   { set x [expr $x+1] }
210
            -re "^ +\[0-9\]+ 00b0 CF4A9F97\[^\n\]*\n"   { set x [expr $x+1] }
211
            -re "^ +\[0-9\]+ 00b4 CF4ABF8F\[^\n\]*\n"   { set x [expr $x+1] }
212
            -re "^ +\[0-9\]+ 00b8 CF4ADF87\[^\n\]*\n"   { set x [expr $x+1] }
213
            -re "^ +\[0-9\]+ 00bc CF4AFF7F\[^\n\]*\n"   { set x [expr $x+1] }
214
            -re "^ +\[0-9\]+ 00c0 80801FF5\[^\n\]*\n"   { set x [expr $x+1] }
215
            -re "^ +\[0-9\]+ 00c4 80803FED\[^\n\]*\n"   { set x [expr $x+1] }
216
            -re "^ +\[0-9\]+ 00c8 80805FE5\[^\n\]*\n"   { set x [expr $x+1] }
217
            -re "^ +\[0-9\]+ 00cc 80807FDD\[^\n\]*\n"   { set x [expr $x+1] }
218
            -re "^ +\[0-9\]+ 00d0 80809FD5\[^\n\]*\n"   { set x [expr $x+1] }
219
            -re "^ +\[0-9\]+ 00d4 8080BFCD\[^\n\]*\n"   { set x [expr $x+1] }
220
            -re "^ +\[0-9\]+ 00d8 8080DFC5\[^\n\]*\n"   { set x [expr $x+1] }
221
            -re "^ +\[0-9\]+ 00dc 8080FFBD\[^\n\]*\n"   { set x [expr $x+1] }
222
            -re "^ +\[0-9\]+ 00e0 88801FB5\[^\n\]*\n"   { set x [expr $x+1] }
223
            -re "^ +\[0-9\]+ 00e4 88803FAD\[^\n\]*\n"   { set x [expr $x+1] }
224
            -re "^ +\[0-9\]+ 00e8 88805FA5\[^\n\]*\n"   { set x [expr $x+1] }
225
            -re "^ +\[0-9\]+ 00ec 88807F9D\[^\n\]*\n"   { set x [expr $x+1] }
226
            -re "^ +\[0-9\]+ 00f0 88809F95\[^\n\]*\n"   { set x [expr $x+1] }
227
            -re "^ +\[0-9\]+ 00f4 8880BF8D\[^\n\]*\n"   { set x [expr $x+1] }
228
            -re "^ +\[0-9\]+ 00f8 8880DF85\[^\n\]*\n"   { set x [expr $x+1] }
229
            -re "^ +\[0-9\]+ 00fc 8880FF7D\[^\n\]*\n"   { set x [expr $x+1] }
230
            -re "^ +\[0-9\]+ 0100 80801F77\[^\n\]*\n"   { set x [expr $x+1] }
231
            -re "^ +\[0-9\]+ 0104 80803F6F\[^\n\]*\n"   { set x [expr $x+1] }
232
            -re "^ +\[0-9\]+ 0108 80805F67\[^\n\]*\n"   { set x [expr $x+1] }
233
            -re "^ +\[0-9\]+ 010c 80807F5F\[^\n\]*\n"   { set x [expr $x+1] }
234
            -re "^ +\[0-9\]+ 0110 80809F57\[^\n\]*\n"   { set x [expr $x+1] }
235
            -re "^ +\[0-9\]+ 0114 8080BF4F\[^\n\]*\n"   { set x [expr $x+1] }
236
            -re "^ +\[0-9\]+ 0118 8080DF47\[^\n\]*\n"   { set x [expr $x+1] }
237
            -re "^ +\[0-9\]+ 011c 8080FF3F\[^\n\]*\n"   { set x [expr $x+1] }
238
            -re "^ +\[0-9\]+ 0120 88801F37\[^\n\]*\n"   { set x [expr $x+1] }
239
            -re "^ +\[0-9\]+ 0124 88803F2F\[^\n\]*\n"   { set x [expr $x+1] }
240
            -re "^ +\[0-9\]+ 0128 88805F27\[^\n\]*\n"   { set x [expr $x+1] }
241
            -re "^ +\[0-9\]+ 012c 88807F1F\[^\n\]*\n"   { set x [expr $x+1] }
242
            -re "^ +\[0-9\]+ 0130 88809F17\[^\n\]*\n"   { set x [expr $x+1] }
243
            -re "^ +\[0-9\]+ 0134 8880BF0F\[^\n\]*\n"   { set x [expr $x+1] }
244
            -re "^ +\[0-9\]+ 0138 8880DF07\[^\n\]*\n"   { set x [expr $x+1] }
245
            -re "^ +\[0-9\]+ 013c 8880FEFF\[^\n\]*\n"   { set x [expr $x+1] }
246
            -re "^ +\[0-9\]+ 0140 84801FF5\[^\n\]*\n"   { set x [expr $x+1] }
247
            -re "^ +\[0-9\]+ 0144 84805FED\[^\n\]*\n"   { set x [expr $x+1] }
248
            -re "^ +\[0-9\]+ 0148 84807FE5\[^\n\]*\n"   { set x [expr $x+1] }
249
            -re "^ +\[0-9\]+ 014c 84809FDD\[^\n\]*\n"   { set x [expr $x+1] }
250
            -re "^ +\[0-9\]+ 0150 8480BFD5\[^\n\]*\n"   { set x [expr $x+1] }
251
            -re "^ +\[0-9\]+ 0154 8480DFCD\[^\n\]*\n"   { set x [expr $x+1] }
252
            -re "^ +\[0-9\]+ 0158 8480FFC5\[^\n\]*\n"   { set x [expr $x+1] }
253
            -re "^ +\[0-9\]+ 015c 8C801FBD\[^\n\]*\n"   { set x [expr $x+1] }
254
            -re "^ +\[0-9\]+ 0160 8C803FB5\[^\n\]*\n"   { set x [expr $x+1] }
255
            -re "^ +\[0-9\]+ 0164 8C805FAD\[^\n\]*\n"   { set x [expr $x+1] }
256
            -re "^ +\[0-9\]+ 0168 8C807FA5\[^\n\]*\n"   { set x [expr $x+1] }
257
            -re "^ +\[0-9\]+ 016c 8C809F9D\[^\n\]*\n"   { set x [expr $x+1] }
258
            -re "^ +\[0-9\]+ 0170 8C80BF95\[^\n\]*\n"   { set x [expr $x+1] }
259
            -re "^ +\[0-9\]+ 0174 8C80DF8D\[^\n\]*\n"   { set x [expr $x+1] }
260
            -re "^ +\[0-9\]+ 0178 8C80FE85\[^\n\]*\n"   { set x [expr $x+1] }
261
            -re "^ +\[0-9\]+ 017c 84801F7F\[^\n\]*\n"   { set x [expr $x+1] }
262
            -re "^ +\[0-9\]+ 0180 84803F77\[^\n\]*\n"   { set x [expr $x+1] }
263
            -re "^ +\[0-9\]+ 0184 84805F6F\[^\n\]*\n"   { set x [expr $x+1] }
264
            -re "^ +\[0-9\]+ 0188 84807F67\[^\n\]*\n"   { set x [expr $x+1] }
265
            -re "^ +\[0-9\]+ 018c 84809F5F\[^\n\]*\n"   { set x [expr $x+1] }
266
            -re "^ +\[0-9\]+ 0190 8480BF57\[^\n\]*\n"   { set x [expr $x+1] }
267
            -re "^ +\[0-9\]+ 0194 8480DF4F\[^\n\]*\n"   { set x [expr $x+1] }
268
            -re "^ +\[0-9\]+ 0198 8480FF47\[^\n\]*\n"   { set x [expr $x+1] }
269
            -re "^ +\[0-9\]+ 019c 8C801F3F\[^\n\]*\n"   { set x [expr $x+1] }
270
            -re "^ +\[0-9\]+ 01a0 8C803F37\[^\n\]*\n"   { set x [expr $x+1] }
271
            -re "^ +\[0-9\]+ 01a4 8C805F2F\[^\n\]*\n"   { set x [expr $x+1] }
272
            -re "^ +\[0-9\]+ 01a8 8C807F27\[^\n\]*\n"   { set x [expr $x+1] }
273
            -re "^ +\[0-9\]+ 01ac 8C809F1F\[^\n\]*\n"   { set x [expr $x+1] }
274
            -re "^ +\[0-9\]+ 01b0 8C80BF17\[^\n\]*\n"   { set x [expr $x+1] }
275
            -re "^ +\[0-9\]+ 01b4 8C80DF0F\[^\n\]*\n"   { set x [expr $x+1] }
276
            -re "^ +\[0-9\]+ 01b8 8C80FF07\[^\n\]*\n"   { set x [expr $x+1] }
277
            -re "^ +\[0-9\]+ 01bc A0811FF5\[^\n\]*\n"   { set x [expr $x+1] }
278
            -re "^ +\[0-9\]+ 01c0 A0813FED\[^\n\]*\n"   { set x [expr $x+1] }
279
            -re "^ +\[0-9\]+ 01c4 A0815FE5\[^\n\]*\n"   { set x [expr $x+1] }
280
            -re "^ +\[0-9\]+ 01c8 A0817FDD\[^\n\]*\n"   { set x [expr $x+1] }
281
            -re "^ +\[0-9\]+ 01cc A0819FD5\[^\n\]*\n"   { set x [expr $x+1] }
282
            -re "^ +\[0-9\]+ 01d0 A081BFCD\[^\n\]*\n"   { set x [expr $x+1] }
283
            -re "^ +\[0-9\]+ 01d4 A081DFC5\[^\n\]*\n"   { set x [expr $x+1] }
284
            -re "^ +\[0-9\]+ 01d8 A081FFBD\[^\n\]*\n"   { set x [expr $x+1] }
285
            -re "^ +\[0-9\]+ 01dc A8811FB5\[^\n\]*\n"   { set x [expr $x+1] }
286
            -re "^ +\[0-9\]+ 01e0 A8813FAD\[^\n\]*\n"   { set x [expr $x+1] }
287
            -re "^ +\[0-9\]+ 01e4 A8815FA5\[^\n\]*\n"   { set x [expr $x+1] }
288
            -re "^ +\[0-9\]+ 01e8 A8817F9D\[^\n\]*\n"   { set x [expr $x+1] }
289
            -re "^ +\[0-9\]+ 01ec A8819F95\[^\n\]*\n"   { set x [expr $x+1] }
290
            -re "^ +\[0-9\]+ 01f0 A881BF8D\[^\n\]*\n"   { set x [expr $x+1] }
291
            -re "^ +\[0-9\]+ 01f4 A881DF85\[^\n\]*\n"   { set x [expr $x+1] }
292
            -re "^ +\[0-9\]+ 01f8 A881FF7D\[^\n\]*\n"   { set x [expr $x+1] }
293
            -re "^ +\[0-9\]+ 01fc A0811F77\[^\n\]*\n"   { set x [expr $x+1] }
294
            -re "^ +\[0-9\]+ 0200 A0813F6F\[^\n\]*\n"   { set x [expr $x+1] }
295
            -re "^ +\[0-9\]+ 0204 A0815F67\[^\n\]*\n"   { set x [expr $x+1] }
296
            -re "^ +\[0-9\]+ 0208 A0817F5F\[^\n\]*\n"   { set x [expr $x+1] }
297
            -re "^ +\[0-9\]+ 020c A0819F57\[^\n\]*\n"   { set x [expr $x+1] }
298
            -re "^ +\[0-9\]+ 0210 A081BF4F\[^\n\]*\n"   { set x [expr $x+1] }
299
            -re "^ +\[0-9\]+ 0214 A081DF47\[^\n\]*\n"   { set x [expr $x+1] }
300
            -re "^ +\[0-9\]+ 0218 A081FF3F\[^\n\]*\n"   { set x [expr $x+1] }
301
            -re "^ +\[0-9\]+ 021c A8811F37\[^\n\]*\n"   { set x [expr $x+1] }
302
            -re "^ +\[0-9\]+ 0220 A8813F2F\[^\n\]*\n"   { set x [expr $x+1] }
303
            -re "^ +\[0-9\]+ 0224 A8815F27\[^\n\]*\n"   { set x [expr $x+1] }
304
            -re "^ +\[0-9\]+ 0228 A8817F1F\[^\n\]*\n"   { set x [expr $x+1] }
305
            -re "^ +\[0-9\]+ 022c A8819F17\[^\n\]*\n"   { set x [expr $x+1] }
306
            -re "^ +\[0-9\]+ 0230 A881BF0F\[^\n\]*\n"   { set x [expr $x+1] }
307
            -re "^ +\[0-9\]+ 0234 A881DF07\[^\n\]*\n"   { set x [expr $x+1] }
308
            -re "^ +\[0-9\]+ 0238 A881FEFF\[^\n\]*\n"   { set x [expr $x+1] }
309
            -re "^ +\[0-9\]+ 023c A49F1FF5\[^\n\]*\n"   { set x [expr $x+1] }
310
            -re "^ +\[0-9\]+ 0240 A49F3FED\[^\n\]*\n"   { set x [expr $x+1] }
311
            -re "^ +\[0-9\]+ 0244 A49F5FE5\[^\n\]*\n"   { set x [expr $x+1] }
312
            -re "^ +\[0-9\]+ 0248 A49F7FDD\[^\n\]*\n"   { set x [expr $x+1] }
313
            -re "^ +\[0-9\]+ 024c A49F9FD5\[^\n\]*\n"   { set x [expr $x+1] }
314
            -re "^ +\[0-9\]+ 0250 A49FBFCD\[^\n\]*\n"   { set x [expr $x+1] }
315
            -re "^ +\[0-9\]+ 0254 A49FDFC5\[^\n\]*\n"   { set x [expr $x+1] }
316
            -re "^ +\[0-9\]+ 0258 A49FFFBD\[^\n\]*\n"   { set x [expr $x+1] }
317
            -re "^ +\[0-9\]+ 025c AC9F1FB5\[^\n\]*\n"   { set x [expr $x+1] }
318
            -re "^ +\[0-9\]+ 0260 AC9F3FAD\[^\n\]*\n"   { set x [expr $x+1] }
319
            -re "^ +\[0-9\]+ 0264 AC9F5FA5\[^\n\]*\n"   { set x [expr $x+1] }
320
            -re "^ +\[0-9\]+ 0268 AC9F7F9D\[^\n\]*\n"   { set x [expr $x+1] }
321
            -re "^ +\[0-9\]+ 026c AC9F9F95\[^\n\]*\n"   { set x [expr $x+1] }
322
            -re "^ +\[0-9\]+ 0270 AC9FBF8D\[^\n\]*\n"   { set x [expr $x+1] }
323
            -re "^ +\[0-9\]+ 0274 AC9FDF85\[^\n\]*\n"   { set x [expr $x+1] }
324
            -re "^ +\[0-9\]+ 0278 AC9FFC85\[^\n\]*\n"   { set x [expr $x+1] }
325
            -re "^ +\[0-9\]+ 027c A49F1F77\[^\n\]*\n"   { set x [expr $x+1] }
326
            -re "^ +\[0-9\]+ 0280 A49F3F6F\[^\n\]*\n"   { set x [expr $x+1] }
327
            -re "^ +\[0-9\]+ 0284 A49F5F67\[^\n\]*\n"   { set x [expr $x+1] }
328
            -re "^ +\[0-9\]+ 0288 A49F7F5F\[^\n\]*\n"   { set x [expr $x+1] }
329
            -re "^ +\[0-9\]+ 028c A49F9F57\[^\n\]*\n"   { set x [expr $x+1] }
330
            -re "^ +\[0-9\]+ 0290 A49FBF4F\[^\n\]*\n"   { set x [expr $x+1] }
331
            -re "^ +\[0-9\]+ 0294 A49FDF47\[^\n\]*\n"   { set x [expr $x+1] }
332
            -re "^ +\[0-9\]+ 0298 A49FFF3F\[^\n\]*\n"   { set x [expr $x+1] }
333
            -re "^ +\[0-9\]+ 029c AC9F1F37\[^\n\]*\n"   { set x [expr $x+1] }
334
            -re "^ +\[0-9\]+ 02a0 AC9F3F2F\[^\n\]*\n"   { set x [expr $x+1] }
335
            -re "^ +\[0-9\]+ 02a4 AC9F5F27\[^\n\]*\n"   { set x [expr $x+1] }
336
            -re "^ +\[0-9\]+ 02a8 AC9F7F1F\[^\n\]*\n"   { set x [expr $x+1] }
337
            -re "^ +\[0-9\]+ 02ac AC9F9F17\[^\n\]*\n"   { set x [expr $x+1] }
338
            -re "^ +\[0-9\]+ 02b0 AC9FBF0F\[^\n\]*\n"   { set x [expr $x+1] }
339
            -re "^ +\[0-9\]+ 02b4 AC9FDF07\[^\n\]*\n"   { set x [expr $x+1] }
340
            -re "^ +\[0-9\]+ 02b8 AC9FFEFF\[^\n\]*\n"   { set x [expr $x+1] }
341
            -re "^ +\[0-9\]+ 02bc C0045FF5\[^\n\]*\n"   { set x [expr $x+1] }
342
            -re "^ +\[0-9\]+ 02c0 C004DFED\[^\n\]*\n"   { set x [expr $x+1] }
343
            -re "^ +\[0-9\]+ 02c4 C0045FE7\[^\n\]*\n"   { set x [expr $x+1] }
344
            -re "^ +\[0-9\]+ 02c8 C004DFDF\[^\n\]*\n"   { set x [expr $x+1] }
345
            -re "^ +\[0-9\]+ 02cc C4A45FD5\[^\n\]*\n"   { set x [expr $x+1] }
346
            -re "^ +\[0-9\]+ 02d0 C4A4DFCD\[^\n\]*\n"   { set x [expr $x+1] }
347
            -re "^ +\[0-9\]+ 02d4 C4A45FC7\[^\n\]*\n"   { set x [expr $x+1] }
348
            -re "^ +\[0-9\]+ 02d8 C4A4DFBF\[^\n\]*\n"   { set x [expr $x+1] }
349
            -re "\[^\n\]*\n"                            { }
350
            timeout                             { perror "timeout\n"; break }
351
            eof                                 { break }
352
        }
353
    }
354
 
355
    # This was intended to do any cleanup necessary.  It kinda looks like it
356
    # isn't needed, but just in case, please keep it in for now.
357
    gas_finish
358
 
359
    # Did we find what we were looking for?  If not, flunk it.
360
    if [expr $x==183] then { pass $testname } else { fail $testname }
361
}
362
 
363
proc do_branch2 {} {
364
    set testname "branch2.s: branch tests"
365
    set x 0
366
 
367
    gas_start "branch2.s" "-al"
368
 
369
    # Check the assembled instruction against a table built by the HP assembler
370
    # Any differences should be checked by hand -- with the number of problems
371
    # I've seen in the HP assembler I don't completely trust it.
372
    #
373
    # Instead of having a variable for each match string just increment the
374
    # total number of matches seen.  That's simpler when testing large numbers
375
    # of instructions (as these tests to).
376
    while 1 {
377
        expect {
378
            -re "^ +\[0-9\]+ 0000 C0045FF5\[^\n\]*\n"   { set x [expr $x+1] }
379
            -re "^ +\[0-9\]+ 0004 C004DFED\[^\n\]*\n"   { set x [expr $x+1] }
380
            -re "^ +\[0-9\]+ 0008 C0045FE7\[^\n\]*\n"   { set x [expr $x+1] }
381
            -re "^ +\[0-9\]+ 000c C004DFDF\[^\n\]*\n"   { set x [expr $x+1] }
382
            -re "^ +\[0-9\]+ 0010 C0047FD5\[^\n\]*\n"   { set x [expr $x+1] }
383
            -re "^ +\[0-9\]+ 0014 C004FFCD\[^\n\]*\n"   { set x [expr $x+1] }
384
            -re "^ +\[0-9\]+ 0018 C0047FC7\[^\n\]*\n"   { set x [expr $x+1] }
385
            -re "^ +\[0-9\]+ 001c C004FFBF\[^\n\]*\n"   { set x [expr $x+1] }
386
            -re "^ +\[0-9\]+ 0020 C4A47FB5\[^\n\]*\n"   { set x [expr $x+1] }
387
            -re "^ +\[0-9\]+ 0024 C4A4FFAD\[^\n\]*\n"   { set x [expr $x+1] }
388
            -re "^ +\[0-9\]+ 0028 C4A47FA7\[^\n\]*\n"   { set x [expr $x+1] }
389
            -re "^ +\[0-9\]+ 002c C4A4FF9F\[^\n\]*\n"   { set x [expr $x+1] }
390
            -re "^ +\[0-9\]+ 0030 E8004005\[^\n\]*\n"   { set x [expr $x+1] }
391
            -re "^ +\[0-9\]+ 0034 E800400D\[^\n\]*\n"   { set x [expr $x+1] }
392
            -re "^ +\[0-9\]+ 0038 E8004F9D\[^\n\]*\n"   { set x [expr $x+1] }
393
            -re "^ +\[0-9\]+ 003c E8004001\[^\n\]*\n"   { set x [expr $x+1] }
394
            -re "^ +\[0-9\]+ 0040 E8044001\[^\n\]*\n"   { set x [expr $x+1] }
395
            -re "\[^\n\]*\n"                            { }
396
            timeout                             { perror "timeout\n"; break }
397
            eof                                 { break }
398
        }
399
    }
400
 
401
    # This was intended to do any cleanup necessary.  It kinda looks like it
402
    # isn't needed, but just in case, please keep it in for now.
403
    gas_finish
404
 
405
    # Did we find what we were looking for?  If not, flunk it.
406
    if [expr $x==17] then { pass $testname } else { fail $testname }
407
}
408
 
409
proc do_add {} {
410
    set testname "add.s: add tests"
411
    set x 0
412
 
413
    gas_start "add.s" "-al"
414
 
415
    # Check the assembled instruction against a table built by the HP assembler
416
    # Any differences should be checked by hand -- with the number of problems
417
    # I've seen in the HP assembler I don't completely trust it.
418
    #
419
    # Instead of having a variable for each match string just increment the
420
    # total number of matches seen.  That's simpler when testing large numbers
421
    # of instructions (as these tests to).
422
    while 1 {
423
        expect {
424
            -re "^ +\[0-9\]+ 0000 08A40606\[^\n\]*\n"   { set x [expr $x+1] }
425
            -re "^ +\[0-9\]+ 0004 08A42606\[^\n\]*\n"   { set x [expr $x+1] }
426
            -re "^ +\[0-9\]+ 0008 08A44606\[^\n\]*\n"   { set x [expr $x+1] }
427
            -re "^ +\[0-9\]+ 000c 08A46606\[^\n\]*\n"   { set x [expr $x+1] }
428
            -re "^ +\[0-9\]+ 0010 08A48606\[^\n\]*\n"   { set x [expr $x+1] }
429
            -re "^ +\[0-9\]+ 0014 08A4A606\[^\n\]*\n"   { set x [expr $x+1] }
430
            -re "^ +\[0-9\]+ 0018 08A4C606\[^\n\]*\n"   { set x [expr $x+1] }
431
            -re "^ +\[0-9\]+ 001c 08A4E606\[^\n\]*\n"   { set x [expr $x+1] }
432
            -re "^ +\[0-9\]+ 0020 08A41606\[^\n\]*\n"   { set x [expr $x+1] }
433
            -re "^ +\[0-9\]+ 0024 08A43606\[^\n\]*\n"   { set x [expr $x+1] }
434
            -re "^ +\[0-9\]+ 0028 08A45606\[^\n\]*\n"   { set x [expr $x+1] }
435
            -re "^ +\[0-9\]+ 002c 08A47606\[^\n\]*\n"   { set x [expr $x+1] }
436
            -re "^ +\[0-9\]+ 0030 08A49606\[^\n\]*\n"   { set x [expr $x+1] }
437
            -re "^ +\[0-9\]+ 0034 08A4B606\[^\n\]*\n"   { set x [expr $x+1] }
438
            -re "^ +\[0-9\]+ 0038 08A4D606\[^\n\]*\n"   { set x [expr $x+1] }
439
            -re "^ +\[0-9\]+ 003c 08A4F606\[^\n\]*\n"   { set x [expr $x+1] }
440
            -re "^ +\[0-9\]+ 0040 08A40A06\[^\n\]*\n"   { set x [expr $x+1] }
441
            -re "^ +\[0-9\]+ 0044 08A42A06\[^\n\]*\n"   { set x [expr $x+1] }
442
            -re "^ +\[0-9\]+ 0048 08A44A06\[^\n\]*\n"   { set x [expr $x+1] }
443
            -re "^ +\[0-9\]+ 004c 08A46A06\[^\n\]*\n"   { set x [expr $x+1] }
444
            -re "^ +\[0-9\]+ 0050 08A48A06\[^\n\]*\n"   { set x [expr $x+1] }
445
            -re "^ +\[0-9\]+ 0054 08A4AA06\[^\n\]*\n"   { set x [expr $x+1] }
446
            -re "^ +\[0-9\]+ 0058 08A4CA06\[^\n\]*\n"   { set x [expr $x+1] }
447
            -re "^ +\[0-9\]+ 005c 08A4EA06\[^\n\]*\n"   { set x [expr $x+1] }
448
            -re "^ +\[0-9\]+ 0060 08A41A06\[^\n\]*\n"   { set x [expr $x+1] }
449
            -re "^ +\[0-9\]+ 0064 08A43A06\[^\n\]*\n"   { set x [expr $x+1] }
450
            -re "^ +\[0-9\]+ 0068 08A45A06\[^\n\]*\n"   { set x [expr $x+1] }
451
            -re "^ +\[0-9\]+ 006c 08A47A06\[^\n\]*\n"   { set x [expr $x+1] }
452
            -re "^ +\[0-9\]+ 0070 08A49A06\[^\n\]*\n"   { set x [expr $x+1] }
453
            -re "^ +\[0-9\]+ 0074 08A4BA06\[^\n\]*\n"   { set x [expr $x+1] }
454
            -re "^ +\[0-9\]+ 0078 08A4DA06\[^\n\]*\n"   { set x [expr $x+1] }
455
            -re "^ +\[0-9\]+ 007c 08A4FA06\[^\n\]*\n"   { set x [expr $x+1] }
456
            -re "^ +\[0-9\]+ 0080 08A40E06\[^\n\]*\n"   { set x [expr $x+1] }
457
            -re "^ +\[0-9\]+ 0084 08A42E06\[^\n\]*\n"   { set x [expr $x+1] }
458
            -re "^ +\[0-9\]+ 0088 08A44E06\[^\n\]*\n"   { set x [expr $x+1] }
459
            -re "^ +\[0-9\]+ 008c 08A46E06\[^\n\]*\n"   { set x [expr $x+1] }
460
            -re "^ +\[0-9\]+ 0090 08A48E06\[^\n\]*\n"   { set x [expr $x+1] }
461
            -re "^ +\[0-9\]+ 0094 08A4AE06\[^\n\]*\n"   { set x [expr $x+1] }
462
            -re "^ +\[0-9\]+ 0098 08A4CE06\[^\n\]*\n"   { set x [expr $x+1] }
463
            -re "^ +\[0-9\]+ 009c 08A4EE06\[^\n\]*\n"   { set x [expr $x+1] }
464
            -re "^ +\[0-9\]+ 00a0 08A41E06\[^\n\]*\n"   { set x [expr $x+1] }
465
            -re "^ +\[0-9\]+ 00a4 08A43E06\[^\n\]*\n"   { set x [expr $x+1] }
466
            -re "^ +\[0-9\]+ 00a8 08A45E06\[^\n\]*\n"   { set x [expr $x+1] }
467
            -re "^ +\[0-9\]+ 00ac 08A47E06\[^\n\]*\n"   { set x [expr $x+1] }
468
            -re "^ +\[0-9\]+ 00b0 08A49E06\[^\n\]*\n"   { set x [expr $x+1] }
469
            -re "^ +\[0-9\]+ 00b4 08A4BE06\[^\n\]*\n"   { set x [expr $x+1] }
470
            -re "^ +\[0-9\]+ 00b8 08A4DE06\[^\n\]*\n"   { set x [expr $x+1] }
471
            -re "^ +\[0-9\]+ 00bc 08A4FE06\[^\n\]*\n"   { set x [expr $x+1] }
472
            -re "^ +\[0-9\]+ 00c0 08A40706\[^\n\]*\n"   { set x [expr $x+1] }
473
            -re "^ +\[0-9\]+ 00c4 08A42706\[^\n\]*\n"   { set x [expr $x+1] }
474
            -re "^ +\[0-9\]+ 00c8 08A44706\[^\n\]*\n"   { set x [expr $x+1] }
475
            -re "^ +\[0-9\]+ 00cc 08A46706\[^\n\]*\n"   { set x [expr $x+1] }
476
            -re "^ +\[0-9\]+ 00d0 08A48706\[^\n\]*\n"   { set x [expr $x+1] }
477
            -re "^ +\[0-9\]+ 00d4 08A4A706\[^\n\]*\n"   { set x [expr $x+1] }
478
            -re "^ +\[0-9\]+ 00d8 08A4C706\[^\n\]*\n"   { set x [expr $x+1] }
479
            -re "^ +\[0-9\]+ 00dc 08A4E706\[^\n\]*\n"   { set x [expr $x+1] }
480
            -re "^ +\[0-9\]+ 00e0 08A41706\[^\n\]*\n"   { set x [expr $x+1] }
481
            -re "^ +\[0-9\]+ 00e4 08A43706\[^\n\]*\n"   { set x [expr $x+1] }
482
            -re "^ +\[0-9\]+ 00e8 08A45706\[^\n\]*\n"   { set x [expr $x+1] }
483
            -re "^ +\[0-9\]+ 00ec 08A47706\[^\n\]*\n"   { set x [expr $x+1] }
484
            -re "^ +\[0-9\]+ 00f0 08A49706\[^\n\]*\n"   { set x [expr $x+1] }
485
            -re "^ +\[0-9\]+ 00f4 08A4B706\[^\n\]*\n"   { set x [expr $x+1] }
486
            -re "^ +\[0-9\]+ 00f8 08A4D706\[^\n\]*\n"   { set x [expr $x+1] }
487
            -re "^ +\[0-9\]+ 00fc 08A4F706\[^\n\]*\n"   { set x [expr $x+1] }
488
            -re "^ +\[0-9\]+ 0100 08A40F06\[^\n\]*\n"   { set x [expr $x+1] }
489
            -re "^ +\[0-9\]+ 0104 08A42F06\[^\n\]*\n"   { set x [expr $x+1] }
490
            -re "^ +\[0-9\]+ 0108 08A44F06\[^\n\]*\n"   { set x [expr $x+1] }
491
            -re "^ +\[0-9\]+ 010c 08A46F06\[^\n\]*\n"   { set x [expr $x+1] }
492
            -re "^ +\[0-9\]+ 0110 08A48F06\[^\n\]*\n"   { set x [expr $x+1] }
493
            -re "^ +\[0-9\]+ 0114 08A4AF06\[^\n\]*\n"   { set x [expr $x+1] }
494
            -re "^ +\[0-9\]+ 0118 08A4CF06\[^\n\]*\n"   { set x [expr $x+1] }
495
            -re "^ +\[0-9\]+ 011c 08A4EF06\[^\n\]*\n"   { set x [expr $x+1] }
496
            -re "^ +\[0-9\]+ 0120 08A41F06\[^\n\]*\n"   { set x [expr $x+1] }
497
            -re "^ +\[0-9\]+ 0124 08A43F06\[^\n\]*\n"   { set x [expr $x+1] }
498
            -re "^ +\[0-9\]+ 0128 08A45F06\[^\n\]*\n"   { set x [expr $x+1] }
499
            -re "^ +\[0-9\]+ 012c 08A47F06\[^\n\]*\n"   { set x [expr $x+1] }
500
            -re "^ +\[0-9\]+ 0130 08A49F06\[^\n\]*\n"   { set x [expr $x+1] }
501
            -re "^ +\[0-9\]+ 0134 08A4BF06\[^\n\]*\n"   { set x [expr $x+1] }
502
            -re "^ +\[0-9\]+ 0138 08A4DF06\[^\n\]*\n"   { set x [expr $x+1] }
503
            -re "^ +\[0-9\]+ 013c 08A4FF06\[^\n\]*\n"   { set x [expr $x+1] }
504
            -re "^ +\[0-9\]+ 0140 08A40A06\[^\n\]*\n"   { set x [expr $x+1] }
505
            -re "^ +\[0-9\]+ 0144 08A42A06\[^\n\]*\n"   { set x [expr $x+1] }
506
            -re "^ +\[0-9\]+ 0148 08A44A06\[^\n\]*\n"   { set x [expr $x+1] }
507
            -re "^ +\[0-9\]+ 014c 08A46A06\[^\n\]*\n"   { set x [expr $x+1] }
508
            -re "^ +\[0-9\]+ 0150 08A48A06\[^\n\]*\n"   { set x [expr $x+1] }
509
            -re "^ +\[0-9\]+ 0154 08A4AA06\[^\n\]*\n"   { set x [expr $x+1] }
510
            -re "^ +\[0-9\]+ 0158 08A4CA06\[^\n\]*\n"   { set x [expr $x+1] }
511
            -re "^ +\[0-9\]+ 015c 08A4EA06\[^\n\]*\n"   { set x [expr $x+1] }
512
            -re "^ +\[0-9\]+ 0160 08A41A06\[^\n\]*\n"   { set x [expr $x+1] }
513
            -re "^ +\[0-9\]+ 0164 08A43A06\[^\n\]*\n"   { set x [expr $x+1] }
514
            -re "^ +\[0-9\]+ 0168 08A45A06\[^\n\]*\n"   { set x [expr $x+1] }
515
            -re "^ +\[0-9\]+ 016c 08A47A06\[^\n\]*\n"   { set x [expr $x+1] }
516
            -re "^ +\[0-9\]+ 0170 08A49A06\[^\n\]*\n"   { set x [expr $x+1] }
517
            -re "^ +\[0-9\]+ 0174 08A4BA06\[^\n\]*\n"   { set x [expr $x+1] }
518
            -re "^ +\[0-9\]+ 0178 08A4DA06\[^\n\]*\n"   { set x [expr $x+1] }
519
            -re "^ +\[0-9\]+ 017c 08A4FA06\[^\n\]*\n"   { set x [expr $x+1] }
520
            -re "^ +\[0-9\]+ 0180 08A40E06\[^\n\]*\n"   { set x [expr $x+1] }
521
            -re "^ +\[0-9\]+ 0184 08A42E06\[^\n\]*\n"   { set x [expr $x+1] }
522
            -re "^ +\[0-9\]+ 0188 08A44E06\[^\n\]*\n"   { set x [expr $x+1] }
523
            -re "^ +\[0-9\]+ 018c 08A46E06\[^\n\]*\n"   { set x [expr $x+1] }
524
            -re "^ +\[0-9\]+ 0190 08A48E06\[^\n\]*\n"   { set x [expr $x+1] }
525
            -re "^ +\[0-9\]+ 0194 08A4AE06\[^\n\]*\n"   { set x [expr $x+1] }
526
            -re "^ +\[0-9\]+ 0198 08A4CE06\[^\n\]*\n"   { set x [expr $x+1] }
527
            -re "^ +\[0-9\]+ 019c 08A4EE06\[^\n\]*\n"   { set x [expr $x+1] }
528
            -re "^ +\[0-9\]+ 01a0 08A41E06\[^\n\]*\n"   { set x [expr $x+1] }
529
            -re "^ +\[0-9\]+ 01a4 08A43E06\[^\n\]*\n"   { set x [expr $x+1] }
530
            -re "^ +\[0-9\]+ 01a8 08A45E06\[^\n\]*\n"   { set x [expr $x+1] }
531
            -re "^ +\[0-9\]+ 01ac 08A47E06\[^\n\]*\n"   { set x [expr $x+1] }
532
            -re "^ +\[0-9\]+ 01b0 08A49E06\[^\n\]*\n"   { set x [expr $x+1] }
533
            -re "^ +\[0-9\]+ 01b4 08A4BE06\[^\n\]*\n"   { set x [expr $x+1] }
534
            -re "^ +\[0-9\]+ 01b8 08A4DE06\[^\n\]*\n"   { set x [expr $x+1] }
535
            -re "^ +\[0-9\]+ 01bc 08A4FE06\[^\n\]*\n"   { set x [expr $x+1] }
536
            -re "^ +\[0-9\]+ 01c0 08A40706\[^\n\]*\n"   { set x [expr $x+1] }
537
            -re "^ +\[0-9\]+ 01c4 08A42706\[^\n\]*\n"   { set x [expr $x+1] }
538
            -re "^ +\[0-9\]+ 01c8 08A44706\[^\n\]*\n"   { set x [expr $x+1] }
539
            -re "^ +\[0-9\]+ 01cc 08A46706\[^\n\]*\n"   { set x [expr $x+1] }
540
            -re "^ +\[0-9\]+ 01d0 08A48706\[^\n\]*\n"   { set x [expr $x+1] }
541
            -re "^ +\[0-9\]+ 01d4 08A4A706\[^\n\]*\n"   { set x [expr $x+1] }
542
            -re "^ +\[0-9\]+ 01d8 08A4C706\[^\n\]*\n"   { set x [expr $x+1] }
543
            -re "^ +\[0-9\]+ 01dc 08A4E706\[^\n\]*\n"   { set x [expr $x+1] }
544
            -re "^ +\[0-9\]+ 01e0 08A41706\[^\n\]*\n"   { set x [expr $x+1] }
545
            -re "^ +\[0-9\]+ 01e4 08A43706\[^\n\]*\n"   { set x [expr $x+1] }
546
            -re "^ +\[0-9\]+ 01e8 08A45706\[^\n\]*\n"   { set x [expr $x+1] }
547
            -re "^ +\[0-9\]+ 01ec 08A47706\[^\n\]*\n"   { set x [expr $x+1] }
548
            -re "^ +\[0-9\]+ 01f0 08A49706\[^\n\]*\n"   { set x [expr $x+1] }
549
            -re "^ +\[0-9\]+ 01f4 08A4B706\[^\n\]*\n"   { set x [expr $x+1] }
550
            -re "^ +\[0-9\]+ 01f8 08A4D706\[^\n\]*\n"   { set x [expr $x+1] }
551
            -re "^ +\[0-9\]+ 01fc 08A4F706\[^\n\]*\n"   { set x [expr $x+1] }
552
            -re "^ +\[0-9\]+ 0200 08A40F06\[^\n\]*\n"   { set x [expr $x+1] }
553
            -re "^ +\[0-9\]+ 0204 08A42F06\[^\n\]*\n"   { set x [expr $x+1] }
554
            -re "^ +\[0-9\]+ 0208 08A44F06\[^\n\]*\n"   { set x [expr $x+1] }
555
            -re "^ +\[0-9\]+ 020c 08A46F06\[^\n\]*\n"   { set x [expr $x+1] }
556
            -re "^ +\[0-9\]+ 0210 08A48F06\[^\n\]*\n"   { set x [expr $x+1] }
557
            -re "^ +\[0-9\]+ 0214 08A4AF06\[^\n\]*\n"   { set x [expr $x+1] }
558
            -re "^ +\[0-9\]+ 0218 08A4CF06\[^\n\]*\n"   { set x [expr $x+1] }
559
            -re "^ +\[0-9\]+ 021c 08A4EF06\[^\n\]*\n"   { set x [expr $x+1] }
560
            -re "^ +\[0-9\]+ 0220 08A41F06\[^\n\]*\n"   { set x [expr $x+1] }
561
            -re "^ +\[0-9\]+ 0224 08A43F06\[^\n\]*\n"   { set x [expr $x+1] }
562
            -re "^ +\[0-9\]+ 0228 08A45F06\[^\n\]*\n"   { set x [expr $x+1] }
563
            -re "^ +\[0-9\]+ 022c 08A47F06\[^\n\]*\n"   { set x [expr $x+1] }
564
            -re "^ +\[0-9\]+ 0230 08A49F06\[^\n\]*\n"   { set x [expr $x+1] }
565
            -re "^ +\[0-9\]+ 0234 08A4BF06\[^\n\]*\n"   { set x [expr $x+1] }
566
            -re "^ +\[0-9\]+ 0238 08A4DF06\[^\n\]*\n"   { set x [expr $x+1] }
567
            -re "^ +\[0-9\]+ 023c 08A4FF06\[^\n\]*\n"   { set x [expr $x+1] }
568
            -re "\[^\n\]*\n"                            { }
569
            timeout                             { perror "timeout\n"; break }
570
            eof                                 { break }
571
        }
572
    }
573
 
574
    # This was intended to do any cleanup necessary.  It kinda looks like it
575
    # isn't needed, but just in case, please keep it in for now.
576
    gas_finish
577
 
578
    # Did we find what we were looking for?  If not, flunk it.
579
    if [expr $x==144] then { pass $testname } else { fail $testname }
580
}
581
 
582
proc do_add2 {} {
583
    set testname "add2.s: add2 tests"
584
    set x 0
585
 
586
    gas_start "add2.s" "-al"
587
 
588
    # Check the assembled instruction against a table built by the HP assembler
589
    # Any differences should be checked by hand -- with the number of problems
590
    # I've seen in the HP assembler I don't completely trust it.
591
    #
592
    # Instead of having a variable for each match string just increment the
593
    # total number of matches seen.  That's simpler when testing large numbers
594
    # of instructions (as these tests to).
595
    while 1 {
596
        expect {
597
            -re "^ +\[0-9\]+ 0000 08A40626\[^\n\]*\n"   { set x [expr $x+1] }
598
            -re "^ +\[0-9\]+ 0004 08A42626\[^\n\]*\n"   { set x [expr $x+1] }
599
            -re "^ +\[0-9\]+ 0008 08A44626\[^\n\]*\n"   { set x [expr $x+1] }
600
            -re "^ +\[0-9\]+ 000c 08A46626\[^\n\]*\n"   { set x [expr $x+1] }
601
            -re "^ +\[0-9\]+ 0010 08A48626\[^\n\]*\n"   { set x [expr $x+1] }
602
            -re "^ +\[0-9\]+ 0014 08A4A626\[^\n\]*\n"   { set x [expr $x+1] }
603
            -re "^ +\[0-9\]+ 0018 08A4C626\[^\n\]*\n"   { set x [expr $x+1] }
604
            -re "^ +\[0-9\]+ 001c 08A4E626\[^\n\]*\n"   { set x [expr $x+1] }
605
            -re "^ +\[0-9\]+ 0020 08A41626\[^\n\]*\n"   { set x [expr $x+1] }
606
            -re "^ +\[0-9\]+ 0024 08A43626\[^\n\]*\n"   { set x [expr $x+1] }
607
            -re "^ +\[0-9\]+ 0028 08A45626\[^\n\]*\n"   { set x [expr $x+1] }
608
            -re "^ +\[0-9\]+ 002c 08A47626\[^\n\]*\n"   { set x [expr $x+1] }
609
            -re "^ +\[0-9\]+ 0030 08A49626\[^\n\]*\n"   { set x [expr $x+1] }
610
            -re "^ +\[0-9\]+ 0034 08A4B626\[^\n\]*\n"   { set x [expr $x+1] }
611
            -re "^ +\[0-9\]+ 0038 08A4D626\[^\n\]*\n"   { set x [expr $x+1] }
612
            -re "^ +\[0-9\]+ 003c 08A4F626\[^\n\]*\n"   { set x [expr $x+1] }
613
            -re "^ +\[0-9\]+ 0040 08A40A26\[^\n\]*\n"   { set x [expr $x+1] }
614
            -re "^ +\[0-9\]+ 0044 08A42A26\[^\n\]*\n"   { set x [expr $x+1] }
615
            -re "^ +\[0-9\]+ 0048 08A44A26\[^\n\]*\n"   { set x [expr $x+1] }
616
            -re "^ +\[0-9\]+ 004c 08A46A26\[^\n\]*\n"   { set x [expr $x+1] }
617
            -re "^ +\[0-9\]+ 0050 08A48A26\[^\n\]*\n"   { set x [expr $x+1] }
618
            -re "^ +\[0-9\]+ 0054 08A4AA26\[^\n\]*\n"   { set x [expr $x+1] }
619
            -re "^ +\[0-9\]+ 0058 08A4CA26\[^\n\]*\n"   { set x [expr $x+1] }
620
            -re "^ +\[0-9\]+ 005c 08A4EA26\[^\n\]*\n"   { set x [expr $x+1] }
621
            -re "^ +\[0-9\]+ 0060 08A41A26\[^\n\]*\n"   { set x [expr $x+1] }
622
            -re "^ +\[0-9\]+ 0064 08A43A26\[^\n\]*\n"   { set x [expr $x+1] }
623
            -re "^ +\[0-9\]+ 0068 08A45A26\[^\n\]*\n"   { set x [expr $x+1] }
624
            -re "^ +\[0-9\]+ 006c 08A47A26\[^\n\]*\n"   { set x [expr $x+1] }
625
            -re "^ +\[0-9\]+ 0070 08A49A26\[^\n\]*\n"   { set x [expr $x+1] }
626
            -re "^ +\[0-9\]+ 0074 08A4BA26\[^\n\]*\n"   { set x [expr $x+1] }
627
            -re "^ +\[0-9\]+ 0078 08A4DA26\[^\n\]*\n"   { set x [expr $x+1] }
628
            -re "^ +\[0-9\]+ 007c 08A4FA26\[^\n\]*\n"   { set x [expr $x+1] }
629
            -re "^ +\[0-9\]+ 0080 08A40E26\[^\n\]*\n"   { set x [expr $x+1] }
630
            -re "^ +\[0-9\]+ 0084 08A42E26\[^\n\]*\n"   { set x [expr $x+1] }
631
            -re "^ +\[0-9\]+ 0088 08A44E26\[^\n\]*\n"   { set x [expr $x+1] }
632
            -re "^ +\[0-9\]+ 008c 08A46E26\[^\n\]*\n"   { set x [expr $x+1] }
633
            -re "^ +\[0-9\]+ 0090 08A48E26\[^\n\]*\n"   { set x [expr $x+1] }
634
            -re "^ +\[0-9\]+ 0094 08A4AE26\[^\n\]*\n"   { set x [expr $x+1] }
635
            -re "^ +\[0-9\]+ 0098 08A4CE26\[^\n\]*\n"   { set x [expr $x+1] }
636
            -re "^ +\[0-9\]+ 009c 08A4EE26\[^\n\]*\n"   { set x [expr $x+1] }
637
            -re "^ +\[0-9\]+ 00a0 08A41E26\[^\n\]*\n"   { set x [expr $x+1] }
638
            -re "^ +\[0-9\]+ 00a4 08A43E26\[^\n\]*\n"   { set x [expr $x+1] }
639
            -re "^ +\[0-9\]+ 00a8 08A45E26\[^\n\]*\n"   { set x [expr $x+1] }
640
            -re "^ +\[0-9\]+ 00ac 08A47E26\[^\n\]*\n"   { set x [expr $x+1] }
641
            -re "^ +\[0-9\]+ 00b0 08A49E26\[^\n\]*\n"   { set x [expr $x+1] }
642
            -re "^ +\[0-9\]+ 00b4 08A4BE26\[^\n\]*\n"   { set x [expr $x+1] }
643
            -re "^ +\[0-9\]+ 00b8 08A4DE26\[^\n\]*\n"   { set x [expr $x+1] }
644
            -re "^ +\[0-9\]+ 00bc 08A4FE26\[^\n\]*\n"   { set x [expr $x+1] }
645
            -re "^ +\[0-9\]+ 00c0 08A40726\[^\n\]*\n"   { set x [expr $x+1] }
646
            -re "^ +\[0-9\]+ 00c4 08A42726\[^\n\]*\n"   { set x [expr $x+1] }
647
            -re "^ +\[0-9\]+ 00c8 08A44726\[^\n\]*\n"   { set x [expr $x+1] }
648
            -re "^ +\[0-9\]+ 00cc 08A46726\[^\n\]*\n"   { set x [expr $x+1] }
649
            -re "^ +\[0-9\]+ 00d0 08A48726\[^\n\]*\n"   { set x [expr $x+1] }
650
            -re "^ +\[0-9\]+ 00d4 08A4A726\[^\n\]*\n"   { set x [expr $x+1] }
651
            -re "^ +\[0-9\]+ 00d8 08A4C726\[^\n\]*\n"   { set x [expr $x+1] }
652
            -re "^ +\[0-9\]+ 00dc 08A4E726\[^\n\]*\n"   { set x [expr $x+1] }
653
            -re "^ +\[0-9\]+ 00e0 08A41726\[^\n\]*\n"   { set x [expr $x+1] }
654
            -re "^ +\[0-9\]+ 00e4 08A43726\[^\n\]*\n"   { set x [expr $x+1] }
655
            -re "^ +\[0-9\]+ 00e8 08A45726\[^\n\]*\n"   { set x [expr $x+1] }
656
            -re "^ +\[0-9\]+ 00ec 08A47726\[^\n\]*\n"   { set x [expr $x+1] }
657
            -re "^ +\[0-9\]+ 00f0 08A49726\[^\n\]*\n"   { set x [expr $x+1] }
658
            -re "^ +\[0-9\]+ 00f4 08A4B726\[^\n\]*\n"   { set x [expr $x+1] }
659
            -re "^ +\[0-9\]+ 00f8 08A4D726\[^\n\]*\n"   { set x [expr $x+1] }
660
            -re "^ +\[0-9\]+ 00fc 08A4F726\[^\n\]*\n"   { set x [expr $x+1] }
661
            -re "^ +\[0-9\]+ 0100 08A40F26\[^\n\]*\n"   { set x [expr $x+1] }
662
            -re "^ +\[0-9\]+ 0104 08A42F26\[^\n\]*\n"   { set x [expr $x+1] }
663
            -re "^ +\[0-9\]+ 0108 08A44F26\[^\n\]*\n"   { set x [expr $x+1] }
664
            -re "^ +\[0-9\]+ 010c 08A46F26\[^\n\]*\n"   { set x [expr $x+1] }
665
            -re "^ +\[0-9\]+ 0110 08A48F26\[^\n\]*\n"   { set x [expr $x+1] }
666
            -re "^ +\[0-9\]+ 0114 08A4AF26\[^\n\]*\n"   { set x [expr $x+1] }
667
            -re "^ +\[0-9\]+ 0118 08A4CF26\[^\n\]*\n"   { set x [expr $x+1] }
668
            -re "^ +\[0-9\]+ 011c 08A4EF26\[^\n\]*\n"   { set x [expr $x+1] }
669
            -re "^ +\[0-9\]+ 0120 08A41F26\[^\n\]*\n"   { set x [expr $x+1] }
670
            -re "^ +\[0-9\]+ 0124 08A43F26\[^\n\]*\n"   { set x [expr $x+1] }
671
            -re "^ +\[0-9\]+ 0128 08A45F26\[^\n\]*\n"   { set x [expr $x+1] }
672
            -re "^ +\[0-9\]+ 012c 08A47F26\[^\n\]*\n"   { set x [expr $x+1] }
673
            -re "^ +\[0-9\]+ 0130 08A49F26\[^\n\]*\n"   { set x [expr $x+1] }
674
            -re "^ +\[0-9\]+ 0134 08A4BF26\[^\n\]*\n"   { set x [expr $x+1] }
675
            -re "^ +\[0-9\]+ 0138 08A4DF26\[^\n\]*\n"   { set x [expr $x+1] }
676
            -re "^ +\[0-9\]+ 013c 08A4FF26\[^\n\]*\n"   { set x [expr $x+1] }
677
            -re "\[^\n\]*\n"                            { }
678
            timeout                             { perror "timeout\n"; break }
679
            eof                                 { break }
680
        }
681
    }
682
 
683
    # This was intended to do any cleanup necessary.  It kinda looks like it
684
    # isn't needed, but just in case, please keep it in for now.
685
    gas_finish
686
 
687
    # Did we find what we were looking for?  If not, flunk it.
688
    if [expr $x==80] then { pass $testname } else { fail $testname }
689
}
690
 
691
proc do_sh1add {} {
692
    set testname "sh1add.s: sh1add tests"
693
    set x 0
694
 
695
    gas_start "sh1add.s" "-al"
696
 
697
    # Check the assembled instruction against a table built by the HP assembler
698
    # Any differences should be checked by hand -- with the number of problems
699
    # I've seen in the HP assembler I don't completely trust it.
700
    #
701
    # Instead of having a variable for each match string just increment the
702
    # total number of matches seen.  That's simpler when testing large numbers
703
    # of instructions (as these tests to).
704
    while 1 {
705
        expect {
706
            -re "^ +\[0-9\]+ 0000 08A40646\[^\n\]*\n"   { set x [expr $x+1] }
707
            -re "^ +\[0-9\]+ 0004 08A42646\[^\n\]*\n"   { set x [expr $x+1] }
708
            -re "^ +\[0-9\]+ 0008 08A44646\[^\n\]*\n"   { set x [expr $x+1] }
709
            -re "^ +\[0-9\]+ 000c 08A46646\[^\n\]*\n"   { set x [expr $x+1] }
710
            -re "^ +\[0-9\]+ 0010 08A48646\[^\n\]*\n"   { set x [expr $x+1] }
711
            -re "^ +\[0-9\]+ 0014 08A4A646\[^\n\]*\n"   { set x [expr $x+1] }
712
            -re "^ +\[0-9\]+ 0018 08A4C646\[^\n\]*\n"   { set x [expr $x+1] }
713
            -re "^ +\[0-9\]+ 001c 08A4E646\[^\n\]*\n"   { set x [expr $x+1] }
714
            -re "^ +\[0-9\]+ 0020 08A41646\[^\n\]*\n"   { set x [expr $x+1] }
715
            -re "^ +\[0-9\]+ 0024 08A43646\[^\n\]*\n"   { set x [expr $x+1] }
716
            -re "^ +\[0-9\]+ 0028 08A45646\[^\n\]*\n"   { set x [expr $x+1] }
717
            -re "^ +\[0-9\]+ 002c 08A47646\[^\n\]*\n"   { set x [expr $x+1] }
718
            -re "^ +\[0-9\]+ 0030 08A49646\[^\n\]*\n"   { set x [expr $x+1] }
719
            -re "^ +\[0-9\]+ 0034 08A4B646\[^\n\]*\n"   { set x [expr $x+1] }
720
            -re "^ +\[0-9\]+ 0038 08A4D646\[^\n\]*\n"   { set x [expr $x+1] }
721
            -re "^ +\[0-9\]+ 003c 08A4F646\[^\n\]*\n"   { set x [expr $x+1] }
722
            -re "^ +\[0-9\]+ 0040 08A40A46\[^\n\]*\n"   { set x [expr $x+1] }
723
            -re "^ +\[0-9\]+ 0044 08A42A46\[^\n\]*\n"   { set x [expr $x+1] }
724
            -re "^ +\[0-9\]+ 0048 08A44A46\[^\n\]*\n"   { set x [expr $x+1] }
725
            -re "^ +\[0-9\]+ 004c 08A46A46\[^\n\]*\n"   { set x [expr $x+1] }
726
            -re "^ +\[0-9\]+ 0050 08A48A46\[^\n\]*\n"   { set x [expr $x+1] }
727
            -re "^ +\[0-9\]+ 0054 08A4AA46\[^\n\]*\n"   { set x [expr $x+1] }
728
            -re "^ +\[0-9\]+ 0058 08A4CA46\[^\n\]*\n"   { set x [expr $x+1] }
729
            -re "^ +\[0-9\]+ 005c 08A4EA46\[^\n\]*\n"   { set x [expr $x+1] }
730
            -re "^ +\[0-9\]+ 0060 08A41A46\[^\n\]*\n"   { set x [expr $x+1] }
731
            -re "^ +\[0-9\]+ 0064 08A43A46\[^\n\]*\n"   { set x [expr $x+1] }
732
            -re "^ +\[0-9\]+ 0068 08A45A46\[^\n\]*\n"   { set x [expr $x+1] }
733
            -re "^ +\[0-9\]+ 006c 08A47A46\[^\n\]*\n"   { set x [expr $x+1] }
734
            -re "^ +\[0-9\]+ 0070 08A49A46\[^\n\]*\n"   { set x [expr $x+1] }
735
            -re "^ +\[0-9\]+ 0074 08A4BA46\[^\n\]*\n"   { set x [expr $x+1] }
736
            -re "^ +\[0-9\]+ 0078 08A4DA46\[^\n\]*\n"   { set x [expr $x+1] }
737
            -re "^ +\[0-9\]+ 007c 08A4FA46\[^\n\]*\n"   { set x [expr $x+1] }
738
            -re "^ +\[0-9\]+ 0080 08A40E46\[^\n\]*\n"   { set x [expr $x+1] }
739
            -re "^ +\[0-9\]+ 0084 08A42E46\[^\n\]*\n"   { set x [expr $x+1] }
740
            -re "^ +\[0-9\]+ 0088 08A44E46\[^\n\]*\n"   { set x [expr $x+1] }
741
            -re "^ +\[0-9\]+ 008c 08A46E46\[^\n\]*\n"   { set x [expr $x+1] }
742
            -re "^ +\[0-9\]+ 0090 08A48E46\[^\n\]*\n"   { set x [expr $x+1] }
743
            -re "^ +\[0-9\]+ 0094 08A4AE46\[^\n\]*\n"   { set x [expr $x+1] }
744
            -re "^ +\[0-9\]+ 0098 08A4CE46\[^\n\]*\n"   { set x [expr $x+1] }
745
            -re "^ +\[0-9\]+ 009c 08A4EE46\[^\n\]*\n"   { set x [expr $x+1] }
746
            -re "^ +\[0-9\]+ 00a0 08A41E46\[^\n\]*\n"   { set x [expr $x+1] }
747
            -re "^ +\[0-9\]+ 00a4 08A43E46\[^\n\]*\n"   { set x [expr $x+1] }
748
            -re "^ +\[0-9\]+ 00a8 08A45E46\[^\n\]*\n"   { set x [expr $x+1] }
749
            -re "^ +\[0-9\]+ 00ac 08A47E46\[^\n\]*\n"   { set x [expr $x+1] }
750
            -re "^ +\[0-9\]+ 00b0 08A49E46\[^\n\]*\n"   { set x [expr $x+1] }
751
            -re "^ +\[0-9\]+ 00b4 08A4BE46\[^\n\]*\n"   { set x [expr $x+1] }
752
            -re "^ +\[0-9\]+ 00b8 08A4DE46\[^\n\]*\n"   { set x [expr $x+1] }
753
            -re "^ +\[0-9\]+ 00bc 08A4FE46\[^\n\]*\n"   { set x [expr $x+1] }
754
            -re "\[^\n\]*\n"                            { }
755
            timeout                             { perror "timeout\n"; break }
756
            eof                                 { break }
757
        }
758
    }
759
 
760
    # This was intended to do any cleanup necessary.  It kinda looks like it
761
    # isn't needed, but just in case, please keep it in for now.
762
    gas_finish
763
 
764
    # Did we find what we were looking for?  If not, flunk it.
765
    if [expr $x==48] then { pass $testname } else { fail $testname }
766
}
767
 
768
proc do_sh2add {} {
769
    set testname "sh2add.s: sh2add tests"
770
    set x 0
771
 
772
    gas_start "sh2add.s" "-al"
773
 
774
    # Check the assembled instruction against a table built by the HP assembler
775
    # Any differences should be checked by hand -- with the number of problems
776
    # I've seen in the HP assembler I don't completely trust it.
777
    #
778
    # Instead of having a variable for each match string just increment the
779
    # total number of matches seen.  That's simpler when testing large numbers
780
    # of instructions (as these tests to).
781
    while 1 {
782
        expect {
783
            -re "^ +\[0-9\]+ 0000 08A40686\[^\n\]*\n"   { set x [expr $x+1] }
784
            -re "^ +\[0-9\]+ 0004 08A42686\[^\n\]*\n"   { set x [expr $x+1] }
785
            -re "^ +\[0-9\]+ 0008 08A44686\[^\n\]*\n"   { set x [expr $x+1] }
786
            -re "^ +\[0-9\]+ 000c 08A46686\[^\n\]*\n"   { set x [expr $x+1] }
787
            -re "^ +\[0-9\]+ 0010 08A48686\[^\n\]*\n"   { set x [expr $x+1] }
788
            -re "^ +\[0-9\]+ 0014 08A4A686\[^\n\]*\n"   { set x [expr $x+1] }
789
            -re "^ +\[0-9\]+ 0018 08A4C686\[^\n\]*\n"   { set x [expr $x+1] }
790
            -re "^ +\[0-9\]+ 001c 08A4E686\[^\n\]*\n"   { set x [expr $x+1] }
791
            -re "^ +\[0-9\]+ 0020 08A41686\[^\n\]*\n"   { set x [expr $x+1] }
792
            -re "^ +\[0-9\]+ 0024 08A43686\[^\n\]*\n"   { set x [expr $x+1] }
793
            -re "^ +\[0-9\]+ 0028 08A45686\[^\n\]*\n"   { set x [expr $x+1] }
794
            -re "^ +\[0-9\]+ 002c 08A47686\[^\n\]*\n"   { set x [expr $x+1] }
795
            -re "^ +\[0-9\]+ 0030 08A49686\[^\n\]*\n"   { set x [expr $x+1] }
796
            -re "^ +\[0-9\]+ 0034 08A4B686\[^\n\]*\n"   { set x [expr $x+1] }
797
            -re "^ +\[0-9\]+ 0038 08A4D686\[^\n\]*\n"   { set x [expr $x+1] }
798
            -re "^ +\[0-9\]+ 003c 08A4F686\[^\n\]*\n"   { set x [expr $x+1] }
799
            -re "^ +\[0-9\]+ 0040 08A40A86\[^\n\]*\n"   { set x [expr $x+1] }
800
            -re "^ +\[0-9\]+ 0044 08A42A86\[^\n\]*\n"   { set x [expr $x+1] }
801
            -re "^ +\[0-9\]+ 0048 08A44A86\[^\n\]*\n"   { set x [expr $x+1] }
802
            -re "^ +\[0-9\]+ 004c 08A46A86\[^\n\]*\n"   { set x [expr $x+1] }
803
            -re "^ +\[0-9\]+ 0050 08A48A86\[^\n\]*\n"   { set x [expr $x+1] }
804
            -re "^ +\[0-9\]+ 0054 08A4AA86\[^\n\]*\n"   { set x [expr $x+1] }
805
            -re "^ +\[0-9\]+ 0058 08A4CA86\[^\n\]*\n"   { set x [expr $x+1] }
806
            -re "^ +\[0-9\]+ 005c 08A4EA86\[^\n\]*\n"   { set x [expr $x+1] }
807
            -re "^ +\[0-9\]+ 0060 08A41A86\[^\n\]*\n"   { set x [expr $x+1] }
808
            -re "^ +\[0-9\]+ 0064 08A43A86\[^\n\]*\n"   { set x [expr $x+1] }
809
            -re "^ +\[0-9\]+ 0068 08A45A86\[^\n\]*\n"   { set x [expr $x+1] }
810
            -re "^ +\[0-9\]+ 006c 08A47A86\[^\n\]*\n"   { set x [expr $x+1] }
811
            -re "^ +\[0-9\]+ 0070 08A49A86\[^\n\]*\n"   { set x [expr $x+1] }
812
            -re "^ +\[0-9\]+ 0074 08A4BA86\[^\n\]*\n"   { set x [expr $x+1] }
813
            -re "^ +\[0-9\]+ 0078 08A4DA86\[^\n\]*\n"   { set x [expr $x+1] }
814
            -re "^ +\[0-9\]+ 007c 08A4FA86\[^\n\]*\n"   { set x [expr $x+1] }
815
            -re "^ +\[0-9\]+ 0080 08A40E86\[^\n\]*\n"   { set x [expr $x+1] }
816
            -re "^ +\[0-9\]+ 0084 08A42E86\[^\n\]*\n"   { set x [expr $x+1] }
817
            -re "^ +\[0-9\]+ 0088 08A44E86\[^\n\]*\n"   { set x [expr $x+1] }
818
            -re "^ +\[0-9\]+ 008c 08A46E86\[^\n\]*\n"   { set x [expr $x+1] }
819
            -re "^ +\[0-9\]+ 0090 08A48E86\[^\n\]*\n"   { set x [expr $x+1] }
820
            -re "^ +\[0-9\]+ 0094 08A4AE86\[^\n\]*\n"   { set x [expr $x+1] }
821
            -re "^ +\[0-9\]+ 0098 08A4CE86\[^\n\]*\n"   { set x [expr $x+1] }
822
            -re "^ +\[0-9\]+ 009c 08A4EE86\[^\n\]*\n"   { set x [expr $x+1] }
823
            -re "^ +\[0-9\]+ 00a0 08A41E86\[^\n\]*\n"   { set x [expr $x+1] }
824
            -re "^ +\[0-9\]+ 00a4 08A43E86\[^\n\]*\n"   { set x [expr $x+1] }
825
            -re "^ +\[0-9\]+ 00a8 08A45E86\[^\n\]*\n"   { set x [expr $x+1] }
826
            -re "^ +\[0-9\]+ 00ac 08A47E86\[^\n\]*\n"   { set x [expr $x+1] }
827
            -re "^ +\[0-9\]+ 00b0 08A49E86\[^\n\]*\n"   { set x [expr $x+1] }
828
            -re "^ +\[0-9\]+ 00b4 08A4BE86\[^\n\]*\n"   { set x [expr $x+1] }
829
            -re "^ +\[0-9\]+ 00b8 08A4DE86\[^\n\]*\n"   { set x [expr $x+1] }
830
            -re "^ +\[0-9\]+ 00bc 08A4FE86\[^\n\]*\n"   { set x [expr $x+1] }
831
            -re "\[^\n\]*\n"                            { }
832
            timeout                             { perror "timeout\n"; break }
833
            eof                                 { break }
834
        }
835
    }
836
 
837
    # This was intended to do any cleanup necessary.  It kinda looks like it
838
    # isn't needed, but just in case, please keep it in for now.
839
    gas_finish
840
 
841
    # Did we find what we were looking for?  If not, flunk it.
842
    if [expr $x==48] then { pass $testname } else { fail $testname }
843
}
844
 
845
proc do_sh3add {} {
846
    set testname "sh3add.s: sh3add tests"
847
    set x 0
848
 
849
    gas_start "sh3add.s" "-al"
850
 
851
    # Check the assembled instruction against a table built by the HP assembler
852
    # Any differences should be checked by hand -- with the number of problems
853
    # I've seen in the HP assembler I don't completely trust it.
854
    #
855
    # Instead of having a variable for each match string just increment the
856
    # total number of matches seen.  That's simpler when testing large numbers
857
    # of instructions (as these tests to).
858
    while 1 {
859
        expect {
860
            -re "^ +\[0-9\]+ 0000 08A406C6\[^\n\]*\n"   { set x [expr $x+1] }
861
            -re "^ +\[0-9\]+ 0004 08A426C6\[^\n\]*\n"   { set x [expr $x+1] }
862
            -re "^ +\[0-9\]+ 0008 08A446C6\[^\n\]*\n"   { set x [expr $x+1] }
863
            -re "^ +\[0-9\]+ 000c 08A466C6\[^\n\]*\n"   { set x [expr $x+1] }
864
            -re "^ +\[0-9\]+ 0010 08A486C6\[^\n\]*\n"   { set x [expr $x+1] }
865
            -re "^ +\[0-9\]+ 0014 08A4A6C6\[^\n\]*\n"   { set x [expr $x+1] }
866
            -re "^ +\[0-9\]+ 0018 08A4C6C6\[^\n\]*\n"   { set x [expr $x+1] }
867
            -re "^ +\[0-9\]+ 001c 08A4E6C6\[^\n\]*\n"   { set x [expr $x+1] }
868
            -re "^ +\[0-9\]+ 0020 08A416C6\[^\n\]*\n"   { set x [expr $x+1] }
869
            -re "^ +\[0-9\]+ 0024 08A436C6\[^\n\]*\n"   { set x [expr $x+1] }
870
            -re "^ +\[0-9\]+ 0028 08A456C6\[^\n\]*\n"   { set x [expr $x+1] }
871
            -re "^ +\[0-9\]+ 002c 08A476C6\[^\n\]*\n"   { set x [expr $x+1] }
872
            -re "^ +\[0-9\]+ 0030 08A496C6\[^\n\]*\n"   { set x [expr $x+1] }
873
            -re "^ +\[0-9\]+ 0034 08A4B6C6\[^\n\]*\n"   { set x [expr $x+1] }
874
            -re "^ +\[0-9\]+ 0038 08A4D6C6\[^\n\]*\n"   { set x [expr $x+1] }
875
            -re "^ +\[0-9\]+ 003c 08A4F6C6\[^\n\]*\n"   { set x [expr $x+1] }
876
            -re "^ +\[0-9\]+ 0040 08A40AC6\[^\n\]*\n"   { set x [expr $x+1] }
877
            -re "^ +\[0-9\]+ 0044 08A42AC6\[^\n\]*\n"   { set x [expr $x+1] }
878
            -re "^ +\[0-9\]+ 0048 08A44AC6\[^\n\]*\n"   { set x [expr $x+1] }
879
            -re "^ +\[0-9\]+ 004c 08A46AC6\[^\n\]*\n"   { set x [expr $x+1] }
880
            -re "^ +\[0-9\]+ 0050 08A48AC6\[^\n\]*\n"   { set x [expr $x+1] }
881
            -re "^ +\[0-9\]+ 0054 08A4AAC6\[^\n\]*\n"   { set x [expr $x+1] }
882
            -re "^ +\[0-9\]+ 0058 08A4CAC6\[^\n\]*\n"   { set x [expr $x+1] }
883
            -re "^ +\[0-9\]+ 005c 08A4EAC6\[^\n\]*\n"   { set x [expr $x+1] }
884
            -re "^ +\[0-9\]+ 0060 08A41AC6\[^\n\]*\n"   { set x [expr $x+1] }
885
            -re "^ +\[0-9\]+ 0064 08A43AC6\[^\n\]*\n"   { set x [expr $x+1] }
886
            -re "^ +\[0-9\]+ 0068 08A45AC6\[^\n\]*\n"   { set x [expr $x+1] }
887
            -re "^ +\[0-9\]+ 006c 08A47AC6\[^\n\]*\n"   { set x [expr $x+1] }
888
            -re "^ +\[0-9\]+ 0070 08A49AC6\[^\n\]*\n"   { set x [expr $x+1] }
889
            -re "^ +\[0-9\]+ 0074 08A4BAC6\[^\n\]*\n"   { set x [expr $x+1] }
890
            -re "^ +\[0-9\]+ 0078 08A4DAC6\[^\n\]*\n"   { set x [expr $x+1] }
891
            -re "^ +\[0-9\]+ 007c 08A4FAC6\[^\n\]*\n"   { set x [expr $x+1] }
892
            -re "^ +\[0-9\]+ 0080 08A40EC6\[^\n\]*\n"   { set x [expr $x+1] }
893
            -re "^ +\[0-9\]+ 0084 08A42EC6\[^\n\]*\n"   { set x [expr $x+1] }
894
            -re "^ +\[0-9\]+ 0088 08A44EC6\[^\n\]*\n"   { set x [expr $x+1] }
895
            -re "^ +\[0-9\]+ 008c 08A46EC6\[^\n\]*\n"   { set x [expr $x+1] }
896
            -re "^ +\[0-9\]+ 0090 08A48EC6\[^\n\]*\n"   { set x [expr $x+1] }
897
            -re "^ +\[0-9\]+ 0094 08A4AEC6\[^\n\]*\n"   { set x [expr $x+1] }
898
            -re "^ +\[0-9\]+ 0098 08A4CEC6\[^\n\]*\n"   { set x [expr $x+1] }
899
            -re "^ +\[0-9\]+ 009c 08A4EEC6\[^\n\]*\n"   { set x [expr $x+1] }
900
            -re "^ +\[0-9\]+ 00a0 08A41EC6\[^\n\]*\n"   { set x [expr $x+1] }
901
            -re "^ +\[0-9\]+ 00a4 08A43EC6\[^\n\]*\n"   { set x [expr $x+1] }
902
            -re "^ +\[0-9\]+ 00a8 08A45EC6\[^\n\]*\n"   { set x [expr $x+1] }
903
            -re "^ +\[0-9\]+ 00ac 08A47EC6\[^\n\]*\n"   { set x [expr $x+1] }
904
            -re "^ +\[0-9\]+ 00b0 08A49EC6\[^\n\]*\n"   { set x [expr $x+1] }
905
            -re "^ +\[0-9\]+ 00b4 08A4BEC6\[^\n\]*\n"   { set x [expr $x+1] }
906
            -re "^ +\[0-9\]+ 00b8 08A4DEC6\[^\n\]*\n"   { set x [expr $x+1] }
907
            -re "^ +\[0-9\]+ 00bc 08A4FEC6\[^\n\]*\n"   { set x [expr $x+1] }
908
            -re "\[^\n\]*\n"                            { }
909
            timeout                             { perror "timeout\n"; break }
910
            eof                                 { break }
911
        }
912
    }
913
 
914
    # This was intended to do any cleanup necessary.  It kinda looks like it
915
    # isn't needed, but just in case, please keep it in for now.
916
    gas_finish
917
 
918
    # Did we find what we were looking for?  If not, flunk it.
919
    if [expr $x==48] then { pass $testname } else { fail $testname }
920
}
921
 
922
proc do_shladd {} {
923
    set testname "shladd.s: shladd tests"
924
    set x 0
925
 
926
    gas_start "shladd.s" "-al"
927
 
928
    # Check the assembled instruction against a table built by the HP assembler
929
    # Any differences should be checked by hand -- with the number of problems
930
    # I've seen in the HP assembler I don't completely trust it.
931
    #
932
    # Instead of having a variable for each match string just increment the
933
    # total number of matches seen.  That's simpler when testing large numbers
934
    # of instructions (as these tests to).
935
    while 1 {
936
        expect {
937
            -re "^ +\[0-9\]+ 0000 08A40646\[^\n\]*\n"   { set x [expr $x+1] }
938
            -re "^ +\[0-9\]+ 0004 08A42646\[^\n\]*\n"   { set x [expr $x+1] }
939
            -re "^ +\[0-9\]+ 0008 08A44646\[^\n\]*\n"   { set x [expr $x+1] }
940
            -re "^ +\[0-9\]+ 000c 08A46646\[^\n\]*\n"   { set x [expr $x+1] }
941
            -re "^ +\[0-9\]+ 0010 08A48646\[^\n\]*\n"   { set x [expr $x+1] }
942
            -re "^ +\[0-9\]+ 0014 08A4A646\[^\n\]*\n"   { set x [expr $x+1] }
943
            -re "^ +\[0-9\]+ 0018 08A4C646\[^\n\]*\n"   { set x [expr $x+1] }
944
            -re "^ +\[0-9\]+ 001c 08A4E646\[^\n\]*\n"   { set x [expr $x+1] }
945
            -re "^ +\[0-9\]+ 0020 08A41646\[^\n\]*\n"   { set x [expr $x+1] }
946
            -re "^ +\[0-9\]+ 0024 08A43646\[^\n\]*\n"   { set x [expr $x+1] }
947
            -re "^ +\[0-9\]+ 0028 08A45646\[^\n\]*\n"   { set x [expr $x+1] }
948
            -re "^ +\[0-9\]+ 002c 08A47646\[^\n\]*\n"   { set x [expr $x+1] }
949
            -re "^ +\[0-9\]+ 0030 08A49646\[^\n\]*\n"   { set x [expr $x+1] }
950
            -re "^ +\[0-9\]+ 0034 08A4B646\[^\n\]*\n"   { set x [expr $x+1] }
951
            -re "^ +\[0-9\]+ 0038 08A4D646\[^\n\]*\n"   { set x [expr $x+1] }
952
            -re "^ +\[0-9\]+ 003c 08A4F646\[^\n\]*\n"   { set x [expr $x+1] }
953
            -re "^ +\[0-9\]+ 0040 08A40A46\[^\n\]*\n"   { set x [expr $x+1] }
954
            -re "^ +\[0-9\]+ 0044 08A42A46\[^\n\]*\n"   { set x [expr $x+1] }
955
            -re "^ +\[0-9\]+ 0048 08A44A46\[^\n\]*\n"   { set x [expr $x+1] }
956
            -re "^ +\[0-9\]+ 004c 08A46A46\[^\n\]*\n"   { set x [expr $x+1] }
957
            -re "^ +\[0-9\]+ 0050 08A48A46\[^\n\]*\n"   { set x [expr $x+1] }
958
            -re "^ +\[0-9\]+ 0054 08A4AA46\[^\n\]*\n"   { set x [expr $x+1] }
959
            -re "^ +\[0-9\]+ 0058 08A4CA46\[^\n\]*\n"   { set x [expr $x+1] }
960
            -re "^ +\[0-9\]+ 005c 08A4EA46\[^\n\]*\n"   { set x [expr $x+1] }
961
            -re "^ +\[0-9\]+ 0060 08A41A46\[^\n\]*\n"   { set x [expr $x+1] }
962
            -re "^ +\[0-9\]+ 0064 08A43A46\[^\n\]*\n"   { set x [expr $x+1] }
963
            -re "^ +\[0-9\]+ 0068 08A45A46\[^\n\]*\n"   { set x [expr $x+1] }
964
            -re "^ +\[0-9\]+ 006c 08A47A46\[^\n\]*\n"   { set x [expr $x+1] }
965
            -re "^ +\[0-9\]+ 0070 08A49A46\[^\n\]*\n"   { set x [expr $x+1] }
966
            -re "^ +\[0-9\]+ 0074 08A4BA46\[^\n\]*\n"   { set x [expr $x+1] }
967
            -re "^ +\[0-9\]+ 0078 08A4DA46\[^\n\]*\n"   { set x [expr $x+1] }
968
            -re "^ +\[0-9\]+ 007c 08A4FA46\[^\n\]*\n"   { set x [expr $x+1] }
969
            -re "^ +\[0-9\]+ 0080 08A40E46\[^\n\]*\n"   { set x [expr $x+1] }
970
            -re "^ +\[0-9\]+ 0084 08A42E46\[^\n\]*\n"   { set x [expr $x+1] }
971
            -re "^ +\[0-9\]+ 0088 08A44E46\[^\n\]*\n"   { set x [expr $x+1] }
972
            -re "^ +\[0-9\]+ 008c 08A46E46\[^\n\]*\n"   { set x [expr $x+1] }
973
            -re "^ +\[0-9\]+ 0090 08A48E46\[^\n\]*\n"   { set x [expr $x+1] }
974
            -re "^ +\[0-9\]+ 0094 08A4AE46\[^\n\]*\n"   { set x [expr $x+1] }
975
            -re "^ +\[0-9\]+ 0098 08A4CE46\[^\n\]*\n"   { set x [expr $x+1] }
976
            -re "^ +\[0-9\]+ 009c 08A4EE46\[^\n\]*\n"   { set x [expr $x+1] }
977
            -re "^ +\[0-9\]+ 00a0 08A41E46\[^\n\]*\n"   { set x [expr $x+1] }
978
            -re "^ +\[0-9\]+ 00a4 08A43E46\[^\n\]*\n"   { set x [expr $x+1] }
979
            -re "^ +\[0-9\]+ 00a8 08A45E46\[^\n\]*\n"   { set x [expr $x+1] }
980
            -re "^ +\[0-9\]+ 00ac 08A47E46\[^\n\]*\n"   { set x [expr $x+1] }
981
            -re "^ +\[0-9\]+ 00b0 08A49E46\[^\n\]*\n"   { set x [expr $x+1] }
982
            -re "^ +\[0-9\]+ 00b4 08A4BE46\[^\n\]*\n"   { set x [expr $x+1] }
983
            -re "^ +\[0-9\]+ 00b8 08A4DE46\[^\n\]*\n"   { set x [expr $x+1] }
984
            -re "^ +\[0-9\]+ 00bc 08A4FE46\[^\n\]*\n"   { set x [expr $x+1] }
985
            -re "^ +\[0-9\]+ 00c0 08A40686\[^\n\]*\n"   { set x [expr $x+1] }
986
            -re "^ +\[0-9\]+ 00c4 08A42686\[^\n\]*\n"   { set x [expr $x+1] }
987
            -re "^ +\[0-9\]+ 00c8 08A44686\[^\n\]*\n"   { set x [expr $x+1] }
988
            -re "^ +\[0-9\]+ 00cc 08A46686\[^\n\]*\n"   { set x [expr $x+1] }
989
            -re "^ +\[0-9\]+ 00d0 08A48686\[^\n\]*\n"   { set x [expr $x+1] }
990
            -re "^ +\[0-9\]+ 00d4 08A4A686\[^\n\]*\n"   { set x [expr $x+1] }
991
            -re "^ +\[0-9\]+ 00d8 08A4C686\[^\n\]*\n"   { set x [expr $x+1] }
992
            -re "^ +\[0-9\]+ 00dc 08A4E686\[^\n\]*\n"   { set x [expr $x+1] }
993
            -re "^ +\[0-9\]+ 00e0 08A41686\[^\n\]*\n"   { set x [expr $x+1] }
994
            -re "^ +\[0-9\]+ 00e4 08A43686\[^\n\]*\n"   { set x [expr $x+1] }
995
            -re "^ +\[0-9\]+ 00e8 08A45686\[^\n\]*\n"   { set x [expr $x+1] }
996
            -re "^ +\[0-9\]+ 00ec 08A47686\[^\n\]*\n"   { set x [expr $x+1] }
997
            -re "^ +\[0-9\]+ 00f0 08A49686\[^\n\]*\n"   { set x [expr $x+1] }
998
            -re "^ +\[0-9\]+ 00f4 08A4B686\[^\n\]*\n"   { set x [expr $x+1] }
999
            -re "^ +\[0-9\]+ 00f8 08A4D686\[^\n\]*\n"   { set x [expr $x+1] }
1000
            -re "^ +\[0-9\]+ 00fc 08A4F686\[^\n\]*\n"   { set x [expr $x+1] }
1001
            -re "^ +\[0-9\]+ 0100 08A40A86\[^\n\]*\n"   { set x [expr $x+1] }
1002
            -re "^ +\[0-9\]+ 0104 08A42A86\[^\n\]*\n"   { set x [expr $x+1] }
1003
            -re "^ +\[0-9\]+ 0108 08A44A86\[^\n\]*\n"   { set x [expr $x+1] }
1004
            -re "^ +\[0-9\]+ 010c 08A46A86\[^\n\]*\n"   { set x [expr $x+1] }
1005
            -re "^ +\[0-9\]+ 0110 08A48A86\[^\n\]*\n"   { set x [expr $x+1] }
1006
            -re "^ +\[0-9\]+ 0114 08A4AA86\[^\n\]*\n"   { set x [expr $x+1] }
1007
            -re "^ +\[0-9\]+ 0118 08A4CA86\[^\n\]*\n"   { set x [expr $x+1] }
1008
            -re "^ +\[0-9\]+ 011c 08A4EA86\[^\n\]*\n"   { set x [expr $x+1] }
1009
            -re "^ +\[0-9\]+ 0120 08A41A86\[^\n\]*\n"   { set x [expr $x+1] }
1010
            -re "^ +\[0-9\]+ 0124 08A43A86\[^\n\]*\n"   { set x [expr $x+1] }
1011
            -re "^ +\[0-9\]+ 0128 08A45A86\[^\n\]*\n"   { set x [expr $x+1] }
1012
            -re "^ +\[0-9\]+ 012c 08A47A86\[^\n\]*\n"   { set x [expr $x+1] }
1013
            -re "^ +\[0-9\]+ 0130 08A49A86\[^\n\]*\n"   { set x [expr $x+1] }
1014
            -re "^ +\[0-9\]+ 0134 08A4BA86\[^\n\]*\n"   { set x [expr $x+1] }
1015
            -re "^ +\[0-9\]+ 0138 08A4DA86\[^\n\]*\n"   { set x [expr $x+1] }
1016
            -re "^ +\[0-9\]+ 013c 08A4FA86\[^\n\]*\n"   { set x [expr $x+1] }
1017
            -re "^ +\[0-9\]+ 0140 08A40E86\[^\n\]*\n"   { set x [expr $x+1] }
1018
            -re "^ +\[0-9\]+ 0144 08A42E86\[^\n\]*\n"   { set x [expr $x+1] }
1019
            -re "^ +\[0-9\]+ 0148 08A44E86\[^\n\]*\n"   { set x [expr $x+1] }
1020
            -re "^ +\[0-9\]+ 014c 08A46E86\[^\n\]*\n"   { set x [expr $x+1] }
1021
            -re "^ +\[0-9\]+ 0150 08A48E86\[^\n\]*\n"   { set x [expr $x+1] }
1022
            -re "^ +\[0-9\]+ 0154 08A4AE86\[^\n\]*\n"   { set x [expr $x+1] }
1023
            -re "^ +\[0-9\]+ 0158 08A4CE86\[^\n\]*\n"   { set x [expr $x+1] }
1024
            -re "^ +\[0-9\]+ 015c 08A4EE86\[^\n\]*\n"   { set x [expr $x+1] }
1025
            -re "^ +\[0-9\]+ 0160 08A41E86\[^\n\]*\n"   { set x [expr $x+1] }
1026
            -re "^ +\[0-9\]+ 0164 08A43E86\[^\n\]*\n"   { set x [expr $x+1] }
1027
            -re "^ +\[0-9\]+ 0168 08A45E86\[^\n\]*\n"   { set x [expr $x+1] }
1028
            -re "^ +\[0-9\]+ 016c 08A47E86\[^\n\]*\n"   { set x [expr $x+1] }
1029
            -re "^ +\[0-9\]+ 0170 08A49E86\[^\n\]*\n"   { set x [expr $x+1] }
1030
            -re "^ +\[0-9\]+ 0174 08A4BE86\[^\n\]*\n"   { set x [expr $x+1] }
1031
            -re "^ +\[0-9\]+ 0178 08A4DE86\[^\n\]*\n"   { set x [expr $x+1] }
1032
            -re "^ +\[0-9\]+ 017c 08A4FE86\[^\n\]*\n"   { set x [expr $x+1] }
1033
            -re "^ +\[0-9\]+ 0180 08A406C6\[^\n\]*\n"   { set x [expr $x+1] }
1034
            -re "^ +\[0-9\]+ 0184 08A426C6\[^\n\]*\n"   { set x [expr $x+1] }
1035
            -re "^ +\[0-9\]+ 0188 08A446C6\[^\n\]*\n"   { set x [expr $x+1] }
1036
            -re "^ +\[0-9\]+ 018c 08A466C6\[^\n\]*\n"   { set x [expr $x+1] }
1037
            -re "^ +\[0-9\]+ 0190 08A486C6\[^\n\]*\n"   { set x [expr $x+1] }
1038
            -re "^ +\[0-9\]+ 0194 08A4A6C6\[^\n\]*\n"   { set x [expr $x+1] }
1039
            -re "^ +\[0-9\]+ 0198 08A4C6C6\[^\n\]*\n"   { set x [expr $x+1] }
1040
            -re "^ +\[0-9\]+ 019c 08A4E6C6\[^\n\]*\n"   { set x [expr $x+1] }
1041
            -re "^ +\[0-9\]+ 01a0 08A416C6\[^\n\]*\n"   { set x [expr $x+1] }
1042
            -re "^ +\[0-9\]+ 01a4 08A436C6\[^\n\]*\n"   { set x [expr $x+1] }
1043
            -re "^ +\[0-9\]+ 01a8 08A456C6\[^\n\]*\n"   { set x [expr $x+1] }
1044
            -re "^ +\[0-9\]+ 01ac 08A476C6\[^\n\]*\n"   { set x [expr $x+1] }
1045
            -re "^ +\[0-9\]+ 01b0 08A496C6\[^\n\]*\n"   { set x [expr $x+1] }
1046
            -re "^ +\[0-9\]+ 01b4 08A4B6C6\[^\n\]*\n"   { set x [expr $x+1] }
1047
            -re "^ +\[0-9\]+ 01b8 08A4D6C6\[^\n\]*\n"   { set x [expr $x+1] }
1048
            -re "^ +\[0-9\]+ 01bc 08A4F6C6\[^\n\]*\n"   { set x [expr $x+1] }
1049
            -re "^ +\[0-9\]+ 01c0 08A40AC6\[^\n\]*\n"   { set x [expr $x+1] }
1050
            -re "^ +\[0-9\]+ 01c4 08A42AC6\[^\n\]*\n"   { set x [expr $x+1] }
1051
            -re "^ +\[0-9\]+ 01c8 08A44AC6\[^\n\]*\n"   { set x [expr $x+1] }
1052
            -re "^ +\[0-9\]+ 01cc 08A46AC6\[^\n\]*\n"   { set x [expr $x+1] }
1053
            -re "^ +\[0-9\]+ 01d0 08A48AC6\[^\n\]*\n"   { set x [expr $x+1] }
1054
            -re "^ +\[0-9\]+ 01d4 08A4AAC6\[^\n\]*\n"   { set x [expr $x+1] }
1055
            -re "^ +\[0-9\]+ 01d8 08A4CAC6\[^\n\]*\n"   { set x [expr $x+1] }
1056
            -re "^ +\[0-9\]+ 01dc 08A4EAC6\[^\n\]*\n"   { set x [expr $x+1] }
1057
            -re "^ +\[0-9\]+ 01e0 08A41AC6\[^\n\]*\n"   { set x [expr $x+1] }
1058
            -re "^ +\[0-9\]+ 01e4 08A43AC6\[^\n\]*\n"   { set x [expr $x+1] }
1059
            -re "^ +\[0-9\]+ 01e8 08A45AC6\[^\n\]*\n"   { set x [expr $x+1] }
1060
            -re "^ +\[0-9\]+ 01ec 08A47AC6\[^\n\]*\n"   { set x [expr $x+1] }
1061
            -re "^ +\[0-9\]+ 01f0 08A49AC6\[^\n\]*\n"   { set x [expr $x+1] }
1062
            -re "^ +\[0-9\]+ 01f4 08A4BAC6\[^\n\]*\n"   { set x [expr $x+1] }
1063
            -re "^ +\[0-9\]+ 01f8 08A4DAC6\[^\n\]*\n"   { set x [expr $x+1] }
1064
            -re "^ +\[0-9\]+ 01fc 08A4FAC6\[^\n\]*\n"   { set x [expr $x+1] }
1065
            -re "^ +\[0-9\]+ 0200 08A40EC6\[^\n\]*\n"   { set x [expr $x+1] }
1066
            -re "^ +\[0-9\]+ 0204 08A42EC6\[^\n\]*\n"   { set x [expr $x+1] }
1067
            -re "^ +\[0-9\]+ 0208 08A44EC6\[^\n\]*\n"   { set x [expr $x+1] }
1068
            -re "^ +\[0-9\]+ 020c 08A46EC6\[^\n\]*\n"   { set x [expr $x+1] }
1069
            -re "^ +\[0-9\]+ 0210 08A48EC6\[^\n\]*\n"   { set x [expr $x+1] }
1070
            -re "^ +\[0-9\]+ 0214 08A4AEC6\[^\n\]*\n"   { set x [expr $x+1] }
1071
            -re "^ +\[0-9\]+ 0218 08A4CEC6\[^\n\]*\n"   { set x [expr $x+1] }
1072
            -re "^ +\[0-9\]+ 021c 08A4EEC6\[^\n\]*\n"   { set x [expr $x+1] }
1073
            -re "^ +\[0-9\]+ 0220 08A41EC6\[^\n\]*\n"   { set x [expr $x+1] }
1074
            -re "^ +\[0-9\]+ 0224 08A43EC6\[^\n\]*\n"   { set x [expr $x+1] }
1075
            -re "^ +\[0-9\]+ 0228 08A45EC6\[^\n\]*\n"   { set x [expr $x+1] }
1076
            -re "^ +\[0-9\]+ 022c 08A47EC6\[^\n\]*\n"   { set x [expr $x+1] }
1077
            -re "^ +\[0-9\]+ 0230 08A49EC6\[^\n\]*\n"   { set x [expr $x+1] }
1078
            -re "^ +\[0-9\]+ 0234 08A4BEC6\[^\n\]*\n"   { set x [expr $x+1] }
1079
            -re "^ +\[0-9\]+ 0238 08A4DEC6\[^\n\]*\n"   { set x [expr $x+1] }
1080
            -re "^ +\[0-9\]+ 023c 08A4FEC6\[^\n\]*\n"   { set x [expr $x+1] }
1081
            -re "\[^\n\]*\n"                            { }
1082
            timeout                             { perror "timeout\n"; break }
1083
            eof                                 { break }
1084
        }
1085
    }
1086
 
1087
    # This was intended to do any cleanup necessary.  It kinda looks like it
1088
    # isn't needed, but just in case, please keep it in for now.
1089
    gas_finish
1090
 
1091
    # Did we find what we were looking for?  If not, flunk it.
1092
    if [expr $x==144] then { pass $testname } else { fail $testname }
1093
}
1094
 
1095
proc do_shladd2 {} {
1096
    set testname "shladd2.s: shladd2 tests"
1097
    set x 0
1098
 
1099
    gas_start "shladd2.s" "-al"
1100
 
1101
    # Check the assembled instruction against a table built by the HP assembler
1102
    # Any differences should be checked by hand -- with the number of problems
1103
    # I've seen in the HP assembler I don't completely trust it.
1104
    #
1105
    # Instead of having a variable for each match string just increment the
1106
    # total number of matches seen.  That's simpler when testing large numbers
1107
    # of instructions (as these tests to).
1108
    while 1 {
1109
        expect {
1110
            -re "^ +\[0-9\]+ 0000 08A40666\[^\n\]*\n"   { set x [expr $x+1] }
1111
            -re "^ +\[0-9\]+ 0004 08A42666\[^\n\]*\n"   { set x [expr $x+1] }
1112
            -re "^ +\[0-9\]+ 0008 08A44666\[^\n\]*\n"   { set x [expr $x+1] }
1113
            -re "^ +\[0-9\]+ 000c 08A46666\[^\n\]*\n"   { set x [expr $x+1] }
1114
            -re "^ +\[0-9\]+ 0010 08A48666\[^\n\]*\n"   { set x [expr $x+1] }
1115
            -re "^ +\[0-9\]+ 0014 08A4A666\[^\n\]*\n"   { set x [expr $x+1] }
1116
            -re "^ +\[0-9\]+ 0018 08A4C666\[^\n\]*\n"   { set x [expr $x+1] }
1117
            -re "^ +\[0-9\]+ 001c 08A4E666\[^\n\]*\n"   { set x [expr $x+1] }
1118
            -re "^ +\[0-9\]+ 0020 08A41666\[^\n\]*\n"   { set x [expr $x+1] }
1119
            -re "^ +\[0-9\]+ 0024 08A43666\[^\n\]*\n"   { set x [expr $x+1] }
1120
            -re "^ +\[0-9\]+ 0028 08A45666\[^\n\]*\n"   { set x [expr $x+1] }
1121
            -re "^ +\[0-9\]+ 002c 08A47666\[^\n\]*\n"   { set x [expr $x+1] }
1122
            -re "^ +\[0-9\]+ 0030 08A49666\[^\n\]*\n"   { set x [expr $x+1] }
1123
            -re "^ +\[0-9\]+ 0034 08A4B666\[^\n\]*\n"   { set x [expr $x+1] }
1124
            -re "^ +\[0-9\]+ 0038 08A4D666\[^\n\]*\n"   { set x [expr $x+1] }
1125
            -re "^ +\[0-9\]+ 003c 08A4F666\[^\n\]*\n"   { set x [expr $x+1] }
1126
            -re "^ +\[0-9\]+ 0040 08A40A66\[^\n\]*\n"   { set x [expr $x+1] }
1127
            -re "^ +\[0-9\]+ 0044 08A42A66\[^\n\]*\n"   { set x [expr $x+1] }
1128
            -re "^ +\[0-9\]+ 0048 08A44A66\[^\n\]*\n"   { set x [expr $x+1] }
1129
            -re "^ +\[0-9\]+ 004c 08A46A66\[^\n\]*\n"   { set x [expr $x+1] }
1130
            -re "^ +\[0-9\]+ 0050 08A48A66\[^\n\]*\n"   { set x [expr $x+1] }
1131
            -re "^ +\[0-9\]+ 0054 08A4AA66\[^\n\]*\n"   { set x [expr $x+1] }
1132
            -re "^ +\[0-9\]+ 0058 08A4CA66\[^\n\]*\n"   { set x [expr $x+1] }
1133
            -re "^ +\[0-9\]+ 005c 08A4EA66\[^\n\]*\n"   { set x [expr $x+1] }
1134
            -re "^ +\[0-9\]+ 0060 08A41A66\[^\n\]*\n"   { set x [expr $x+1] }
1135
            -re "^ +\[0-9\]+ 0064 08A43A66\[^\n\]*\n"   { set x [expr $x+1] }
1136
            -re "^ +\[0-9\]+ 0068 08A45A66\[^\n\]*\n"   { set x [expr $x+1] }
1137
            -re "^ +\[0-9\]+ 006c 08A47A66\[^\n\]*\n"   { set x [expr $x+1] }
1138
            -re "^ +\[0-9\]+ 0070 08A49A66\[^\n\]*\n"   { set x [expr $x+1] }
1139
            -re "^ +\[0-9\]+ 0074 08A4BA66\[^\n\]*\n"   { set x [expr $x+1] }
1140
            -re "^ +\[0-9\]+ 0078 08A4DA66\[^\n\]*\n"   { set x [expr $x+1] }
1141
            -re "^ +\[0-9\]+ 007c 08A4FA66\[^\n\]*\n"   { set x [expr $x+1] }
1142
            -re "^ +\[0-9\]+ 0080 08A40E66\[^\n\]*\n"   { set x [expr $x+1] }
1143
            -re "^ +\[0-9\]+ 0084 08A42E66\[^\n\]*\n"   { set x [expr $x+1] }
1144
            -re "^ +\[0-9\]+ 0088 08A44E66\[^\n\]*\n"   { set x [expr $x+1] }
1145
            -re "^ +\[0-9\]+ 008c 08A46E66\[^\n\]*\n"   { set x [expr $x+1] }
1146
            -re "^ +\[0-9\]+ 0090 08A48E66\[^\n\]*\n"   { set x [expr $x+1] }
1147
            -re "^ +\[0-9\]+ 0094 08A4AE66\[^\n\]*\n"   { set x [expr $x+1] }
1148
            -re "^ +\[0-9\]+ 0098 08A4CE66\[^\n\]*\n"   { set x [expr $x+1] }
1149
            -re "^ +\[0-9\]+ 009c 08A4EE66\[^\n\]*\n"   { set x [expr $x+1] }
1150
            -re "^ +\[0-9\]+ 00a0 08A41E66\[^\n\]*\n"   { set x [expr $x+1] }
1151
            -re "^ +\[0-9\]+ 00a4 08A43E66\[^\n\]*\n"   { set x [expr $x+1] }
1152
            -re "^ +\[0-9\]+ 00a8 08A45E66\[^\n\]*\n"   { set x [expr $x+1] }
1153
            -re "^ +\[0-9\]+ 00ac 08A47E66\[^\n\]*\n"   { set x [expr $x+1] }
1154
            -re "^ +\[0-9\]+ 00b0 08A49E66\[^\n\]*\n"   { set x [expr $x+1] }
1155
            -re "^ +\[0-9\]+ 00b4 08A4BE66\[^\n\]*\n"   { set x [expr $x+1] }
1156
            -re "^ +\[0-9\]+ 00b8 08A4DE66\[^\n\]*\n"   { set x [expr $x+1] }
1157
            -re "^ +\[0-9\]+ 00bc 08A4FE66\[^\n\]*\n"   { set x [expr $x+1] }
1158
            -re "^ +\[0-9\]+ 00c0 08A406A6\[^\n\]*\n"   { set x [expr $x+1] }
1159
            -re "^ +\[0-9\]+ 00c4 08A426A6\[^\n\]*\n"   { set x [expr $x+1] }
1160
            -re "^ +\[0-9\]+ 00c8 08A446A6\[^\n\]*\n"   { set x [expr $x+1] }
1161
            -re "^ +\[0-9\]+ 00cc 08A466A6\[^\n\]*\n"   { set x [expr $x+1] }
1162
            -re "^ +\[0-9\]+ 00d0 08A486A6\[^\n\]*\n"   { set x [expr $x+1] }
1163
            -re "^ +\[0-9\]+ 00d4 08A4A6A6\[^\n\]*\n"   { set x [expr $x+1] }
1164
            -re "^ +\[0-9\]+ 00d8 08A4C6A6\[^\n\]*\n"   { set x [expr $x+1] }
1165
            -re "^ +\[0-9\]+ 00dc 08A4E6A6\[^\n\]*\n"   { set x [expr $x+1] }
1166
            -re "^ +\[0-9\]+ 00e0 08A416A6\[^\n\]*\n"   { set x [expr $x+1] }
1167
            -re "^ +\[0-9\]+ 00e4 08A436A6\[^\n\]*\n"   { set x [expr $x+1] }
1168
            -re "^ +\[0-9\]+ 00e8 08A456A6\[^\n\]*\n"   { set x [expr $x+1] }
1169
            -re "^ +\[0-9\]+ 00ec 08A476A6\[^\n\]*\n"   { set x [expr $x+1] }
1170
            -re "^ +\[0-9\]+ 00f0 08A496A6\[^\n\]*\n"   { set x [expr $x+1] }
1171
            -re "^ +\[0-9\]+ 00f4 08A4B6A6\[^\n\]*\n"   { set x [expr $x+1] }
1172
            -re "^ +\[0-9\]+ 00f8 08A4D6A6\[^\n\]*\n"   { set x [expr $x+1] }
1173
            -re "^ +\[0-9\]+ 00fc 08A4F6A6\[^\n\]*\n"   { set x [expr $x+1] }
1174
            -re "^ +\[0-9\]+ 0100 08A40AA6\[^\n\]*\n"   { set x [expr $x+1] }
1175
            -re "^ +\[0-9\]+ 0104 08A42AA6\[^\n\]*\n"   { set x [expr $x+1] }
1176
            -re "^ +\[0-9\]+ 0108 08A44AA6\[^\n\]*\n"   { set x [expr $x+1] }
1177
            -re "^ +\[0-9\]+ 010c 08A46AA6\[^\n\]*\n"   { set x [expr $x+1] }
1178
            -re "^ +\[0-9\]+ 0110 08A48AA6\[^\n\]*\n"   { set x [expr $x+1] }
1179
            -re "^ +\[0-9\]+ 0114 08A4AAA6\[^\n\]*\n"   { set x [expr $x+1] }
1180
            -re "^ +\[0-9\]+ 0118 08A4CAA6\[^\n\]*\n"   { set x [expr $x+1] }
1181
            -re "^ +\[0-9\]+ 011c 08A4EAA6\[^\n\]*\n"   { set x [expr $x+1] }
1182
            -re "^ +\[0-9\]+ 0120 08A41AA6\[^\n\]*\n"   { set x [expr $x+1] }
1183
            -re "^ +\[0-9\]+ 0124 08A43AA6\[^\n\]*\n"   { set x [expr $x+1] }
1184
            -re "^ +\[0-9\]+ 0128 08A45AA6\[^\n\]*\n"   { set x [expr $x+1] }
1185
            -re "^ +\[0-9\]+ 012c 08A47AA6\[^\n\]*\n"   { set x [expr $x+1] }
1186
            -re "^ +\[0-9\]+ 0130 08A49AA6\[^\n\]*\n"   { set x [expr $x+1] }
1187
            -re "^ +\[0-9\]+ 0134 08A4BAA6\[^\n\]*\n"   { set x [expr $x+1] }
1188
            -re "^ +\[0-9\]+ 0138 08A4DAA6\[^\n\]*\n"   { set x [expr $x+1] }
1189
            -re "^ +\[0-9\]+ 013c 08A4FAA6\[^\n\]*\n"   { set x [expr $x+1] }
1190
            -re "^ +\[0-9\]+ 0140 08A40EA6\[^\n\]*\n"   { set x [expr $x+1] }
1191
            -re "^ +\[0-9\]+ 0144 08A42EA6\[^\n\]*\n"   { set x [expr $x+1] }
1192
            -re "^ +\[0-9\]+ 0148 08A44EA6\[^\n\]*\n"   { set x [expr $x+1] }
1193
            -re "^ +\[0-9\]+ 014c 08A46EA6\[^\n\]*\n"   { set x [expr $x+1] }
1194
            -re "^ +\[0-9\]+ 0150 08A48EA6\[^\n\]*\n"   { set x [expr $x+1] }
1195
            -re "^ +\[0-9\]+ 0154 08A4AEA6\[^\n\]*\n"   { set x [expr $x+1] }
1196
            -re "^ +\[0-9\]+ 0158 08A4CEA6\[^\n\]*\n"   { set x [expr $x+1] }
1197
            -re "^ +\[0-9\]+ 015c 08A4EEA6\[^\n\]*\n"   { set x [expr $x+1] }
1198
            -re "^ +\[0-9\]+ 0160 08A41EA6\[^\n\]*\n"   { set x [expr $x+1] }
1199
            -re "^ +\[0-9\]+ 0164 08A43EA6\[^\n\]*\n"   { set x [expr $x+1] }
1200
            -re "^ +\[0-9\]+ 0168 08A45EA6\[^\n\]*\n"   { set x [expr $x+1] }
1201
            -re "^ +\[0-9\]+ 016c 08A47EA6\[^\n\]*\n"   { set x [expr $x+1] }
1202
            -re "^ +\[0-9\]+ 0170 08A49EA6\[^\n\]*\n"   { set x [expr $x+1] }
1203
            -re "^ +\[0-9\]+ 0174 08A4BEA6\[^\n\]*\n"   { set x [expr $x+1] }
1204
            -re "^ +\[0-9\]+ 0178 08A4DEA6\[^\n\]*\n"   { set x [expr $x+1] }
1205
            -re "^ +\[0-9\]+ 017c 08A4FEA6\[^\n\]*\n"   { set x [expr $x+1] }
1206
            -re "^ +\[0-9\]+ 0180 08A406E6\[^\n\]*\n"   { set x [expr $x+1] }
1207
            -re "^ +\[0-9\]+ 0184 08A426E6\[^\n\]*\n"   { set x [expr $x+1] }
1208
            -re "^ +\[0-9\]+ 0188 08A446E6\[^\n\]*\n"   { set x [expr $x+1] }
1209
            -re "^ +\[0-9\]+ 018c 08A466E6\[^\n\]*\n"   { set x [expr $x+1] }
1210
            -re "^ +\[0-9\]+ 0190 08A486E6\[^\n\]*\n"   { set x [expr $x+1] }
1211
            -re "^ +\[0-9\]+ 0194 08A4A6E6\[^\n\]*\n"   { set x [expr $x+1] }
1212
            -re "^ +\[0-9\]+ 0198 08A4C6E6\[^\n\]*\n"   { set x [expr $x+1] }
1213
            -re "^ +\[0-9\]+ 019c 08A4E6E6\[^\n\]*\n"   { set x [expr $x+1] }
1214
            -re "^ +\[0-9\]+ 01a0 08A416E6\[^\n\]*\n"   { set x [expr $x+1] }
1215
            -re "^ +\[0-9\]+ 01a4 08A436E6\[^\n\]*\n"   { set x [expr $x+1] }
1216
            -re "^ +\[0-9\]+ 01a8 08A456E6\[^\n\]*\n"   { set x [expr $x+1] }
1217
            -re "^ +\[0-9\]+ 01ac 08A476E6\[^\n\]*\n"   { set x [expr $x+1] }
1218
            -re "^ +\[0-9\]+ 01b0 08A496E6\[^\n\]*\n"   { set x [expr $x+1] }
1219
            -re "^ +\[0-9\]+ 01b4 08A4B6E6\[^\n\]*\n"   { set x [expr $x+1] }
1220
            -re "^ +\[0-9\]+ 01b8 08A4D6E6\[^\n\]*\n"   { set x [expr $x+1] }
1221
            -re "^ +\[0-9\]+ 01bc 08A4F6E6\[^\n\]*\n"   { set x [expr $x+1] }
1222
            -re "^ +\[0-9\]+ 01c0 08A40AE6\[^\n\]*\n"   { set x [expr $x+1] }
1223
            -re "^ +\[0-9\]+ 01c4 08A42AE6\[^\n\]*\n"   { set x [expr $x+1] }
1224
            -re "^ +\[0-9\]+ 01c8 08A44AE6\[^\n\]*\n"   { set x [expr $x+1] }
1225
            -re "^ +\[0-9\]+ 01cc 08A46AE6\[^\n\]*\n"   { set x [expr $x+1] }
1226
            -re "^ +\[0-9\]+ 01d0 08A48AE6\[^\n\]*\n"   { set x [expr $x+1] }
1227
            -re "^ +\[0-9\]+ 01d4 08A4AAE6\[^\n\]*\n"   { set x [expr $x+1] }
1228
            -re "^ +\[0-9\]+ 01d8 08A4CAE6\[^\n\]*\n"   { set x [expr $x+1] }
1229
            -re "^ +\[0-9\]+ 01dc 08A4EAE6\[^\n\]*\n"   { set x [expr $x+1] }
1230
            -re "^ +\[0-9\]+ 01e0 08A41AE6\[^\n\]*\n"   { set x [expr $x+1] }
1231
            -re "^ +\[0-9\]+ 01e4 08A43AE6\[^\n\]*\n"   { set x [expr $x+1] }
1232
            -re "^ +\[0-9\]+ 01e8 08A45AE6\[^\n\]*\n"   { set x [expr $x+1] }
1233
            -re "^ +\[0-9\]+ 01ec 08A47AE6\[^\n\]*\n"   { set x [expr $x+1] }
1234
            -re "^ +\[0-9\]+ 01f0 08A49AE6\[^\n\]*\n"   { set x [expr $x+1] }
1235
            -re "^ +\[0-9\]+ 01f4 08A4BAE6\[^\n\]*\n"   { set x [expr $x+1] }
1236
            -re "^ +\[0-9\]+ 01f8 08A4DAE6\[^\n\]*\n"   { set x [expr $x+1] }
1237
            -re "^ +\[0-9\]+ 01fc 08A4FAE6\[^\n\]*\n"   { set x [expr $x+1] }
1238
            -re "^ +\[0-9\]+ 0200 08A40EE6\[^\n\]*\n"   { set x [expr $x+1] }
1239
            -re "^ +\[0-9\]+ 0204 08A42EE6\[^\n\]*\n"   { set x [expr $x+1] }
1240
            -re "^ +\[0-9\]+ 0208 08A44EE6\[^\n\]*\n"   { set x [expr $x+1] }
1241
            -re "^ +\[0-9\]+ 020c 08A46EE6\[^\n\]*\n"   { set x [expr $x+1] }
1242
            -re "^ +\[0-9\]+ 0210 08A48EE6\[^\n\]*\n"   { set x [expr $x+1] }
1243
            -re "^ +\[0-9\]+ 0214 08A4AEE6\[^\n\]*\n"   { set x [expr $x+1] }
1244
            -re "^ +\[0-9\]+ 0218 08A4CEE6\[^\n\]*\n"   { set x [expr $x+1] }
1245
            -re "^ +\[0-9\]+ 021c 08A4EEE6\[^\n\]*\n"   { set x [expr $x+1] }
1246
            -re "^ +\[0-9\]+ 0220 08A41EE6\[^\n\]*\n"   { set x [expr $x+1] }
1247
            -re "^ +\[0-9\]+ 0224 08A43EE6\[^\n\]*\n"   { set x [expr $x+1] }
1248
            -re "^ +\[0-9\]+ 0228 08A45EE6\[^\n\]*\n"   { set x [expr $x+1] }
1249
            -re "^ +\[0-9\]+ 022c 08A47EE6\[^\n\]*\n"   { set x [expr $x+1] }
1250
            -re "^ +\[0-9\]+ 0230 08A49EE6\[^\n\]*\n"   { set x [expr $x+1] }
1251
            -re "^ +\[0-9\]+ 0234 08A4BEE6\[^\n\]*\n"   { set x [expr $x+1] }
1252
            -re "^ +\[0-9\]+ 0238 08A4DEE6\[^\n\]*\n"   { set x [expr $x+1] }
1253
            -re "^ +\[0-9\]+ 023c 08A4FEE6\[^\n\]*\n"   { set x [expr $x+1] }
1254
            -re "\[^\n\]*\n"                            { }
1255
            timeout                             { perror "timeout\n"; break }
1256
            eof                                 { break }
1257
        }
1258
    }
1259
 
1260
    # This was intended to do any cleanup necessary.  It kinda looks like it
1261
    # isn't needed, but just in case, please keep it in for now.
1262
    gas_finish
1263
 
1264
    # Did we find what we were looking for?  If not, flunk it.
1265
    if [expr $x==144] then { pass $testname } else { fail $testname }
1266
}
1267
 
1268
proc do_sub {} {
1269
    set testname "sub.s: sub tests"
1270
    set x 0
1271
 
1272
    gas_start "sub.s" "-al"
1273
 
1274
    # Check the assembled instruction against a table built by the HP assembler
1275
    # Any differences should be checked by hand -- with the number of problems
1276
    # I've seen in the HP assembler I don't completely trust it.
1277
    #
1278
    # Instead of having a variable for each match string just increment the
1279
    # total number of matches seen.  That's simpler when testing large numbers
1280
    # of instructions (as these tests to).
1281
    while 1 {
1282
        expect {
1283
            -re "^ +\[0-9\]+ 0000 08A40406\[^\n\]*\n"   { set x [expr $x+1] }
1284
            -re "^ +\[0-9\]+ 0004 08A42406\[^\n\]*\n"   { set x [expr $x+1] }
1285
            -re "^ +\[0-9\]+ 0008 08A44406\[^\n\]*\n"   { set x [expr $x+1] }
1286
            -re "^ +\[0-9\]+ 000c 08A46406\[^\n\]*\n"   { set x [expr $x+1] }
1287
            -re "^ +\[0-9\]+ 0010 08A48406\[^\n\]*\n"   { set x [expr $x+1] }
1288
            -re "^ +\[0-9\]+ 0014 08A4A406\[^\n\]*\n"   { set x [expr $x+1] }
1289
            -re "^ +\[0-9\]+ 0018 08A4C406\[^\n\]*\n"   { set x [expr $x+1] }
1290
            -re "^ +\[0-9\]+ 001c 08A4E406\[^\n\]*\n"   { set x [expr $x+1] }
1291
            -re "^ +\[0-9\]+ 0020 08A41406\[^\n\]*\n"   { set x [expr $x+1] }
1292
            -re "^ +\[0-9\]+ 0024 08A43406\[^\n\]*\n"   { set x [expr $x+1] }
1293
            -re "^ +\[0-9\]+ 0028 08A45406\[^\n\]*\n"   { set x [expr $x+1] }
1294
            -re "^ +\[0-9\]+ 002c 08A47406\[^\n\]*\n"   { set x [expr $x+1] }
1295
            -re "^ +\[0-9\]+ 0030 08A49406\[^\n\]*\n"   { set x [expr $x+1] }
1296
            -re "^ +\[0-9\]+ 0034 08A4B406\[^\n\]*\n"   { set x [expr $x+1] }
1297
            -re "^ +\[0-9\]+ 0038 08A4D406\[^\n\]*\n"   { set x [expr $x+1] }
1298
            -re "^ +\[0-9\]+ 003c 08A4F406\[^\n\]*\n"   { set x [expr $x+1] }
1299
            -re "^ +\[0-9\]+ 0040 08A40C06\[^\n\]*\n"   { set x [expr $x+1] }
1300
            -re "^ +\[0-9\]+ 0044 08A42C06\[^\n\]*\n"   { set x [expr $x+1] }
1301
            -re "^ +\[0-9\]+ 0048 08A44C06\[^\n\]*\n"   { set x [expr $x+1] }
1302
            -re "^ +\[0-9\]+ 004c 08A46C06\[^\n\]*\n"   { set x [expr $x+1] }
1303
            -re "^ +\[0-9\]+ 0050 08A48C06\[^\n\]*\n"   { set x [expr $x+1] }
1304
            -re "^ +\[0-9\]+ 0054 08A4AC06\[^\n\]*\n"   { set x [expr $x+1] }
1305
            -re "^ +\[0-9\]+ 0058 08A4CC06\[^\n\]*\n"   { set x [expr $x+1] }
1306
            -re "^ +\[0-9\]+ 005c 08A4EC06\[^\n\]*\n"   { set x [expr $x+1] }
1307
            -re "^ +\[0-9\]+ 0060 08A41C06\[^\n\]*\n"   { set x [expr $x+1] }
1308
            -re "^ +\[0-9\]+ 0064 08A43C06\[^\n\]*\n"   { set x [expr $x+1] }
1309
            -re "^ +\[0-9\]+ 0068 08A45C06\[^\n\]*\n"   { set x [expr $x+1] }
1310
            -re "^ +\[0-9\]+ 006c 08A47C06\[^\n\]*\n"   { set x [expr $x+1] }
1311
            -re "^ +\[0-9\]+ 0070 08A49C06\[^\n\]*\n"   { set x [expr $x+1] }
1312
            -re "^ +\[0-9\]+ 0074 08A4BC06\[^\n\]*\n"   { set x [expr $x+1] }
1313
            -re "^ +\[0-9\]+ 0078 08A4DC06\[^\n\]*\n"   { set x [expr $x+1] }
1314
            -re "^ +\[0-9\]+ 007c 08A4FC06\[^\n\]*\n"   { set x [expr $x+1] }
1315
            -re "^ +\[0-9\]+ 0080 08A40506\[^\n\]*\n"   { set x [expr $x+1] }
1316
            -re "^ +\[0-9\]+ 0084 08A42506\[^\n\]*\n"   { set x [expr $x+1] }
1317
            -re "^ +\[0-9\]+ 0088 08A44506\[^\n\]*\n"   { set x [expr $x+1] }
1318
            -re "^ +\[0-9\]+ 008c 08A46506\[^\n\]*\n"   { set x [expr $x+1] }
1319
            -re "^ +\[0-9\]+ 0090 08A48506\[^\n\]*\n"   { set x [expr $x+1] }
1320
            -re "^ +\[0-9\]+ 0094 08A4A506\[^\n\]*\n"   { set x [expr $x+1] }
1321
            -re "^ +\[0-9\]+ 0098 08A4C506\[^\n\]*\n"   { set x [expr $x+1] }
1322
            -re "^ +\[0-9\]+ 009c 08A4E506\[^\n\]*\n"   { set x [expr $x+1] }
1323
            -re "^ +\[0-9\]+ 00a0 08A41506\[^\n\]*\n"   { set x [expr $x+1] }
1324
            -re "^ +\[0-9\]+ 00a4 08A43506\[^\n\]*\n"   { set x [expr $x+1] }
1325
            -re "^ +\[0-9\]+ 00a8 08A45506\[^\n\]*\n"   { set x [expr $x+1] }
1326
            -re "^ +\[0-9\]+ 00ac 08A47506\[^\n\]*\n"   { set x [expr $x+1] }
1327
            -re "^ +\[0-9\]+ 00b0 08A49506\[^\n\]*\n"   { set x [expr $x+1] }
1328
            -re "^ +\[0-9\]+ 00b4 08A4B506\[^\n\]*\n"   { set x [expr $x+1] }
1329
            -re "^ +\[0-9\]+ 00b8 08A4D506\[^\n\]*\n"   { set x [expr $x+1] }
1330
            -re "^ +\[0-9\]+ 00bc 08A4F506\[^\n\]*\n"   { set x [expr $x+1] }
1331
            -re "^ +\[0-9\]+ 00c0 08A40D06\[^\n\]*\n"   { set x [expr $x+1] }
1332
            -re "^ +\[0-9\]+ 00c4 08A42D06\[^\n\]*\n"   { set x [expr $x+1] }
1333
            -re "^ +\[0-9\]+ 00c8 08A44D06\[^\n\]*\n"   { set x [expr $x+1] }
1334
            -re "^ +\[0-9\]+ 00cc 08A46D06\[^\n\]*\n"   { set x [expr $x+1] }
1335
            -re "^ +\[0-9\]+ 00d0 08A48D06\[^\n\]*\n"   { set x [expr $x+1] }
1336
            -re "^ +\[0-9\]+ 00d4 08A4AD06\[^\n\]*\n"   { set x [expr $x+1] }
1337
            -re "^ +\[0-9\]+ 00d8 08A4CD06\[^\n\]*\n"   { set x [expr $x+1] }
1338
            -re "^ +\[0-9\]+ 00dc 08A4ED06\[^\n\]*\n"   { set x [expr $x+1] }
1339
            -re "^ +\[0-9\]+ 00e0 08A41D06\[^\n\]*\n"   { set x [expr $x+1] }
1340
            -re "^ +\[0-9\]+ 00e4 08A43D06\[^\n\]*\n"   { set x [expr $x+1] }
1341
            -re "^ +\[0-9\]+ 00e8 08A45D06\[^\n\]*\n"   { set x [expr $x+1] }
1342
            -re "^ +\[0-9\]+ 00ec 08A47D06\[^\n\]*\n"   { set x [expr $x+1] }
1343
            -re "^ +\[0-9\]+ 00f0 08A49D06\[^\n\]*\n"   { set x [expr $x+1] }
1344
            -re "^ +\[0-9\]+ 00f4 08A4BD06\[^\n\]*\n"   { set x [expr $x+1] }
1345
            -re "^ +\[0-9\]+ 00f8 08A4DD06\[^\n\]*\n"   { set x [expr $x+1] }
1346
            -re "^ +\[0-9\]+ 00fc 08A4FD06\[^\n\]*\n"   { set x [expr $x+1] }
1347
            -re "^ +\[0-9\]+ 0100 08A404C6\[^\n\]*\n"   { set x [expr $x+1] }
1348
            -re "^ +\[0-9\]+ 0104 08A424C6\[^\n\]*\n"   { set x [expr $x+1] }
1349
            -re "^ +\[0-9\]+ 0108 08A444C6\[^\n\]*\n"   { set x [expr $x+1] }
1350
            -re "^ +\[0-9\]+ 010c 08A464C6\[^\n\]*\n"   { set x [expr $x+1] }
1351
            -re "^ +\[0-9\]+ 0110 08A484C6\[^\n\]*\n"   { set x [expr $x+1] }
1352
            -re "^ +\[0-9\]+ 0114 08A4A4C6\[^\n\]*\n"   { set x [expr $x+1] }
1353
            -re "^ +\[0-9\]+ 0118 08A4C4C6\[^\n\]*\n"   { set x [expr $x+1] }
1354
            -re "^ +\[0-9\]+ 011c 08A4E4C6\[^\n\]*\n"   { set x [expr $x+1] }
1355
            -re "^ +\[0-9\]+ 0120 08A414C6\[^\n\]*\n"   { set x [expr $x+1] }
1356
            -re "^ +\[0-9\]+ 0124 08A434C6\[^\n\]*\n"   { set x [expr $x+1] }
1357
            -re "^ +\[0-9\]+ 0128 08A454C6\[^\n\]*\n"   { set x [expr $x+1] }
1358
            -re "^ +\[0-9\]+ 012c 08A474C6\[^\n\]*\n"   { set x [expr $x+1] }
1359
            -re "^ +\[0-9\]+ 0130 08A494C6\[^\n\]*\n"   { set x [expr $x+1] }
1360
            -re "^ +\[0-9\]+ 0134 08A4B4C6\[^\n\]*\n"   { set x [expr $x+1] }
1361
            -re "^ +\[0-9\]+ 0138 08A4D4C6\[^\n\]*\n"   { set x [expr $x+1] }
1362
            -re "^ +\[0-9\]+ 013c 08A4F4C6\[^\n\]*\n"   { set x [expr $x+1] }
1363
            -re "^ +\[0-9\]+ 0140 08A40CC6\[^\n\]*\n"   { set x [expr $x+1] }
1364
            -re "^ +\[0-9\]+ 0144 08A42CC6\[^\n\]*\n"   { set x [expr $x+1] }
1365
            -re "^ +\[0-9\]+ 0148 08A44CC6\[^\n\]*\n"   { set x [expr $x+1] }
1366
            -re "^ +\[0-9\]+ 014c 08A46CC6\[^\n\]*\n"   { set x [expr $x+1] }
1367
            -re "^ +\[0-9\]+ 0150 08A48CC6\[^\n\]*\n"   { set x [expr $x+1] }
1368
            -re "^ +\[0-9\]+ 0154 08A4ACC6\[^\n\]*\n"   { set x [expr $x+1] }
1369
            -re "^ +\[0-9\]+ 0158 08A4CCC6\[^\n\]*\n"   { set x [expr $x+1] }
1370
            -re "^ +\[0-9\]+ 015c 08A4ECC6\[^\n\]*\n"   { set x [expr $x+1] }
1371
            -re "^ +\[0-9\]+ 0160 08A41CC6\[^\n\]*\n"   { set x [expr $x+1] }
1372
            -re "^ +\[0-9\]+ 0164 08A43CC6\[^\n\]*\n"   { set x [expr $x+1] }
1373
            -re "^ +\[0-9\]+ 0168 08A45CC6\[^\n\]*\n"   { set x [expr $x+1] }
1374
            -re "^ +\[0-9\]+ 016c 08A47CC6\[^\n\]*\n"   { set x [expr $x+1] }
1375
            -re "^ +\[0-9\]+ 0170 08A49CC6\[^\n\]*\n"   { set x [expr $x+1] }
1376
            -re "^ +\[0-9\]+ 0174 08A4BCC6\[^\n\]*\n"   { set x [expr $x+1] }
1377
            -re "^ +\[0-9\]+ 0178 08A4DCC6\[^\n\]*\n"   { set x [expr $x+1] }
1378
            -re "^ +\[0-9\]+ 017c 08A4FCC6\[^\n\]*\n"   { set x [expr $x+1] }
1379
            -re "^ +\[0-9\]+ 0180 08A40C06\[^\n\]*\n"   { set x [expr $x+1] }
1380
            -re "^ +\[0-9\]+ 0184 08A42C06\[^\n\]*\n"   { set x [expr $x+1] }
1381
            -re "^ +\[0-9\]+ 0188 08A44C06\[^\n\]*\n"   { set x [expr $x+1] }
1382
            -re "^ +\[0-9\]+ 018c 08A46C06\[^\n\]*\n"   { set x [expr $x+1] }
1383
            -re "^ +\[0-9\]+ 0190 08A48C06\[^\n\]*\n"   { set x [expr $x+1] }
1384
            -re "^ +\[0-9\]+ 0194 08A4AC06\[^\n\]*\n"   { set x [expr $x+1] }
1385
            -re "^ +\[0-9\]+ 0198 08A4CC06\[^\n\]*\n"   { set x [expr $x+1] }
1386
            -re "^ +\[0-9\]+ 019c 08A4EC06\[^\n\]*\n"   { set x [expr $x+1] }
1387
            -re "^ +\[0-9\]+ 01a0 08A41C06\[^\n\]*\n"   { set x [expr $x+1] }
1388
            -re "^ +\[0-9\]+ 01a4 08A43C06\[^\n\]*\n"   { set x [expr $x+1] }
1389
            -re "^ +\[0-9\]+ 01a8 08A45C06\[^\n\]*\n"   { set x [expr $x+1] }
1390
            -re "^ +\[0-9\]+ 01ac 08A47C06\[^\n\]*\n"   { set x [expr $x+1] }
1391
            -re "^ +\[0-9\]+ 01b0 08A49C06\[^\n\]*\n"   { set x [expr $x+1] }
1392
            -re "^ +\[0-9\]+ 01b4 08A4BC06\[^\n\]*\n"   { set x [expr $x+1] }
1393
            -re "^ +\[0-9\]+ 01b8 08A4DC06\[^\n\]*\n"   { set x [expr $x+1] }
1394
            -re "^ +\[0-9\]+ 01bc 08A4FC06\[^\n\]*\n"   { set x [expr $x+1] }
1395
            -re "^ +\[0-9\]+ 01c0 08A40506\[^\n\]*\n"   { set x [expr $x+1] }
1396
            -re "^ +\[0-9\]+ 01c4 08A42506\[^\n\]*\n"   { set x [expr $x+1] }
1397
            -re "^ +\[0-9\]+ 01c8 08A44506\[^\n\]*\n"   { set x [expr $x+1] }
1398
            -re "^ +\[0-9\]+ 01cc 08A46506\[^\n\]*\n"   { set x [expr $x+1] }
1399
            -re "^ +\[0-9\]+ 01d0 08A48506\[^\n\]*\n"   { set x [expr $x+1] }
1400
            -re "^ +\[0-9\]+ 01d4 08A4A506\[^\n\]*\n"   { set x [expr $x+1] }
1401
            -re "^ +\[0-9\]+ 01d8 08A4C506\[^\n\]*\n"   { set x [expr $x+1] }
1402
            -re "^ +\[0-9\]+ 01dc 08A4E506\[^\n\]*\n"   { set x [expr $x+1] }
1403
            -re "^ +\[0-9\]+ 01e0 08A41506\[^\n\]*\n"   { set x [expr $x+1] }
1404
            -re "^ +\[0-9\]+ 01e4 08A43506\[^\n\]*\n"   { set x [expr $x+1] }
1405
            -re "^ +\[0-9\]+ 01e8 08A45506\[^\n\]*\n"   { set x [expr $x+1] }
1406
            -re "^ +\[0-9\]+ 01ec 08A47506\[^\n\]*\n"   { set x [expr $x+1] }
1407
            -re "^ +\[0-9\]+ 01f0 08A49506\[^\n\]*\n"   { set x [expr $x+1] }
1408
            -re "^ +\[0-9\]+ 01f4 08A4B506\[^\n\]*\n"   { set x [expr $x+1] }
1409
            -re "^ +\[0-9\]+ 01f8 08A4D506\[^\n\]*\n"   { set x [expr $x+1] }
1410
            -re "^ +\[0-9\]+ 01fc 08A4F506\[^\n\]*\n"   { set x [expr $x+1] }
1411
            -re "^ +\[0-9\]+ 0200 08A40D06\[^\n\]*\n"   { set x [expr $x+1] }
1412
            -re "^ +\[0-9\]+ 0204 08A42D06\[^\n\]*\n"   { set x [expr $x+1] }
1413
            -re "^ +\[0-9\]+ 0208 08A44D06\[^\n\]*\n"   { set x [expr $x+1] }
1414
            -re "^ +\[0-9\]+ 020c 08A46D06\[^\n\]*\n"   { set x [expr $x+1] }
1415
            -re "^ +\[0-9\]+ 0210 08A48D06\[^\n\]*\n"   { set x [expr $x+1] }
1416
            -re "^ +\[0-9\]+ 0214 08A4AD06\[^\n\]*\n"   { set x [expr $x+1] }
1417
            -re "^ +\[0-9\]+ 0218 08A4CD06\[^\n\]*\n"   { set x [expr $x+1] }
1418
            -re "^ +\[0-9\]+ 021c 08A4ED06\[^\n\]*\n"   { set x [expr $x+1] }
1419
            -re "^ +\[0-9\]+ 0220 08A41D06\[^\n\]*\n"   { set x [expr $x+1] }
1420
            -re "^ +\[0-9\]+ 0224 08A43D06\[^\n\]*\n"   { set x [expr $x+1] }
1421
            -re "^ +\[0-9\]+ 0228 08A45D06\[^\n\]*\n"   { set x [expr $x+1] }
1422
            -re "^ +\[0-9\]+ 022c 08A47D06\[^\n\]*\n"   { set x [expr $x+1] }
1423
            -re "^ +\[0-9\]+ 0230 08A49D06\[^\n\]*\n"   { set x [expr $x+1] }
1424
            -re "^ +\[0-9\]+ 0234 08A4BD06\[^\n\]*\n"   { set x [expr $x+1] }
1425
            -re "^ +\[0-9\]+ 0238 08A4DD06\[^\n\]*\n"   { set x [expr $x+1] }
1426
            -re "^ +\[0-9\]+ 023c 08A4FD06\[^\n\]*\n"   { set x [expr $x+1] }
1427
            -re "^ +\[0-9\]+ 0240 08A404C6\[^\n\]*\n"   { set x [expr $x+1] }
1428
            -re "^ +\[0-9\]+ 0244 08A424C6\[^\n\]*\n"   { set x [expr $x+1] }
1429
            -re "^ +\[0-9\]+ 0248 08A444C6\[^\n\]*\n"   { set x [expr $x+1] }
1430
            -re "^ +\[0-9\]+ 024c 08A464C6\[^\n\]*\n"   { set x [expr $x+1] }
1431
            -re "^ +\[0-9\]+ 0250 08A484C6\[^\n\]*\n"   { set x [expr $x+1] }
1432
            -re "^ +\[0-9\]+ 0254 08A4A4C6\[^\n\]*\n"   { set x [expr $x+1] }
1433
            -re "^ +\[0-9\]+ 0258 08A4C4C6\[^\n\]*\n"   { set x [expr $x+1] }
1434
            -re "^ +\[0-9\]+ 025c 08A4E4C6\[^\n\]*\n"   { set x [expr $x+1] }
1435
            -re "^ +\[0-9\]+ 0260 08A414C6\[^\n\]*\n"   { set x [expr $x+1] }
1436
            -re "^ +\[0-9\]+ 0264 08A434C6\[^\n\]*\n"   { set x [expr $x+1] }
1437
            -re "^ +\[0-9\]+ 0268 08A454C6\[^\n\]*\n"   { set x [expr $x+1] }
1438
            -re "^ +\[0-9\]+ 026c 08A474C6\[^\n\]*\n"   { set x [expr $x+1] }
1439
            -re "^ +\[0-9\]+ 0270 08A494C6\[^\n\]*\n"   { set x [expr $x+1] }
1440
            -re "^ +\[0-9\]+ 0274 08A4B4C6\[^\n\]*\n"   { set x [expr $x+1] }
1441
            -re "^ +\[0-9\]+ 0278 08A4D4C6\[^\n\]*\n"   { set x [expr $x+1] }
1442
            -re "^ +\[0-9\]+ 027c 08A4F4C6\[^\n\]*\n"   { set x [expr $x+1] }
1443
            -re "^ +\[0-9\]+ 0280 08A40CC6\[^\n\]*\n"   { set x [expr $x+1] }
1444
            -re "^ +\[0-9\]+ 0284 08A42CC6\[^\n\]*\n"   { set x [expr $x+1] }
1445
            -re "^ +\[0-9\]+ 0288 08A44CC6\[^\n\]*\n"   { set x [expr $x+1] }
1446
            -re "^ +\[0-9\]+ 028c 08A46CC6\[^\n\]*\n"   { set x [expr $x+1] }
1447
            -re "^ +\[0-9\]+ 0290 08A48CC6\[^\n\]*\n"   { set x [expr $x+1] }
1448
            -re "^ +\[0-9\]+ 0294 08A4ACC6\[^\n\]*\n"   { set x [expr $x+1] }
1449
            -re "^ +\[0-9\]+ 0298 08A4CCC6\[^\n\]*\n"   { set x [expr $x+1] }
1450
            -re "^ +\[0-9\]+ 029c 08A4ECC6\[^\n\]*\n"   { set x [expr $x+1] }
1451
            -re "^ +\[0-9\]+ 02a0 08A41CC6\[^\n\]*\n"   { set x [expr $x+1] }
1452
            -re "^ +\[0-9\]+ 02a4 08A43CC6\[^\n\]*\n"   { set x [expr $x+1] }
1453
            -re "^ +\[0-9\]+ 02a8 08A45CC6\[^\n\]*\n"   { set x [expr $x+1] }
1454
            -re "^ +\[0-9\]+ 02ac 08A47CC6\[^\n\]*\n"   { set x [expr $x+1] }
1455
            -re "^ +\[0-9\]+ 02b0 08A49CC6\[^\n\]*\n"   { set x [expr $x+1] }
1456
            -re "^ +\[0-9\]+ 02b4 08A4BCC6\[^\n\]*\n"   { set x [expr $x+1] }
1457
            -re "^ +\[0-9\]+ 02b8 08A4DCC6\[^\n\]*\n"   { set x [expr $x+1] }
1458
            -re "^ +\[0-9\]+ 02bc 08A4FCC6\[^\n\]*\n"   { set x [expr $x+1] }
1459
            -re "\[^\n\]*\n"                            { }
1460
            timeout                             { perror "timeout\n"; break }
1461
            eof                                 { break }
1462
        }
1463
    }
1464
 
1465
    # This was intended to do any cleanup necessary.  It kinda looks like it
1466
    # isn't needed, but just in case, please keep it in for now.
1467
    gas_finish
1468
 
1469
    # Did we find what we were looking for?  If not, flunk it.
1470
    if [expr $x==176] then { pass $testname } else { fail $testname }
1471
}
1472
 
1473
proc do_sub2 {} {
1474
    set testname "sub2.s: sub2 tests"
1475
    set x 0
1476
 
1477
    gas_start "sub2.s" "-al"
1478
 
1479
    # Check the assembled instruction against a table built by the HP assembler
1480
    # Any differences should be checked by hand -- with the number of problems
1481
    # I've seen in the HP assembler I don't completely trust it.
1482
    #
1483
    # Instead of having a variable for each match string just increment the
1484
    # total number of matches seen.  That's simpler when testing large numbers
1485
    # of instructions (as these tests to).
1486
    while 1 {
1487
        expect {
1488
            -re "^ +\[0-9\]+ 0000 08A40426\[^\n\]*\n"   { set x [expr $x+1] }
1489
            -re "^ +\[0-9\]+ 0004 08A42426\[^\n\]*\n"   { set x [expr $x+1] }
1490
            -re "^ +\[0-9\]+ 0008 08A44426\[^\n\]*\n"   { set x [expr $x+1] }
1491
            -re "^ +\[0-9\]+ 000c 08A46426\[^\n\]*\n"   { set x [expr $x+1] }
1492
            -re "^ +\[0-9\]+ 0010 08A48426\[^\n\]*\n"   { set x [expr $x+1] }
1493
            -re "^ +\[0-9\]+ 0014 08A4A426\[^\n\]*\n"   { set x [expr $x+1] }
1494
            -re "^ +\[0-9\]+ 0018 08A4C426\[^\n\]*\n"   { set x [expr $x+1] }
1495
            -re "^ +\[0-9\]+ 001c 08A4E426\[^\n\]*\n"   { set x [expr $x+1] }
1496
            -re "^ +\[0-9\]+ 0020 08A41426\[^\n\]*\n"   { set x [expr $x+1] }
1497
            -re "^ +\[0-9\]+ 0024 08A43426\[^\n\]*\n"   { set x [expr $x+1] }
1498
            -re "^ +\[0-9\]+ 0028 08A45426\[^\n\]*\n"   { set x [expr $x+1] }
1499
            -re "^ +\[0-9\]+ 002c 08A47426\[^\n\]*\n"   { set x [expr $x+1] }
1500
            -re "^ +\[0-9\]+ 0030 08A49426\[^\n\]*\n"   { set x [expr $x+1] }
1501
            -re "^ +\[0-9\]+ 0034 08A4B426\[^\n\]*\n"   { set x [expr $x+1] }
1502
            -re "^ +\[0-9\]+ 0038 08A4D426\[^\n\]*\n"   { set x [expr $x+1] }
1503
            -re "^ +\[0-9\]+ 003c 08A4F426\[^\n\]*\n"   { set x [expr $x+1] }
1504
            -re "^ +\[0-9\]+ 0040 08A40C26\[^\n\]*\n"   { set x [expr $x+1] }
1505
            -re "^ +\[0-9\]+ 0044 08A42C26\[^\n\]*\n"   { set x [expr $x+1] }
1506
            -re "^ +\[0-9\]+ 0048 08A44C26\[^\n\]*\n"   { set x [expr $x+1] }
1507
            -re "^ +\[0-9\]+ 004c 08A46C26\[^\n\]*\n"   { set x [expr $x+1] }
1508
            -re "^ +\[0-9\]+ 0050 08A48C26\[^\n\]*\n"   { set x [expr $x+1] }
1509
            -re "^ +\[0-9\]+ 0054 08A4AC26\[^\n\]*\n"   { set x [expr $x+1] }
1510
            -re "^ +\[0-9\]+ 0058 08A4CC26\[^\n\]*\n"   { set x [expr $x+1] }
1511
            -re "^ +\[0-9\]+ 005c 08A4EC26\[^\n\]*\n"   { set x [expr $x+1] }
1512
            -re "^ +\[0-9\]+ 0060 08A41C26\[^\n\]*\n"   { set x [expr $x+1] }
1513
            -re "^ +\[0-9\]+ 0064 08A43C26\[^\n\]*\n"   { set x [expr $x+1] }
1514
            -re "^ +\[0-9\]+ 0068 08A45C26\[^\n\]*\n"   { set x [expr $x+1] }
1515
            -re "^ +\[0-9\]+ 006c 08A47C26\[^\n\]*\n"   { set x [expr $x+1] }
1516
            -re "^ +\[0-9\]+ 0070 08A49C26\[^\n\]*\n"   { set x [expr $x+1] }
1517
            -re "^ +\[0-9\]+ 0074 08A4BC26\[^\n\]*\n"   { set x [expr $x+1] }
1518
            -re "^ +\[0-9\]+ 0078 08A4DC26\[^\n\]*\n"   { set x [expr $x+1] }
1519
            -re "^ +\[0-9\]+ 007c 08A4FC26\[^\n\]*\n"   { set x [expr $x+1] }
1520
            -re "^ +\[0-9\]+ 0080 08A40526\[^\n\]*\n"   { set x [expr $x+1] }
1521
            -re "^ +\[0-9\]+ 0084 08A42526\[^\n\]*\n"   { set x [expr $x+1] }
1522
            -re "^ +\[0-9\]+ 0088 08A44526\[^\n\]*\n"   { set x [expr $x+1] }
1523
            -re "^ +\[0-9\]+ 008c 08A46526\[^\n\]*\n"   { set x [expr $x+1] }
1524
            -re "^ +\[0-9\]+ 0090 08A48526\[^\n\]*\n"   { set x [expr $x+1] }
1525
            -re "^ +\[0-9\]+ 0094 08A4A526\[^\n\]*\n"   { set x [expr $x+1] }
1526
            -re "^ +\[0-9\]+ 0098 08A4C526\[^\n\]*\n"   { set x [expr $x+1] }
1527
            -re "^ +\[0-9\]+ 009c 08A4E526\[^\n\]*\n"   { set x [expr $x+1] }
1528
            -re "^ +\[0-9\]+ 00a0 08A41526\[^\n\]*\n"   { set x [expr $x+1] }
1529
            -re "^ +\[0-9\]+ 00a4 08A43526\[^\n\]*\n"   { set x [expr $x+1] }
1530
            -re "^ +\[0-9\]+ 00a8 08A45526\[^\n\]*\n"   { set x [expr $x+1] }
1531
            -re "^ +\[0-9\]+ 00ac 08A47526\[^\n\]*\n"   { set x [expr $x+1] }
1532
            -re "^ +\[0-9\]+ 00b0 08A49526\[^\n\]*\n"   { set x [expr $x+1] }
1533
            -re "^ +\[0-9\]+ 00b4 08A4B526\[^\n\]*\n"   { set x [expr $x+1] }
1534
            -re "^ +\[0-9\]+ 00b8 08A4D526\[^\n\]*\n"   { set x [expr $x+1] }
1535
            -re "^ +\[0-9\]+ 00bc 08A4F526\[^\n\]*\n"   { set x [expr $x+1] }
1536
            -re "^ +\[0-9\]+ 00c0 08A40D26\[^\n\]*\n"   { set x [expr $x+1] }
1537
            -re "^ +\[0-9\]+ 00c4 08A42D26\[^\n\]*\n"   { set x [expr $x+1] }
1538
            -re "^ +\[0-9\]+ 00c8 08A44D26\[^\n\]*\n"   { set x [expr $x+1] }
1539
            -re "^ +\[0-9\]+ 00cc 08A46D26\[^\n\]*\n"   { set x [expr $x+1] }
1540
            -re "^ +\[0-9\]+ 00d0 08A48D26\[^\n\]*\n"   { set x [expr $x+1] }
1541
            -re "^ +\[0-9\]+ 00d4 08A4AD26\[^\n\]*\n"   { set x [expr $x+1] }
1542
            -re "^ +\[0-9\]+ 00d8 08A4CD26\[^\n\]*\n"   { set x [expr $x+1] }
1543
            -re "^ +\[0-9\]+ 00dc 08A4ED26\[^\n\]*\n"   { set x [expr $x+1] }
1544
            -re "^ +\[0-9\]+ 00e0 08A41D26\[^\n\]*\n"   { set x [expr $x+1] }
1545
            -re "^ +\[0-9\]+ 00e4 08A43D26\[^\n\]*\n"   { set x [expr $x+1] }
1546
            -re "^ +\[0-9\]+ 00e8 08A45D26\[^\n\]*\n"   { set x [expr $x+1] }
1547
            -re "^ +\[0-9\]+ 00ec 08A47D26\[^\n\]*\n"   { set x [expr $x+1] }
1548
            -re "^ +\[0-9\]+ 00f0 08A49D26\[^\n\]*\n"   { set x [expr $x+1] }
1549
            -re "^ +\[0-9\]+ 00f4 08A4BD26\[^\n\]*\n"   { set x [expr $x+1] }
1550
            -re "^ +\[0-9\]+ 00f8 08A4DD26\[^\n\]*\n"   { set x [expr $x+1] }
1551
            -re "^ +\[0-9\]+ 00fc 08A4FD26\[^\n\]*\n"   { set x [expr $x+1] }
1552
            -re "^ +\[0-9\]+ 0100 08A404E6\[^\n\]*\n"   { set x [expr $x+1] }
1553
            -re "^ +\[0-9\]+ 0104 08A424E6\[^\n\]*\n"   { set x [expr $x+1] }
1554
            -re "^ +\[0-9\]+ 0108 08A444E6\[^\n\]*\n"   { set x [expr $x+1] }
1555
            -re "^ +\[0-9\]+ 010c 08A464E6\[^\n\]*\n"   { set x [expr $x+1] }
1556
            -re "^ +\[0-9\]+ 0110 08A484E6\[^\n\]*\n"   { set x [expr $x+1] }
1557
            -re "^ +\[0-9\]+ 0114 08A4A4E6\[^\n\]*\n"   { set x [expr $x+1] }
1558
            -re "^ +\[0-9\]+ 0118 08A4C4E6\[^\n\]*\n"   { set x [expr $x+1] }
1559
            -re "^ +\[0-9\]+ 011c 08A4E4E6\[^\n\]*\n"   { set x [expr $x+1] }
1560
            -re "^ +\[0-9\]+ 0120 08A414E6\[^\n\]*\n"   { set x [expr $x+1] }
1561
            -re "^ +\[0-9\]+ 0124 08A434E6\[^\n\]*\n"   { set x [expr $x+1] }
1562
            -re "^ +\[0-9\]+ 0128 08A454E6\[^\n\]*\n"   { set x [expr $x+1] }
1563
            -re "^ +\[0-9\]+ 012c 08A474E6\[^\n\]*\n"   { set x [expr $x+1] }
1564
            -re "^ +\[0-9\]+ 0130 08A494E6\[^\n\]*\n"   { set x [expr $x+1] }
1565
            -re "^ +\[0-9\]+ 0134 08A4B4E6\[^\n\]*\n"   { set x [expr $x+1] }
1566
            -re "^ +\[0-9\]+ 0138 08A4D4E6\[^\n\]*\n"   { set x [expr $x+1] }
1567
            -re "^ +\[0-9\]+ 013c 08A4F4E6\[^\n\]*\n"   { set x [expr $x+1] }
1568
            -re "^ +\[0-9\]+ 0140 08A40CE6\[^\n\]*\n"   { set x [expr $x+1] }
1569
            -re "^ +\[0-9\]+ 0144 08A42CE6\[^\n\]*\n"   { set x [expr $x+1] }
1570
            -re "^ +\[0-9\]+ 0148 08A44CE6\[^\n\]*\n"   { set x [expr $x+1] }
1571
            -re "^ +\[0-9\]+ 014c 08A46CE6\[^\n\]*\n"   { set x [expr $x+1] }
1572
            -re "^ +\[0-9\]+ 0150 08A48CE6\[^\n\]*\n"   { set x [expr $x+1] }
1573
            -re "^ +\[0-9\]+ 0154 08A4ACE6\[^\n\]*\n"   { set x [expr $x+1] }
1574
            -re "^ +\[0-9\]+ 0158 08A4CCE6\[^\n\]*\n"   { set x [expr $x+1] }
1575
            -re "^ +\[0-9\]+ 015c 08A4ECE6\[^\n\]*\n"   { set x [expr $x+1] }
1576
            -re "^ +\[0-9\]+ 0160 08A41CE6\[^\n\]*\n"   { set x [expr $x+1] }
1577
            -re "^ +\[0-9\]+ 0164 08A43CE6\[^\n\]*\n"   { set x [expr $x+1] }
1578
            -re "^ +\[0-9\]+ 0168 08A45CE6\[^\n\]*\n"   { set x [expr $x+1] }
1579
            -re "^ +\[0-9\]+ 016c 08A47CE6\[^\n\]*\n"   { set x [expr $x+1] }
1580
            -re "^ +\[0-9\]+ 0170 08A49CE6\[^\n\]*\n"   { set x [expr $x+1] }
1581
            -re "^ +\[0-9\]+ 0174 08A4BCE6\[^\n\]*\n"   { set x [expr $x+1] }
1582
            -re "^ +\[0-9\]+ 0178 08A4DCE6\[^\n\]*\n"   { set x [expr $x+1] }
1583
            -re "^ +\[0-9\]+ 017c 08A4FCE6\[^\n\]*\n"   { set x [expr $x+1] }
1584
            -re "\[^\n\]*\n"                            { }
1585
            timeout                             { perror "timeout\n"; break }
1586
            eof                                 { break }
1587
        }
1588
    }
1589
 
1590
    # This was intended to do any cleanup necessary.  It kinda looks like it
1591
    # isn't needed, but just in case, please keep it in for now.
1592
    gas_finish
1593
 
1594
    # Did we find what we were looking for?  If not, flunk it.
1595
    if [expr $x==96] then { pass $testname } else { fail $testname }
1596
}
1597
 
1598
proc do_ds {} {
1599
    set testname "ds.s: ds tests"
1600
    set x 0
1601
 
1602
    gas_start "ds.s" "-al"
1603
 
1604
    # Check the assembled instruction against a table built by the HP assembler
1605
    # Any differences should be checked by hand -- with the number of problems
1606
    # I've seen in the HP assembler I don't completely trust it.
1607
    #
1608
    # Instead of having a variable for each match string just increment the
1609
    # total number of matches seen.  That's simpler when testing large numbers
1610
    # of instructions (as these tests to).
1611
    while 1 {
1612
        expect {
1613
            -re "^ +\[0-9\]+ 0000 08A40446\[^\n\]*\n"   { set x [expr $x+1] }
1614
            -re "^ +\[0-9\]+ 0004 08A42446\[^\n\]*\n"   { set x [expr $x+1] }
1615
            -re "^ +\[0-9\]+ 0008 08A44446\[^\n\]*\n"   { set x [expr $x+1] }
1616
            -re "^ +\[0-9\]+ 000c 08A46446\[^\n\]*\n"   { set x [expr $x+1] }
1617
            -re "^ +\[0-9\]+ 0010 08A48446\[^\n\]*\n"   { set x [expr $x+1] }
1618
            -re "^ +\[0-9\]+ 0014 08A4A446\[^\n\]*\n"   { set x [expr $x+1] }
1619
            -re "^ +\[0-9\]+ 0018 08A4C446\[^\n\]*\n"   { set x [expr $x+1] }
1620
            -re "^ +\[0-9\]+ 001c 08A4E446\[^\n\]*\n"   { set x [expr $x+1] }
1621
            -re "^ +\[0-9\]+ 0020 08A41446\[^\n\]*\n"   { set x [expr $x+1] }
1622
            -re "^ +\[0-9\]+ 0024 08A43446\[^\n\]*\n"   { set x [expr $x+1] }
1623
            -re "^ +\[0-9\]+ 0028 08A45446\[^\n\]*\n"   { set x [expr $x+1] }
1624
            -re "^ +\[0-9\]+ 002c 08A47446\[^\n\]*\n"   { set x [expr $x+1] }
1625
            -re "^ +\[0-9\]+ 0030 08A49446\[^\n\]*\n"   { set x [expr $x+1] }
1626
            -re "^ +\[0-9\]+ 0034 08A4B446\[^\n\]*\n"   { set x [expr $x+1] }
1627
            -re "^ +\[0-9\]+ 0038 08A4D446\[^\n\]*\n"   { set x [expr $x+1] }
1628
            -re "^ +\[0-9\]+ 003c 08A4F446\[^\n\]*\n"   { set x [expr $x+1] }
1629
            -re "\[^\n\]*\n"                            { }
1630
            timeout                             { perror "timeout\n"; break }
1631
            eof                                 { break }
1632
        }
1633
    }
1634
 
1635
    # This was intended to do any cleanup necessary.  It kinda looks like it
1636
    # isn't needed, but just in case, please keep it in for now.
1637
    gas_finish
1638
 
1639
    # Did we find what we were looking for?  If not, flunk it.
1640
    if [expr $x==16] then { pass $testname } else { fail $testname }
1641
}
1642
 
1643
proc do_comclr {} {
1644
    set testname "comclr.s: comclr tests"
1645
    set x 0
1646
 
1647
    gas_start "comclr.s" "-al"
1648
 
1649
    # Check the assembled instruction against a table built by the HP assembler
1650
    # Any differences should be checked by hand -- with the number of problems
1651
    # I've seen in the HP assembler I don't completely trust it.
1652
    #
1653
    # Instead of having a variable for each match string just increment the
1654
    # total number of matches seen.  That's simpler when testing large numbers
1655
    # of instructions (as these tests to).
1656
    while 1 {
1657
        expect {
1658
            -re "^ +\[0-9\]+ 0000 08A40886\[^\n\]*\n"   { set x [expr $x+1] }
1659
            -re "^ +\[0-9\]+ 0004 08A42886\[^\n\]*\n"   { set x [expr $x+1] }
1660
            -re "^ +\[0-9\]+ 0008 08A44886\[^\n\]*\n"   { set x [expr $x+1] }
1661
            -re "^ +\[0-9\]+ 000c 08A46886\[^\n\]*\n"   { set x [expr $x+1] }
1662
            -re "^ +\[0-9\]+ 0010 08A48886\[^\n\]*\n"   { set x [expr $x+1] }
1663
            -re "^ +\[0-9\]+ 0014 08A4A886\[^\n\]*\n"   { set x [expr $x+1] }
1664
            -re "^ +\[0-9\]+ 0018 08A4C886\[^\n\]*\n"   { set x [expr $x+1] }
1665
            -re "^ +\[0-9\]+ 001c 08A4E886\[^\n\]*\n"   { set x [expr $x+1] }
1666
            -re "^ +\[0-9\]+ 0020 08A41886\[^\n\]*\n"   { set x [expr $x+1] }
1667
            -re "^ +\[0-9\]+ 0024 08A43886\[^\n\]*\n"   { set x [expr $x+1] }
1668
            -re "^ +\[0-9\]+ 0028 08A45886\[^\n\]*\n"   { set x [expr $x+1] }
1669
            -re "^ +\[0-9\]+ 002c 08A47886\[^\n\]*\n"   { set x [expr $x+1] }
1670
            -re "^ +\[0-9\]+ 0030 08A49886\[^\n\]*\n"   { set x [expr $x+1] }
1671
            -re "^ +\[0-9\]+ 0034 08A4B886\[^\n\]*\n"   { set x [expr $x+1] }
1672
            -re "^ +\[0-9\]+ 0038 08A4D886\[^\n\]*\n"   { set x [expr $x+1] }
1673
            -re "^ +\[0-9\]+ 003c 08A4F886\[^\n\]*\n"   { set x [expr $x+1] }
1674
            -re "^ +\[0-9\]+ 0040 90A600F6\[^\n\]*\n"   { set x [expr $x+1] }
1675
            -re "^ +\[0-9\]+ 0044 90A620F6\[^\n\]*\n"   { set x [expr $x+1] }
1676
            -re "^ +\[0-9\]+ 0048 90A640F6\[^\n\]*\n"   { set x [expr $x+1] }
1677
            -re "^ +\[0-9\]+ 004c 90A660F6\[^\n\]*\n"   { set x [expr $x+1] }
1678
            -re "^ +\[0-9\]+ 0050 90A680F6\[^\n\]*\n"   { set x [expr $x+1] }
1679
            -re "^ +\[0-9\]+ 0054 90A6A0F6\[^\n\]*\n"   { set x [expr $x+1] }
1680
            -re "^ +\[0-9\]+ 0058 90A6C0F6\[^\n\]*\n"   { set x [expr $x+1] }
1681
            -re "^ +\[0-9\]+ 005c 90A6E0F6\[^\n\]*\n"   { set x [expr $x+1] }
1682
            -re "^ +\[0-9\]+ 0060 90A610F6\[^\n\]*\n"   { set x [expr $x+1] }
1683
            -re "^ +\[0-9\]+ 0064 90A630F6\[^\n\]*\n"   { set x [expr $x+1] }
1684
            -re "^ +\[0-9\]+ 0068 90A650F6\[^\n\]*\n"   { set x [expr $x+1] }
1685
            -re "^ +\[0-9\]+ 006c 90A670F6\[^\n\]*\n"   { set x [expr $x+1] }
1686
            -re "^ +\[0-9\]+ 0070 90A690F6\[^\n\]*\n"   { set x [expr $x+1] }
1687
            -re "^ +\[0-9\]+ 0074 90A6B0F6\[^\n\]*\n"   { set x [expr $x+1] }
1688
            -re "^ +\[0-9\]+ 0078 90A6D0F6\[^\n\]*\n"   { set x [expr $x+1] }
1689
            -re "^ +\[0-9\]+ 007c 90A6F0F6\[^\n\]*\n"   { set x [expr $x+1] }
1690
            -re "\[^\n\]*\n"                            { }
1691
            timeout                             { perror "timeout\n"; break }
1692
            eof                                 { break }
1693
        }
1694
    }
1695
 
1696
    # This was intended to do any cleanup necessary.  It kinda looks like it
1697
    # isn't needed, but just in case, please keep it in for now.
1698
    gas_finish
1699
 
1700
    # Did we find what we were looking for?  If not, flunk it.
1701
    if [expr $x==32] then { pass $testname } else { fail $testname }
1702
}
1703
 
1704
proc do_logical {} {
1705
    set testname "logical.s: logical tests"
1706
    set x 0
1707
 
1708
    gas_start "logical.s" "-al"
1709
 
1710
    # Check the assembled instruction against a table built by the HP assembler
1711
    # Any differences should be checked by hand -- with the number of problems
1712
    # I've seen in the HP assembler I don't completely trust it.
1713
    #
1714
    # Instead of having a variable for each match string just increment the
1715
    # total number of matches seen.  That's simpler when testing large numbers
1716
    # of instructions (as these tests to).
1717
    while 1 {
1718
        expect {
1719
            -re "^ +\[0-9\]+ 0000 08A40246\[^\n\]*\n"   { set x [expr $x+1] }
1720
            -re "^ +\[0-9\]+ 0004 08A42246\[^\n\]*\n"   { set x [expr $x+1] }
1721
            -re "^ +\[0-9\]+ 0008 08A44246\[^\n\]*\n"   { set x [expr $x+1] }
1722
            -re "^ +\[0-9\]+ 000c 08A46246\[^\n\]*\n"   { set x [expr $x+1] }
1723
            -re "^ +\[0-9\]+ 0010 08A4E246\[^\n\]*\n"   { set x [expr $x+1] }
1724
            -re "^ +\[0-9\]+ 0014 08A41246\[^\n\]*\n"   { set x [expr $x+1] }
1725
            -re "^ +\[0-9\]+ 0018 08A43246\[^\n\]*\n"   { set x [expr $x+1] }
1726
            -re "^ +\[0-9\]+ 001c 08A45246\[^\n\]*\n"   { set x [expr $x+1] }
1727
            -re "^ +\[0-9\]+ 0020 08A47246\[^\n\]*\n"   { set x [expr $x+1] }
1728
            -re "^ +\[0-9\]+ 0024 08A4F246\[^\n\]*\n"   { set x [expr $x+1] }
1729
            -re "^ +\[0-9\]+ 0028 08A40286\[^\n\]*\n"   { set x [expr $x+1] }
1730
            -re "^ +\[0-9\]+ 002c 08A42286\[^\n\]*\n"   { set x [expr $x+1] }
1731
            -re "^ +\[0-9\]+ 0030 08A44286\[^\n\]*\n"   { set x [expr $x+1] }
1732
            -re "^ +\[0-9\]+ 0034 08A46286\[^\n\]*\n"   { set x [expr $x+1] }
1733
            -re "^ +\[0-9\]+ 0038 08A4E286\[^\n\]*\n"   { set x [expr $x+1] }
1734
            -re "^ +\[0-9\]+ 003c 08A41286\[^\n\]*\n"   { set x [expr $x+1] }
1735
            -re "^ +\[0-9\]+ 0040 08A43286\[^\n\]*\n"   { set x [expr $x+1] }
1736
            -re "^ +\[0-9\]+ 0044 08A45286\[^\n\]*\n"   { set x [expr $x+1] }
1737
            -re "^ +\[0-9\]+ 0048 08A47286\[^\n\]*\n"   { set x [expr $x+1] }
1738
            -re "^ +\[0-9\]+ 004c 08A4F286\[^\n\]*\n"   { set x [expr $x+1] }
1739
            -re "^ +\[0-9\]+ 0050 08A40206\[^\n\]*\n"   { set x [expr $x+1] }
1740
            -re "^ +\[0-9\]+ 0054 08A42206\[^\n\]*\n"   { set x [expr $x+1] }
1741
            -re "^ +\[0-9\]+ 0058 08A44206\[^\n\]*\n"   { set x [expr $x+1] }
1742
            -re "^ +\[0-9\]+ 005c 08A46206\[^\n\]*\n"   { set x [expr $x+1] }
1743
            -re "^ +\[0-9\]+ 0060 08A4E206\[^\n\]*\n"   { set x [expr $x+1] }
1744
            -re "^ +\[0-9\]+ 0064 08A41206\[^\n\]*\n"   { set x [expr $x+1] }
1745
            -re "^ +\[0-9\]+ 0068 08A43206\[^\n\]*\n"   { set x [expr $x+1] }
1746
            -re "^ +\[0-9\]+ 006c 08A45206\[^\n\]*\n"   { set x [expr $x+1] }
1747
            -re "^ +\[0-9\]+ 0070 08A47206\[^\n\]*\n"   { set x [expr $x+1] }
1748
            -re "^ +\[0-9\]+ 0074 08A4F206\[^\n\]*\n"   { set x [expr $x+1] }
1749
            -re "^ +\[0-9\]+ 0078 08A40006\[^\n\]*\n"   { set x [expr $x+1] }
1750
            -re "^ +\[0-9\]+ 007c 08A42006\[^\n\]*\n"   { set x [expr $x+1] }
1751
            -re "^ +\[0-9\]+ 0080 08A44006\[^\n\]*\n"   { set x [expr $x+1] }
1752
            -re "^ +\[0-9\]+ 0084 08A46006\[^\n\]*\n"   { set x [expr $x+1] }
1753
            -re "^ +\[0-9\]+ 0088 08A4E006\[^\n\]*\n"   { set x [expr $x+1] }
1754
            -re "^ +\[0-9\]+ 008c 08A41006\[^\n\]*\n"   { set x [expr $x+1] }
1755
            -re "^ +\[0-9\]+ 0090 08A43006\[^\n\]*\n"   { set x [expr $x+1] }
1756
            -re "^ +\[0-9\]+ 0094 08A45006\[^\n\]*\n"   { set x [expr $x+1] }
1757
            -re "^ +\[0-9\]+ 0098 08A47006\[^\n\]*\n"   { set x [expr $x+1] }
1758
            -re "^ +\[0-9\]+ 009c 08A4F006\[^\n\]*\n"   { set x [expr $x+1] }
1759
            -re "\[^\n\]*\n"                            { }
1760
            timeout                             { perror "timeout\n"; break }
1761
            eof                                 { break }
1762
        }
1763
    }
1764
 
1765
    # This was intended to do any cleanup necessary.  It kinda looks like it
1766
    # isn't needed, but just in case, please keep it in for now.
1767
    gas_finish
1768
 
1769
    # Did we find what we were looking for?  If not, flunk it.
1770
    if [expr $x==40] then { pass $testname } else { fail $testname }
1771
}
1772
 
1773
proc do_unit {} {
1774
    set testname "unit.s: unit tests"
1775
    set x 0
1776
 
1777
    gas_start "unit.s" "-al"
1778
 
1779
    # Check the assembled instruction against a table built by the HP assembler
1780
    # Any differences should be checked by hand -- with the number of problems
1781
    # I've seen in the HP assembler I don't completely trust it.
1782
    #
1783
    # Instead of having a variable for each match string just increment the
1784
    # total number of matches seen.  That's simpler when testing large numbers
1785
    # of instructions (as these tests to).
1786
    while 1 {
1787
        expect {
1788
            -re "^ +\[0-9\]+ 0000 08A40386\[^\n]*\n"    { set x [expr $x+1] }
1789
            -re "^ +\[0-9\]+ 0004 08A44386\[^\n]*\n"    { set x [expr $x+1] }
1790
            -re "^ +\[0-9\]+ 0008 08A46386\[^\n]*\n"    { set x [expr $x+1] }
1791
            -re "^ +\[0-9\]+ 000c 08A48386\[^\n]*\n"    { set x [expr $x+1] }
1792
            -re "^ +\[0-9\]+ 0010 08A4C386\[^\n]*\n"    { set x [expr $x+1] }
1793
            -re "^ +\[0-9\]+ 0014 08A4E386\[^\n]*\n"    { set x [expr $x+1] }
1794
            -re "^ +\[0-9\]+ 0018 08A41386\[^\n]*\n"    { set x [expr $x+1] }
1795
            -re "^ +\[0-9\]+ 001c 08A45386\[^\n]*\n"    { set x [expr $x+1] }
1796
            -re "^ +\[0-9\]+ 0020 08A47386\[^\n]*\n"    { set x [expr $x+1] }
1797
            -re "^ +\[0-9\]+ 0024 08A49386\[^\n]*\n"    { set x [expr $x+1] }
1798
            -re "^ +\[0-9\]+ 0028 08A4D386\[^\n]*\n"    { set x [expr $x+1] }
1799
            -re "^ +\[0-9\]+ 002c 08A4F386\[^\n]*\n"    { set x [expr $x+1] }
1800
            -re "^ +\[0-9\]+ 0030 08A40986\[^\n]*\n"    { set x [expr $x+1] }
1801
            -re "^ +\[0-9\]+ 0034 08A44986\[^\n]*\n"    { set x [expr $x+1] }
1802
            -re "^ +\[0-9\]+ 0038 08A46986\[^\n]*\n"    { set x [expr $x+1] }
1803
            -re "^ +\[0-9\]+ 003c 08A48986\[^\n]*\n"    { set x [expr $x+1] }
1804
            -re "^ +\[0-9\]+ 0040 08A4C986\[^\n]*\n"    { set x [expr $x+1] }
1805
            -re "^ +\[0-9\]+ 0044 08A4E986\[^\n]*\n"    { set x [expr $x+1] }
1806
            -re "^ +\[0-9\]+ 0048 08A41986\[^\n]*\n"    { set x [expr $x+1] }
1807
            -re "^ +\[0-9\]+ 004c 08A45986\[^\n]*\n"    { set x [expr $x+1] }
1808
            -re "^ +\[0-9\]+ 0050 08A47986\[^\n]*\n"    { set x [expr $x+1] }
1809
            -re "^ +\[0-9\]+ 0054 08A49986\[^\n]*\n"    { set x [expr $x+1] }
1810
            -re "^ +\[0-9\]+ 0058 08A4D986\[^\n]*\n"    { set x [expr $x+1] }
1811
            -re "^ +\[0-9\]+ 005c 08A4F986\[^\n]*\n"    { set x [expr $x+1] }
1812
            -re "^ +\[0-9\]+ 0060 08A409C6\[^\n]*\n"    { set x [expr $x+1] }
1813
            -re "^ +\[0-9\]+ 0064 08A449C6\[^\n]*\n"    { set x [expr $x+1] }
1814
            -re "^ +\[0-9\]+ 0068 08A469C6\[^\n]*\n"    { set x [expr $x+1] }
1815
            -re "^ +\[0-9\]+ 006c 08A489C6\[^\n]*\n"    { set x [expr $x+1] }
1816
            -re "^ +\[0-9\]+ 0070 08A4C9C6\[^\n]*\n"    { set x [expr $x+1] }
1817
            -re "^ +\[0-9\]+ 0074 08A4E9C6\[^\n]*\n"    { set x [expr $x+1] }
1818
            -re "^ +\[0-9\]+ 0078 08A419C6\[^\n]*\n"    { set x [expr $x+1] }
1819
            -re "^ +\[0-9\]+ 007c 08A459C6\[^\n]*\n"    { set x [expr $x+1] }
1820
            -re "^ +\[0-9\]+ 0080 08A479C6\[^\n]*\n"    { set x [expr $x+1] }
1821
            -re "^ +\[0-9\]+ 0084 08A499C6\[^\n]*\n"    { set x [expr $x+1] }
1822
            -re "^ +\[0-9\]+ 0088 08A4D9C6\[^\n]*\n"    { set x [expr $x+1] }
1823
            -re "^ +\[0-9\]+ 008c 08A4F9C6\[^\n]*\n"    { set x [expr $x+1] }
1824
            -re "^ +\[0-9\]+ 0090 08A409C6\[^\n]*\n"    { set x [expr $x+1] }
1825
            -re "^ +\[0-9\]+ 0094 08A449C6\[^\n]*\n"    { set x [expr $x+1] }
1826
            -re "^ +\[0-9\]+ 0098 08A469C6\[^\n]*\n"    { set x [expr $x+1] }
1827
            -re "^ +\[0-9\]+ 009c 08A489C6\[^\n]*\n"    { set x [expr $x+1] }
1828
            -re "^ +\[0-9\]+ 00a0 08A4C9C6\[^\n]*\n"    { set x [expr $x+1] }
1829
            -re "^ +\[0-9\]+ 00a4 08A4E9C6\[^\n]*\n"    { set x [expr $x+1] }
1830
            -re "^ +\[0-9\]+ 00a8 08A419C6\[^\n]*\n"    { set x [expr $x+1] }
1831
            -re "^ +\[0-9\]+ 00ac 08A459C6\[^\n]*\n"    { set x [expr $x+1] }
1832
            -re "^ +\[0-9\]+ 00b0 08A479C6\[^\n]*\n"    { set x [expr $x+1] }
1833
            -re "^ +\[0-9\]+ 00b4 08A499C6\[^\n]*\n"    { set x [expr $x+1] }
1834
            -re "^ +\[0-9\]+ 00b8 08A4D9C6\[^\n]*\n"    { set x [expr $x+1] }
1835
            -re "^ +\[0-9\]+ 00bc 08A4F9C6\[^\n]*\n"    { set x [expr $x+1] }
1836
            -re "\[^\n\]*\n"                            { }
1837
            timeout                             { perror "timeout\n"; break }
1838
            eof                                 { break }
1839
        }
1840
    }
1841
 
1842
    # This was intended to do any cleanup necessary.  It kinda looks like it
1843
    # isn't needed, but just in case, please keep it in for now.
1844
    gas_finish
1845
 
1846
    # Did we find what we were looking for?  If not, flunk it.
1847
    if [expr $x==48] then { pass $testname } else { fail $testname }
1848
}
1849
 
1850
proc do_unit2 {} {
1851
    set testname "unit2.s: unit2 tests"
1852
    set x 0
1853
 
1854
    gas_start "unit2.s" "-al"
1855
 
1856
    # Check the assembled instruction against a table built by the HP assembler
1857
    # Any differences should be checked by hand -- with the number of problems
1858
    # I've seen in the HP assembler I don't completely trust it.
1859
    #
1860
    # Instead of having a variable for each match string just increment the
1861
    # total number of matches seen.  That's simpler when testing large numbers
1862
    # of instructions (as these tests to).
1863
    while 1 {
1864
        expect {
1865
            -re "^ +\[0-9\]+ 0000 08A403A6\[^\n]*\n"    { set x [expr $x+1] }
1866
            -re "^ +\[0-9\]+ 0004 08A443A6\[^\n]*\n"    { set x [expr $x+1] }
1867
            -re "^ +\[0-9\]+ 0008 08A463A6\[^\n]*\n"    { set x [expr $x+1] }
1868
            -re "^ +\[0-9\]+ 000c 08A483A6\[^\n]*\n"    { set x [expr $x+1] }
1869
            -re "^ +\[0-9\]+ 0010 08A4C3A6\[^\n]*\n"    { set x [expr $x+1] }
1870
            -re "^ +\[0-9\]+ 0014 08A4E3A6\[^\n]*\n"    { set x [expr $x+1] }
1871
            -re "^ +\[0-9\]+ 0018 08A413A6\[^\n]*\n"    { set x [expr $x+1] }
1872
            -re "^ +\[0-9\]+ 001c 08A453A6\[^\n]*\n"    { set x [expr $x+1] }
1873
            -re "^ +\[0-9\]+ 0020 08A473A6\[^\n]*\n"    { set x [expr $x+1] }
1874
            -re "^ +\[0-9\]+ 0024 08A493A6\[^\n]*\n"    { set x [expr $x+1] }
1875
            -re "^ +\[0-9\]+ 0028 08A4D3A6\[^\n]*\n"    { set x [expr $x+1] }
1876
            -re "^ +\[0-9\]+ 002c 08A4F3A6\[^\n]*\n"    { set x [expr $x+1] }
1877
            -re "^ +\[0-9\]+ 0030 08A409A6\[^\n]*\n"    { set x [expr $x+1] }
1878
            -re "^ +\[0-9\]+ 0034 08A449A6\[^\n]*\n"    { set x [expr $x+1] }
1879
            -re "^ +\[0-9\]+ 0038 08A469A6\[^\n]*\n"    { set x [expr $x+1] }
1880
            -re "^ +\[0-9\]+ 003c 08A489A6\[^\n]*\n"    { set x [expr $x+1] }
1881
            -re "^ +\[0-9\]+ 0040 08A4C9A6\[^\n]*\n"    { set x [expr $x+1] }
1882
            -re "^ +\[0-9\]+ 0044 08A4E9A6\[^\n]*\n"    { set x [expr $x+1] }
1883
            -re "^ +\[0-9\]+ 0048 08A419A6\[^\n]*\n"    { set x [expr $x+1] }
1884
            -re "^ +\[0-9\]+ 004c 08A459A6\[^\n]*\n"    { set x [expr $x+1] }
1885
            -re "^ +\[0-9\]+ 0050 08A479A6\[^\n]*\n"    { set x [expr $x+1] }
1886
            -re "^ +\[0-9\]+ 0054 08A499A6\[^\n]*\n"    { set x [expr $x+1] }
1887
            -re "^ +\[0-9\]+ 0058 08A4D9A6\[^\n]*\n"    { set x [expr $x+1] }
1888
            -re "^ +\[0-9\]+ 005c 08A4F9A6\[^\n]*\n"    { set x [expr $x+1] }
1889
            -re "^ +\[0-9\]+ 0060 08A409E6\[^\n]*\n"    { set x [expr $x+1] }
1890
            -re "^ +\[0-9\]+ 0064 08A449E6\[^\n]*\n"    { set x [expr $x+1] }
1891
            -re "^ +\[0-9\]+ 0068 08A469E6\[^\n]*\n"    { set x [expr $x+1] }
1892
            -re "^ +\[0-9\]+ 006c 08A489E6\[^\n]*\n"    { set x [expr $x+1] }
1893
            -re "^ +\[0-9\]+ 0070 08A4C9E6\[^\n]*\n"    { set x [expr $x+1] }
1894
            -re "^ +\[0-9\]+ 0074 08A4E9E6\[^\n]*\n"    { set x [expr $x+1] }
1895
            -re "^ +\[0-9\]+ 0078 08A419E6\[^\n]*\n"    { set x [expr $x+1] }
1896
            -re "^ +\[0-9\]+ 007c 08A459E6\[^\n]*\n"    { set x [expr $x+1] }
1897
            -re "^ +\[0-9\]+ 0080 08A479E6\[^\n]*\n"    { set x [expr $x+1] }
1898
            -re "^ +\[0-9\]+ 0084 08A499E6\[^\n]*\n"    { set x [expr $x+1] }
1899
            -re "^ +\[0-9\]+ 0088 08A4D9E6\[^\n]*\n"    { set x [expr $x+1] }
1900
            -re "^ +\[0-9\]+ 008c 08A4F9E6\[^\n]*\n"    { set x [expr $x+1] }
1901
            -re "\[^\n\]*\n"                            { }
1902
            timeout                             { perror "timeout\n"; break }
1903
            eof                                 { break }
1904
        }
1905
    }
1906
 
1907
    # This was intended to do any cleanup necessary.  It kinda looks like it
1908
    # isn't needed, but just in case, please keep it in for now.
1909
    gas_finish
1910
 
1911
    # Did we find what we were looking for?  If not, flunk it.
1912
    if [expr $x==36] then { pass $testname } else { fail $testname }
1913
}
1914
 
1915
proc do_dcor {} {
1916
    set testname "dcor.s: dcor tests"
1917
    set x 0
1918
 
1919
    gas_start "dcor.s" "-al"
1920
 
1921
    # Check the assembled instruction against a table built by the HP assembler
1922
    # Any differences should be checked by hand -- with the number of problems
1923
    # I've seen in the HP assembler I don't completely trust it.
1924
    #
1925
    # Instead of having a variable for each match string just increment the
1926
    # total number of matches seen.  That's simpler when testing large numbers
1927
    # of instructions (as these tests to).
1928
    while 1 {
1929
        expect {
1930
            -re "^ +\[0-9\]+ 0000 08800B85\[^\n]*\n"    { set x [expr $x+1] }
1931
            -re "^ +\[0-9\]+ 0004 08804B85\[^\n]*\n"    { set x [expr $x+1] }
1932
            -re "^ +\[0-9\]+ 0008 08806B85\[^\n]*\n"    { set x [expr $x+1] }
1933
            -re "^ +\[0-9\]+ 000c 08808B85\[^\n]*\n"    { set x [expr $x+1] }
1934
            -re "^ +\[0-9\]+ 0010 0880CB85\[^\n]*\n"    { set x [expr $x+1] }
1935
            -re "^ +\[0-9\]+ 0014 0880EB85\[^\n]*\n"    { set x [expr $x+1] }
1936
            -re "^ +\[0-9\]+ 0018 08801B85\[^\n]*\n"    { set x [expr $x+1] }
1937
            -re "^ +\[0-9\]+ 001c 08805B85\[^\n]*\n"    { set x [expr $x+1] }
1938
            -re "^ +\[0-9\]+ 0020 08807B85\[^\n]*\n"    { set x [expr $x+1] }
1939
            -re "^ +\[0-9\]+ 0024 08809B85\[^\n]*\n"    { set x [expr $x+1] }
1940
            -re "^ +\[0-9\]+ 0028 0880DB85\[^\n]*\n"    { set x [expr $x+1] }
1941
            -re "^ +\[0-9\]+ 002c 0880FB85\[^\n]*\n"    { set x [expr $x+1] }
1942
            -re "^ +\[0-9\]+ 0030 08800BC5\[^\n]*\n"    { set x [expr $x+1] }
1943
            -re "^ +\[0-9\]+ 0034 08804BC5\[^\n]*\n"    { set x [expr $x+1] }
1944
            -re "^ +\[0-9\]+ 0038 08806BC5\[^\n]*\n"    { set x [expr $x+1] }
1945
            -re "^ +\[0-9\]+ 003c 08808BC5\[^\n]*\n"    { set x [expr $x+1] }
1946
            -re "^ +\[0-9\]+ 0040 0880CBC5\[^\n]*\n"    { set x [expr $x+1] }
1947
            -re "^ +\[0-9\]+ 0044 0880EBC5\[^\n]*\n"    { set x [expr $x+1] }
1948
            -re "^ +\[0-9\]+ 0048 08801BC5\[^\n]*\n"    { set x [expr $x+1] }
1949
            -re "^ +\[0-9\]+ 004c 08805BC5\[^\n]*\n"    { set x [expr $x+1] }
1950
            -re "^ +\[0-9\]+ 0050 08807BC5\[^\n]*\n"    { set x [expr $x+1] }
1951
            -re "^ +\[0-9\]+ 0054 08809BC5\[^\n]*\n"    { set x [expr $x+1] }
1952
            -re "^ +\[0-9\]+ 0058 0880DBC5\[^\n]*\n"    { set x [expr $x+1] }
1953
            -re "^ +\[0-9\]+ 005c 0880FBC5\[^\n]*\n"    { set x [expr $x+1] }
1954
            -re "^ +\[0-9\]+ 0060 08800BC5\[^\n]*\n"    { set x [expr $x+1] }
1955
            -re "^ +\[0-9\]+ 0064 08804BC5\[^\n]*\n"    { set x [expr $x+1] }
1956
            -re "^ +\[0-9\]+ 0068 08806BC5\[^\n]*\n"    { set x [expr $x+1] }
1957
            -re "^ +\[0-9\]+ 006c 08808BC5\[^\n]*\n"    { set x [expr $x+1] }
1958
            -re "^ +\[0-9\]+ 0070 0880CBC5\[^\n]*\n"    { set x [expr $x+1] }
1959
            -re "^ +\[0-9\]+ 0074 0880EBC5\[^\n]*\n"    { set x [expr $x+1] }
1960
            -re "^ +\[0-9\]+ 0078 08801BC5\[^\n]*\n"    { set x [expr $x+1] }
1961
            -re "^ +\[0-9\]+ 007c 08805BC5\[^\n]*\n"    { set x [expr $x+1] }
1962
            -re "^ +\[0-9\]+ 0080 08807BC5\[^\n]*\n"    { set x [expr $x+1] }
1963
            -re "^ +\[0-9\]+ 0084 08809BC5\[^\n]*\n"    { set x [expr $x+1] }
1964
            -re "^ +\[0-9\]+ 0088 0880DBC5\[^\n]*\n"    { set x [expr $x+1] }
1965
            -re "^ +\[0-9\]+ 008c 0880FBC5\[^\n]*\n"    { set x [expr $x+1] }
1966
            -re "\[^\n\]*\n"                            { }
1967
            timeout                             { perror "timeout\n"; break }
1968
            eof                                 { break }
1969
        }
1970
    }
1971
 
1972
    # This was intended to do any cleanup necessary.  It kinda looks like it
1973
    # isn't needed, but just in case, please keep it in for now.
1974
    gas_finish
1975
 
1976
    # Did we find what we were looking for?  If not, flunk it.
1977
    if [expr $x==36] then { pass $testname } else { fail $testname }
1978
}
1979
 
1980
proc do_dcor2 {} {
1981
    set testname "dcor2.s: dcor2 tests"
1982
    set x 0
1983
 
1984
    gas_start "dcor2.s" "-al"
1985
 
1986
    # Check the assembled instruction against a table built by the HP assembler
1987
    # Any differences should be checked by hand -- with the number of problems
1988
    # I've seen in the HP assembler I don't completely trust it.
1989
    #
1990
    # Instead of having a variable for each match string just increment the
1991
    # total number of matches seen.  That's simpler when testing large numbers
1992
    # of instructions (as these tests to).
1993
    while 1 {
1994
        expect {
1995
            -re "^ +\[0-9\]+ 0000 08800BA5\[^\n]*\n"    { set x [expr $x+1] }
1996
            -re "^ +\[0-9\]+ 0004 08804BA5\[^\n]*\n"    { set x [expr $x+1] }
1997
            -re "^ +\[0-9\]+ 0008 08806BA5\[^\n]*\n"    { set x [expr $x+1] }
1998
            -re "^ +\[0-9\]+ 000c 08808BA5\[^\n]*\n"    { set x [expr $x+1] }
1999
            -re "^ +\[0-9\]+ 0010 0880CBA5\[^\n]*\n"    { set x [expr $x+1] }
2000
            -re "^ +\[0-9\]+ 0014 0880EBA5\[^\n]*\n"    { set x [expr $x+1] }
2001
            -re "^ +\[0-9\]+ 0018 08801BA5\[^\n]*\n"    { set x [expr $x+1] }
2002
            -re "^ +\[0-9\]+ 001c 08805BA5\[^\n]*\n"    { set x [expr $x+1] }
2003
            -re "^ +\[0-9\]+ 0020 08807BA5\[^\n]*\n"    { set x [expr $x+1] }
2004
            -re "^ +\[0-9\]+ 0024 08809BA5\[^\n]*\n"    { set x [expr $x+1] }
2005
            -re "^ +\[0-9\]+ 0028 0880DBA5\[^\n]*\n"    { set x [expr $x+1] }
2006
            -re "^ +\[0-9\]+ 002c 0880FBA5\[^\n]*\n"    { set x [expr $x+1] }
2007
            -re "^ +\[0-9\]+ 0030 08800BE5\[^\n]*\n"    { set x [expr $x+1] }
2008
            -re "^ +\[0-9\]+ 0034 08804BE5\[^\n]*\n"    { set x [expr $x+1] }
2009
            -re "^ +\[0-9\]+ 0038 08806BE5\[^\n]*\n"    { set x [expr $x+1] }
2010
            -re "^ +\[0-9\]+ 003c 08808BE5\[^\n]*\n"    { set x [expr $x+1] }
2011
            -re "^ +\[0-9\]+ 0040 0880CBE5\[^\n]*\n"    { set x [expr $x+1] }
2012
            -re "^ +\[0-9\]+ 0044 0880EBE5\[^\n]*\n"    { set x [expr $x+1] }
2013
            -re "^ +\[0-9\]+ 0048 08801BE5\[^\n]*\n"    { set x [expr $x+1] }
2014
            -re "^ +\[0-9\]+ 004c 08805BE5\[^\n]*\n"    { set x [expr $x+1] }
2015
            -re "^ +\[0-9\]+ 0050 08807BE5\[^\n]*\n"    { set x [expr $x+1] }
2016
            -re "^ +\[0-9\]+ 0054 08809BE5\[^\n]*\n"    { set x [expr $x+1] }
2017
            -re "^ +\[0-9\]+ 0058 0880DBE5\[^\n]*\n"    { set x [expr $x+1] }
2018
            -re "^ +\[0-9\]+ 005c 0880FBE5\[^\n]*\n"    { set x [expr $x+1] }
2019
            -re "\[^\n\]*\n"                            { }
2020
            timeout                             { perror "timeout\n"; break }
2021
            eof                                 { break }
2022
        }
2023
    }
2024
 
2025
    # This was intended to do any cleanup necessary.  It kinda looks like it
2026
    # isn't needed, but just in case, please keep it in for now.
2027
    gas_finish
2028
 
2029
    # Did we find what we were looking for?  If not, flunk it.
2030
    if [expr $x==24] then { pass $testname } else { fail $testname }
2031
}
2032
 
2033
proc do_addi {} {
2034
    set testname "addi.s: addi tests"
2035
    set x 0
2036
 
2037
    gas_start "addi.s" "-al"
2038
 
2039
    # Check the assembled instruction against a table built by the HP assembler
2040
    # Any differences should be checked by hand -- with the number of problems
2041
    # I've seen in the HP assembler I don't completely trust it.
2042
    #
2043
    # Instead of having a variable for each match string just increment the
2044
    # total number of matches seen.  That's simpler when testing large numbers
2045
    # of instructions (as these tests to).
2046
    while 1 {
2047
        expect {
2048
            -re "^ +\[0-9\]+ 0000 B4A600F6\[^\n\]*\n"   { set x [expr $x+1] }
2049
            -re "^ +\[0-9\]+ 0004 B4A620F6\[^\n\]*\n"   { set x [expr $x+1] }
2050
            -re "^ +\[0-9\]+ 0008 B4A640F6\[^\n\]*\n"   { set x [expr $x+1] }
2051
            -re "^ +\[0-9\]+ 000c B4A660F6\[^\n\]*\n"   { set x [expr $x+1] }
2052
            -re "^ +\[0-9\]+ 0010 B4A680F6\[^\n\]*\n"   { set x [expr $x+1] }
2053
            -re "^ +\[0-9\]+ 0014 B4A6A0F6\[^\n\]*\n"   { set x [expr $x+1] }
2054
            -re "^ +\[0-9\]+ 0018 B4A6C0F6\[^\n\]*\n"   { set x [expr $x+1] }
2055
            -re "^ +\[0-9\]+ 001c B4A6E0F6\[^\n\]*\n"   { set x [expr $x+1] }
2056
            -re "^ +\[0-9\]+ 0020 B4A610F6\[^\n\]*\n"   { set x [expr $x+1] }
2057
            -re "^ +\[0-9\]+ 0024 B4A630F6\[^\n\]*\n"   { set x [expr $x+1] }
2058
            -re "^ +\[0-9\]+ 0028 B4A650F6\[^\n\]*\n"   { set x [expr $x+1] }
2059
            -re "^ +\[0-9\]+ 002c B4A670F6\[^\n\]*\n"   { set x [expr $x+1] }
2060
            -re "^ +\[0-9\]+ 0030 B4A690F6\[^\n\]*\n"   { set x [expr $x+1] }
2061
            -re "^ +\[0-9\]+ 0034 B4A6B0F6\[^\n\]*\n"   { set x [expr $x+1] }
2062
            -re "^ +\[0-9\]+ 0038 B4A6D0F6\[^\n\]*\n"   { set x [expr $x+1] }
2063
            -re "^ +\[0-9\]+ 003c B4A6F0F6\[^\n\]*\n"   { set x [expr $x+1] }
2064
            -re "^ +\[0-9\]+ 0040 B4A608F6\[^\n\]*\n"   { set x [expr $x+1] }
2065
            -re "^ +\[0-9\]+ 0044 B4A628F6\[^\n\]*\n"   { set x [expr $x+1] }
2066
            -re "^ +\[0-9\]+ 0048 B4A648F6\[^\n\]*\n"   { set x [expr $x+1] }
2067
            -re "^ +\[0-9\]+ 004c B4A668F6\[^\n\]*\n"   { set x [expr $x+1] }
2068
            -re "^ +\[0-9\]+ 0050 B4A688F6\[^\n\]*\n"   { set x [expr $x+1] }
2069
            -re "^ +\[0-9\]+ 0054 B4A6A8F6\[^\n\]*\n"   { set x [expr $x+1] }
2070
            -re "^ +\[0-9\]+ 0058 B4A6C8F6\[^\n\]*\n"   { set x [expr $x+1] }
2071
            -re "^ +\[0-9\]+ 005c B4A6E8F6\[^\n\]*\n"   { set x [expr $x+1] }
2072
            -re "^ +\[0-9\]+ 0060 B4A618F6\[^\n\]*\n"   { set x [expr $x+1] }
2073
            -re "^ +\[0-9\]+ 0064 B4A638F6\[^\n\]*\n"   { set x [expr $x+1] }
2074
            -re "^ +\[0-9\]+ 0068 B4A658F6\[^\n\]*\n"   { set x [expr $x+1] }
2075
            -re "^ +\[0-9\]+ 006c B4A678F6\[^\n\]*\n"   { set x [expr $x+1] }
2076
            -re "^ +\[0-9\]+ 0070 B4A698F6\[^\n\]*\n"   { set x [expr $x+1] }
2077
            -re "^ +\[0-9\]+ 0074 B4A6B8F6\[^\n\]*\n"   { set x [expr $x+1] }
2078
            -re "^ +\[0-9\]+ 0078 B4A6D8F6\[^\n\]*\n"   { set x [expr $x+1] }
2079
            -re "^ +\[0-9\]+ 007c B4A6F8F6\[^\n\]*\n"   { set x [expr $x+1] }
2080
            -re "^ +\[0-9\]+ 0080 B0A600F6\[^\n\]*\n"   { set x [expr $x+1] }
2081
            -re "^ +\[0-9\]+ 0084 B0A620F6\[^\n\]*\n"   { set x [expr $x+1] }
2082
            -re "^ +\[0-9\]+ 0088 B0A640F6\[^\n\]*\n"   { set x [expr $x+1] }
2083
            -re "^ +\[0-9\]+ 008c B0A660F6\[^\n\]*\n"   { set x [expr $x+1] }
2084
            -re "^ +\[0-9\]+ 0090 B0A680F6\[^\n\]*\n"   { set x [expr $x+1] }
2085
            -re "^ +\[0-9\]+ 0094 B0A6A0F6\[^\n\]*\n"   { set x [expr $x+1] }
2086
            -re "^ +\[0-9\]+ 0098 B0A6C0F6\[^\n\]*\n"   { set x [expr $x+1] }
2087
            -re "^ +\[0-9\]+ 009c B0A6E0F6\[^\n\]*\n"   { set x [expr $x+1] }
2088
            -re "^ +\[0-9\]+ 00a0 B0A610F6\[^\n\]*\n"   { set x [expr $x+1] }
2089
            -re "^ +\[0-9\]+ 00a4 B0A630F6\[^\n\]*\n"   { set x [expr $x+1] }
2090
            -re "^ +\[0-9\]+ 00a8 B0A650F6\[^\n\]*\n"   { set x [expr $x+1] }
2091
            -re "^ +\[0-9\]+ 00ac B0A670F6\[^\n\]*\n"   { set x [expr $x+1] }
2092
            -re "^ +\[0-9\]+ 00b0 B0A690F6\[^\n\]*\n"   { set x [expr $x+1] }
2093
            -re "^ +\[0-9\]+ 00b4 B0A6B0F6\[^\n\]*\n"   { set x [expr $x+1] }
2094
            -re "^ +\[0-9\]+ 00b8 B0A6D0F6\[^\n\]*\n"   { set x [expr $x+1] }
2095
            -re "^ +\[0-9\]+ 00bc B0A6F0F6\[^\n\]*\n"   { set x [expr $x+1] }
2096
            -re "^ +\[0-9\]+ 00c0 B0A608F6\[^\n\]*\n"   { set x [expr $x+1] }
2097
            -re "^ +\[0-9\]+ 00c4 B0A628F6\[^\n\]*\n"   { set x [expr $x+1] }
2098
            -re "^ +\[0-9\]+ 00c8 B0A648F6\[^\n\]*\n"   { set x [expr $x+1] }
2099
            -re "^ +\[0-9\]+ 00cc B0A668F6\[^\n\]*\n"   { set x [expr $x+1] }
2100
            -re "^ +\[0-9\]+ 00d0 B0A688F6\[^\n\]*\n"   { set x [expr $x+1] }
2101
            -re "^ +\[0-9\]+ 00d4 B0A6A8F6\[^\n\]*\n"   { set x [expr $x+1] }
2102
            -re "^ +\[0-9\]+ 00d8 B0A6C8F6\[^\n\]*\n"   { set x [expr $x+1] }
2103
            -re "^ +\[0-9\]+ 00dc B0A6E8F6\[^\n\]*\n"   { set x [expr $x+1] }
2104
            -re "^ +\[0-9\]+ 00e0 B0A618F6\[^\n\]*\n"   { set x [expr $x+1] }
2105
            -re "^ +\[0-9\]+ 00e4 B0A638F6\[^\n\]*\n"   { set x [expr $x+1] }
2106
            -re "^ +\[0-9\]+ 00e8 B0A658F6\[^\n\]*\n"   { set x [expr $x+1] }
2107
            -re "^ +\[0-9\]+ 00ec B0A678F6\[^\n\]*\n"   { set x [expr $x+1] }
2108
            -re "^ +\[0-9\]+ 00f0 B0A698F6\[^\n\]*\n"   { set x [expr $x+1] }
2109
            -re "^ +\[0-9\]+ 00f4 B0A6B8F6\[^\n\]*\n"   { set x [expr $x+1] }
2110
            -re "^ +\[0-9\]+ 00f8 B0A6D8F6\[^\n\]*\n"   { set x [expr $x+1] }
2111
            -re "^ +\[0-9\]+ 00fc B0A6F8F6\[^\n\]*\n"   { set x [expr $x+1] }
2112
            -re "^ +\[0-9\]+ 0100 B4A608F6\[^\n\]*\n"   { set x [expr $x+1] }
2113
            -re "^ +\[0-9\]+ 0104 B4A628F6\[^\n\]*\n"   { set x [expr $x+1] }
2114
            -re "^ +\[0-9\]+ 0108 B4A648F6\[^\n\]*\n"   { set x [expr $x+1] }
2115
            -re "^ +\[0-9\]+ 010c B4A668F6\[^\n\]*\n"   { set x [expr $x+1] }
2116
            -re "^ +\[0-9\]+ 0110 B4A688F6\[^\n\]*\n"   { set x [expr $x+1] }
2117
            -re "^ +\[0-9\]+ 0114 B4A6A8F6\[^\n\]*\n"   { set x [expr $x+1] }
2118
            -re "^ +\[0-9\]+ 0118 B4A6C8F6\[^\n\]*\n"   { set x [expr $x+1] }
2119
            -re "^ +\[0-9\]+ 011c B4A6E8F6\[^\n\]*\n"   { set x [expr $x+1] }
2120
            -re "^ +\[0-9\]+ 0120 B4A618F6\[^\n\]*\n"   { set x [expr $x+1] }
2121
            -re "^ +\[0-9\]+ 0124 B4A638F6\[^\n\]*\n"   { set x [expr $x+1] }
2122
            -re "^ +\[0-9\]+ 0128 B4A658F6\[^\n\]*\n"   { set x [expr $x+1] }
2123
            -re "^ +\[0-9\]+ 012c B4A678F6\[^\n\]*\n"   { set x [expr $x+1] }
2124
            -re "^ +\[0-9\]+ 0130 B4A698F6\[^\n\]*\n"   { set x [expr $x+1] }
2125
            -re "^ +\[0-9\]+ 0134 B4A6B8F6\[^\n\]*\n"   { set x [expr $x+1] }
2126
            -re "^ +\[0-9\]+ 0138 B4A6D8F6\[^\n\]*\n"   { set x [expr $x+1] }
2127
            -re "^ +\[0-9\]+ 013c B4A6F8F6\[^\n\]*\n"   { set x [expr $x+1] }
2128
            -re "^ +\[0-9\]+ 0140 B0A600F6\[^\n\]*\n"   { set x [expr $x+1] }
2129
            -re "^ +\[0-9\]+ 0144 B0A620F6\[^\n\]*\n"   { set x [expr $x+1] }
2130
            -re "^ +\[0-9\]+ 0148 B0A640F6\[^\n\]*\n"   { set x [expr $x+1] }
2131
            -re "^ +\[0-9\]+ 014c B0A660F6\[^\n\]*\n"   { set x [expr $x+1] }
2132
            -re "^ +\[0-9\]+ 0150 B0A680F6\[^\n\]*\n"   { set x [expr $x+1] }
2133
            -re "^ +\[0-9\]+ 0154 B0A6A0F6\[^\n\]*\n"   { set x [expr $x+1] }
2134
            -re "^ +\[0-9\]+ 0158 B0A6C0F6\[^\n\]*\n"   { set x [expr $x+1] }
2135
            -re "^ +\[0-9\]+ 015c B0A6E0F6\[^\n\]*\n"   { set x [expr $x+1] }
2136
            -re "^ +\[0-9\]+ 0160 B0A610F6\[^\n\]*\n"   { set x [expr $x+1] }
2137
            -re "^ +\[0-9\]+ 0164 B0A630F6\[^\n\]*\n"   { set x [expr $x+1] }
2138
            -re "^ +\[0-9\]+ 0168 B0A650F6\[^\n\]*\n"   { set x [expr $x+1] }
2139
            -re "^ +\[0-9\]+ 016c B0A670F6\[^\n\]*\n"   { set x [expr $x+1] }
2140
            -re "^ +\[0-9\]+ 0170 B0A690F6\[^\n\]*\n"   { set x [expr $x+1] }
2141
            -re "^ +\[0-9\]+ 0174 B0A6B0F6\[^\n\]*\n"   { set x [expr $x+1] }
2142
            -re "^ +\[0-9\]+ 0178 B0A6D0F6\[^\n\]*\n"   { set x [expr $x+1] }
2143
            -re "^ +\[0-9\]+ 017c B0A6F0F6\[^\n\]*\n"   { set x [expr $x+1] }
2144
            -re "^ +\[0-9\]+ 0180 B0A608F6\[^\n\]*\n"   { set x [expr $x+1] }
2145
            -re "^ +\[0-9\]+ 0184 B0A628F6\[^\n\]*\n"   { set x [expr $x+1] }
2146
            -re "^ +\[0-9\]+ 0188 B0A648F6\[^\n\]*\n"   { set x [expr $x+1] }
2147
            -re "^ +\[0-9\]+ 018c B0A668F6\[^\n\]*\n"   { set x [expr $x+1] }
2148
            -re "^ +\[0-9\]+ 0190 B0A688F6\[^\n\]*\n"   { set x [expr $x+1] }
2149
            -re "^ +\[0-9\]+ 0194 B0A6A8F6\[^\n\]*\n"   { set x [expr $x+1] }
2150
            -re "^ +\[0-9\]+ 0198 B0A6C8F6\[^\n\]*\n"   { set x [expr $x+1] }
2151
            -re "^ +\[0-9\]+ 019c B0A6E8F6\[^\n\]*\n"   { set x [expr $x+1] }
2152
            -re "^ +\[0-9\]+ 01a0 B0A618F6\[^\n\]*\n"   { set x [expr $x+1] }
2153
            -re "^ +\[0-9\]+ 01a4 B0A638F6\[^\n\]*\n"   { set x [expr $x+1] }
2154
            -re "^ +\[0-9\]+ 01a8 B0A658F6\[^\n\]*\n"   { set x [expr $x+1] }
2155
            -re "^ +\[0-9\]+ 01ac B0A678F6\[^\n\]*\n"   { set x [expr $x+1] }
2156
            -re "^ +\[0-9\]+ 01b0 B0A698F6\[^\n\]*\n"   { set x [expr $x+1] }
2157
            -re "^ +\[0-9\]+ 01b4 B0A6B8F6\[^\n\]*\n"   { set x [expr $x+1] }
2158
            -re "^ +\[0-9\]+ 01b8 B0A6D8F6\[^\n\]*\n"   { set x [expr $x+1] }
2159
            -re "^ +\[0-9\]+ 01bc B0A6F8F6\[^\n\]*\n"   { set x [expr $x+1] }
2160
            -re "\[^\n\]*\n"                            { }
2161
            timeout                             { perror "timeout\n"; break }
2162
            eof                                 { break }
2163
        }
2164
    }
2165
 
2166
    # This was intended to do any cleanup necessary.  It kinda looks like it
2167
    # isn't needed, but just in case, please keep it in for now.
2168
    gas_finish
2169
 
2170
    # Did we find what we were looking for?  If not, flunk it.
2171
    if [expr $x==112] then { pass $testname } else { fail $testname }
2172
}
2173
 
2174
proc do_subi {} {
2175
    set testname "subi.s: subi tests"
2176
    set x 0
2177
 
2178
    gas_start "subi.s" "-al"
2179
 
2180
    # Check the assembled instruction against a table built by the HP assembler
2181
    # Any differences should be checked by hand -- with the number of problems
2182
    # I've seen in the HP assembler I don't completely trust it.
2183
    #
2184
    # Instead of having a variable for each match string just increment the
2185
    # total number of matches seen.  That's simpler when testing large numbers
2186
    # of instructions (as these tests to).
2187
    while 1 {
2188
        expect {
2189
            -re "^ +\[0-9\]+ 0000 94A600F6\[^\n\]*\n"   { set x [expr $x+1] }
2190
            -re "^ +\[0-9\]+ 0004 94A620F6\[^\n\]*\n"   { set x [expr $x+1] }
2191
            -re "^ +\[0-9\]+ 0008 94A640F6\[^\n\]*\n"   { set x [expr $x+1] }
2192
            -re "^ +\[0-9\]+ 000c 94A660F6\[^\n\]*\n"   { set x [expr $x+1] }
2193
            -re "^ +\[0-9\]+ 0010 94A680F6\[^\n\]*\n"   { set x [expr $x+1] }
2194
            -re "^ +\[0-9\]+ 0014 94A6A0F6\[^\n\]*\n"   { set x [expr $x+1] }
2195
            -re "^ +\[0-9\]+ 0018 94A6C0F6\[^\n\]*\n"   { set x [expr $x+1] }
2196
            -re "^ +\[0-9\]+ 001c 94A6E0F6\[^\n\]*\n"   { set x [expr $x+1] }
2197
            -re "^ +\[0-9\]+ 0020 94A610F6\[^\n\]*\n"   { set x [expr $x+1] }
2198
            -re "^ +\[0-9\]+ 0024 94A630F6\[^\n\]*\n"   { set x [expr $x+1] }
2199
            -re "^ +\[0-9\]+ 0028 94A650F6\[^\n\]*\n"   { set x [expr $x+1] }
2200
            -re "^ +\[0-9\]+ 002c 94A670F6\[^\n\]*\n"   { set x [expr $x+1] }
2201
            -re "^ +\[0-9\]+ 0030 94A690F6\[^\n\]*\n"   { set x [expr $x+1] }
2202
            -re "^ +\[0-9\]+ 0034 94A6B0F6\[^\n\]*\n"   { set x [expr $x+1] }
2203
            -re "^ +\[0-9\]+ 0038 94A6D0F6\[^\n\]*\n"   { set x [expr $x+1] }
2204
            -re "^ +\[0-9\]+ 003c 94A6F0F6\[^\n\]*\n"   { set x [expr $x+1] }
2205
            -re "^ +\[0-9\]+ 0040 94A608F6\[^\n\]*\n"   { set x [expr $x+1] }
2206
            -re "^ +\[0-9\]+ 0044 94A628F6\[^\n\]*\n"   { set x [expr $x+1] }
2207
            -re "^ +\[0-9\]+ 0048 94A648F6\[^\n\]*\n"   { set x [expr $x+1] }
2208
            -re "^ +\[0-9\]+ 004c 94A668F6\[^\n\]*\n"   { set x [expr $x+1] }
2209
            -re "^ +\[0-9\]+ 0050 94A688F6\[^\n\]*\n"   { set x [expr $x+1] }
2210
            -re "^ +\[0-9\]+ 0054 94A6A8F6\[^\n\]*\n"   { set x [expr $x+1] }
2211
            -re "^ +\[0-9\]+ 0058 94A6C8F6\[^\n\]*\n"   { set x [expr $x+1] }
2212
            -re "^ +\[0-9\]+ 005c 94A6E8F6\[^\n\]*\n"   { set x [expr $x+1] }
2213
            -re "^ +\[0-9\]+ 0060 94A618F6\[^\n\]*\n"   { set x [expr $x+1] }
2214
            -re "^ +\[0-9\]+ 0064 94A638F6\[^\n\]*\n"   { set x [expr $x+1] }
2215
            -re "^ +\[0-9\]+ 0068 94A658F6\[^\n\]*\n"   { set x [expr $x+1] }
2216
            -re "^ +\[0-9\]+ 006c 94A678F6\[^\n\]*\n"   { set x [expr $x+1] }
2217
            -re "^ +\[0-9\]+ 0070 94A698F6\[^\n\]*\n"   { set x [expr $x+1] }
2218
            -re "^ +\[0-9\]+ 0074 94A6B8F6\[^\n\]*\n"   { set x [expr $x+1] }
2219
            -re "^ +\[0-9\]+ 0078 94A6D8F6\[^\n\]*\n"   { set x [expr $x+1] }
2220
            -re "^ +\[0-9\]+ 007c 94A6F8F6\[^\n\]*\n"   { set x [expr $x+1] }
2221
            -re "^ +\[0-9\]+ 0080 94A608F6\[^\n\]*\n"   { set x [expr $x+1] }
2222
            -re "^ +\[0-9\]+ 0084 94A628F6\[^\n\]*\n"   { set x [expr $x+1] }
2223
            -re "^ +\[0-9\]+ 0088 94A648F6\[^\n\]*\n"   { set x [expr $x+1] }
2224
            -re "^ +\[0-9\]+ 008c 94A668F6\[^\n\]*\n"   { set x [expr $x+1] }
2225
            -re "^ +\[0-9\]+ 0090 94A688F6\[^\n\]*\n"   { set x [expr $x+1] }
2226
            -re "^ +\[0-9\]+ 0094 94A6A8F6\[^\n\]*\n"   { set x [expr $x+1] }
2227
            -re "^ +\[0-9\]+ 0098 94A6C8F6\[^\n\]*\n"   { set x [expr $x+1] }
2228
            -re "^ +\[0-9\]+ 009c 94A6E8F6\[^\n\]*\n"   { set x [expr $x+1] }
2229
            -re "^ +\[0-9\]+ 00a0 94A618F6\[^\n\]*\n"   { set x [expr $x+1] }
2230
            -re "^ +\[0-9\]+ 00a4 94A638F6\[^\n\]*\n"   { set x [expr $x+1] }
2231
            -re "^ +\[0-9\]+ 00a8 94A658F6\[^\n\]*\n"   { set x [expr $x+1] }
2232
            -re "^ +\[0-9\]+ 00ac 94A678F6\[^\n\]*\n"   { set x [expr $x+1] }
2233
            -re "^ +\[0-9\]+ 00b0 94A698F6\[^\n\]*\n"   { set x [expr $x+1] }
2234
            -re "^ +\[0-9\]+ 00b4 94A6B8F6\[^\n\]*\n"   { set x [expr $x+1] }
2235
            -re "^ +\[0-9\]+ 00b8 94A6D8F6\[^\n\]*\n"   { set x [expr $x+1] }
2236
            -re "^ +\[0-9\]+ 00bc 94A6F8F6\[^\n\]*\n"   { set x [expr $x+1] }
2237
            -re "\[^\n\]*\n"                            { }
2238
            timeout                             { perror "timeout\n"; break }
2239
            eof                                 { break }
2240
        }
2241
    }
2242
 
2243
    # This was intended to do any cleanup necessary.  It kinda looks like it
2244
    # isn't needed, but just in case, please keep it in for now.
2245
    gas_finish
2246
 
2247
    # Did we find what we were looking for?  If not, flunk it.
2248
    if [expr $x==48] then { pass $testname } else { fail $testname }
2249
}
2250
 
2251
proc do_shift {} {
2252
    set testname "shift.s: shift tests"
2253
    set x 0
2254
 
2255
    gas_start "shift.s" "-al"
2256
 
2257
    # Check the assembled instruction against a table built by the HP assembler
2258
    # Any differences should be checked by hand -- with the number of problems
2259
    # I've seen in the HP assembler I don't completely trust it.
2260
    #
2261
    # Instead of having a variable for each match string just increment the
2262
    # total number of matches seen.  That's simpler when testing large numbers
2263
    # of instructions (as these tests to).
2264
    while 1 {
2265
        expect {
2266
            -re "^ +\[0-9\]+ 0000 D0A40006\[^\n]*\n"    { set x [expr $x+1] }
2267
            -re "^ +\[0-9\]+ 0004 D0A42006\[^\n]*\n"    { set x [expr $x+1] }
2268
            -re "^ +\[0-9\]+ 0008 D0A44006\[^\n]*\n"    { set x [expr $x+1] }
2269
            -re "^ +\[0-9\]+ 000c D0A46006\[^\n]*\n"    { set x [expr $x+1] }
2270
            -re "^ +\[0-9\]+ 0010 D0A48006\[^\n]*\n"    { set x [expr $x+1] }
2271
            -re "^ +\[0-9\]+ 0014 D0A4A006\[^\n]*\n"    { set x [expr $x+1] }
2272
            -re "^ +\[0-9\]+ 0018 D0A4C006\[^\n]*\n"    { set x [expr $x+1] }
2273
            -re "^ +\[0-9\]+ 001c D0A4E006\[^\n]*\n"    { set x [expr $x+1] }
2274
            -re "^ +\[0-9\]+ 0020 D0A40B46\[^\n]*\n"    { set x [expr $x+1] }
2275
            -re "^ +\[0-9\]+ 0024 D0A42B46\[^\n]*\n"    { set x [expr $x+1] }
2276
            -re "^ +\[0-9\]+ 0028 D0A44B46\[^\n]*\n"    { set x [expr $x+1] }
2277
            -re "^ +\[0-9\]+ 002c D0A46B46\[^\n]*\n"    { set x [expr $x+1] }
2278
            -re "^ +\[0-9\]+ 0030 D0A48B46\[^\n]*\n"    { set x [expr $x+1] }
2279
            -re "^ +\[0-9\]+ 0034 D0A4AB46\[^\n]*\n"    { set x [expr $x+1] }
2280
            -re "^ +\[0-9\]+ 0038 D0A4CB46\[^\n]*\n"    { set x [expr $x+1] }
2281
            -re "^ +\[0-9\]+ 003c D0A4EB46\[^\n]*\n"    { set x [expr $x+1] }
2282
            -re "\[^\n\]*\n"                            { }
2283
            timeout                             { perror "timeout\n"; break }
2284
            eof                                 { break }
2285
        }
2286
    }
2287
 
2288
    # This was intended to do any cleanup necessary.  It kinda looks like it
2289
    # isn't needed, but just in case, please keep it in for now.
2290
    gas_finish
2291
 
2292
    # Did we find what we were looking for?  If not, flunk it.
2293
    if [expr $x==16] then { pass $testname } else { fail $testname }
2294
}
2295
 
2296
proc do_shift2 {} {
2297
    set testname "shift2.s: shift tests"
2298
    set x 0
2299
 
2300
    gas_start "shift2.s" "-al"
2301
 
2302
    # Check the assembled instruction against a table built by the HP assembler
2303
    # Any differences should be checked by hand -- with the number of problems
2304
    # I've seen in the HP assembler I don't completely trust it.
2305
    #
2306
    # Instead of having a variable for each match string just increment the
2307
    # total number of matches seen.  That's simpler when testing large numbers
2308
    # of instructions (as these tests to).
2309
    while 1 {
2310
        expect {
2311
            -re "^ +\[0-9\]+ 0000 D0A40006\[^\n]*\n"    { set x [expr $x+1] }
2312
            -re "^ +\[0-9\]+ 0004 D0A42006\[^\n]*\n"    { set x [expr $x+1] }
2313
            -re "^ +\[0-9\]+ 0008 D0A44006\[^\n]*\n"    { set x [expr $x+1] }
2314
            -re "^ +\[0-9\]+ 000c D0A46006\[^\n]*\n"    { set x [expr $x+1] }
2315
            -re "^ +\[0-9\]+ 0010 D0A48006\[^\n]*\n"    { set x [expr $x+1] }
2316
            -re "^ +\[0-9\]+ 0014 D0A4A006\[^\n]*\n"    { set x [expr $x+1] }
2317
            -re "^ +\[0-9\]+ 0018 D0A4C006\[^\n]*\n"    { set x [expr $x+1] }
2318
            -re "^ +\[0-9\]+ 001c D0A4E006\[^\n]*\n"    { set x [expr $x+1] }
2319
            -re "^ +\[0-9\]+ 0020 D0A40B46\[^\n]*\n"    { set x [expr $x+1] }
2320
            -re "^ +\[0-9\]+ 0024 D0A42B46\[^\n]*\n"    { set x [expr $x+1] }
2321
            -re "^ +\[0-9\]+ 0028 D0A44B46\[^\n]*\n"    { set x [expr $x+1] }
2322
            -re "^ +\[0-9\]+ 002c D0A46B46\[^\n]*\n"    { set x [expr $x+1] }
2323
            -re "^ +\[0-9\]+ 0030 D0A48B46\[^\n]*\n"    { set x [expr $x+1] }
2324
            -re "^ +\[0-9\]+ 0034 D0A4AB46\[^\n]*\n"    { set x [expr $x+1] }
2325
            -re "^ +\[0-9\]+ 0038 D0A4CB46\[^\n]*\n"    { set x [expr $x+1] }
2326
            -re "^ +\[0-9\]+ 003c D0A4EB46\[^\n]*\n"    { set x [expr $x+1] }
2327
            -re "\[^\n\]*\n"                            { }
2328
            timeout                             { perror "timeout\n"; break }
2329
            eof                                 { break }
2330
        }
2331
    }
2332
 
2333
    # This was intended to do any cleanup necessary.  It kinda looks like it
2334
    # isn't needed, but just in case, please keep it in for now.
2335
    gas_finish
2336
 
2337
    # Did we find what we were looking for?  If not, flunk it.
2338
    if [expr $x==16] then { pass $testname } else { fail $testname }
2339
}
2340
 
2341
proc do_shift3 {} {
2342
    set testname "shift3.s: shift3 tests"
2343
    set x 0
2344
 
2345
    gas_start "shift3.s" "-al"
2346
 
2347
    # Check the assembled instruction against a table built by the HP assembler
2348
    # Any differences should be checked by hand -- with the number of problems
2349
    # I've seen in the HP assembler I don't completely trust it.
2350
    #
2351
    # Instead of having a variable for each match string just increment the
2352
    # total number of matches seen.  That's simpler when testing large numbers
2353
    # of instructions (as these tests to).
2354
    while 1 {
2355
        expect {
2356
            -re "^ +\[0-9\]+ 0000 D0A40206\[^\n]*\n"    { set x [expr $x+1] }
2357
            -re "^ +\[0-9\]+ 0004 D0A42206\[^\n]*\n"    { set x [expr $x+1] }
2358
            -re "^ +\[0-9\]+ 0008 D0A44206\[^\n]*\n"    { set x [expr $x+1] }
2359
            -re "^ +\[0-9\]+ 000c D0A46206\[^\n]*\n"    { set x [expr $x+1] }
2360
            -re "^ +\[0-9\]+ 0010 D0A48206\[^\n]*\n"    { set x [expr $x+1] }
2361
            -re "^ +\[0-9\]+ 0014 D0A4A206\[^\n]*\n"    { set x [expr $x+1] }
2362
            -re "^ +\[0-9\]+ 0018 D0A4C206\[^\n]*\n"    { set x [expr $x+1] }
2363
            -re "^ +\[0-9\]+ 001c D0A4E206\[^\n]*\n"    { set x [expr $x+1] }
2364
            -re "^ +\[0-9\]+ 0020 D0A40F46\[^\n]*\n"    { set x [expr $x+1] }
2365
            -re "^ +\[0-9\]+ 0024 D0A42F46\[^\n]*\n"    { set x [expr $x+1] }
2366
            -re "^ +\[0-9\]+ 0028 D0A44F46\[^\n]*\n"    { set x [expr $x+1] }
2367
            -re "^ +\[0-9\]+ 002c D0A46F46\[^\n]*\n"    { set x [expr $x+1] }
2368
            -re "^ +\[0-9\]+ 0030 D0A48F46\[^\n]*\n"    { set x [expr $x+1] }
2369
            -re "^ +\[0-9\]+ 0034 D0A4AF46\[^\n]*\n"    { set x [expr $x+1] }
2370
            -re "^ +\[0-9\]+ 0038 D0A4CF46\[^\n]*\n"    { set x [expr $x+1] }
2371
            -re "^ +\[0-9\]+ 003c D0A4EF46\[^\n]*\n"    { set x [expr $x+1] }
2372
            -re "\[^\n\]*\n"                            { }
2373
            timeout                             { perror "timeout\n"; break }
2374
            eof                                 { break }
2375
        }
2376
    }
2377
 
2378
    # This was intended to do any cleanup necessary.  It kinda looks like it
2379
    # isn't needed, but just in case, please keep it in for now.
2380
    gas_finish
2381
 
2382
    # Did we find what we were looking for?  If not, flunk it.
2383
    if [expr $x==16] then { pass $testname } else { fail $testname }
2384
}
2385
 
2386
proc do_extract {} {
2387
    set testname "extract.s: extract tests"
2388
    set x 0
2389
 
2390
    gas_start "extract.s" "-al"
2391
 
2392
    # Check the assembled instruction against a table built by the HP assembler
2393
    # Any differences should be checked by hand -- with the number of problems
2394
    # I've seen in the HP assembler I don't completely trust it.
2395
    #
2396
    # Instead of having a variable for each match string just increment the
2397
    # total number of matches seen.  That's simpler when testing large numbers
2398
    # of instructions (as these tests to).
2399
    while 1 {
2400
        expect {
2401
            -re "^ +\[0-9\]+ 0000 D08618B6\[^\n]*\n"    { set x [expr $x+1] }
2402
            -re "^ +\[0-9\]+ 0004 D08638B6\[^\n]*\n"    { set x [expr $x+1] }
2403
            -re "^ +\[0-9\]+ 0008 D08658B6\[^\n]*\n"    { set x [expr $x+1] }
2404
            -re "^ +\[0-9\]+ 000c D08678B6\[^\n]*\n"    { set x [expr $x+1] }
2405
            -re "^ +\[0-9\]+ 0010 D08698B6\[^\n]*\n"    { set x [expr $x+1] }
2406
            -re "^ +\[0-9\]+ 0014 D086B8B6\[^\n]*\n"    { set x [expr $x+1] }
2407
            -re "^ +\[0-9\]+ 0018 D086D8B6\[^\n]*\n"    { set x [expr $x+1] }
2408
            -re "^ +\[0-9\]+ 001c D086F8B6\[^\n]*\n"    { set x [expr $x+1] }
2409
            -re "^ +\[0-9\]+ 0020 D0861CB6\[^\n]*\n"    { set x [expr $x+1] }
2410
            -re "^ +\[0-9\]+ 0024 D0863CB6\[^\n]*\n"    { set x [expr $x+1] }
2411
            -re "^ +\[0-9\]+ 0028 D0865CB6\[^\n]*\n"    { set x [expr $x+1] }
2412
            -re "^ +\[0-9\]+ 002c D0867CB6\[^\n]*\n"    { set x [expr $x+1] }
2413
            -re "^ +\[0-9\]+ 0030 D0869CB6\[^\n]*\n"    { set x [expr $x+1] }
2414
            -re "^ +\[0-9\]+ 0034 D086BCB6\[^\n]*\n"    { set x [expr $x+1] }
2415
            -re "^ +\[0-9\]+ 0038 D086DCB6\[^\n]*\n"    { set x [expr $x+1] }
2416
            -re "^ +\[0-9\]+ 003c D086FCB6\[^\n]*\n"    { set x [expr $x+1] }
2417
            -re "^ +\[0-9\]+ 0040 D086101B\[^\n]*\n"    { set x [expr $x+1] }
2418
            -re "^ +\[0-9\]+ 0044 D086301B\[^\n]*\n"    { set x [expr $x+1] }
2419
            -re "^ +\[0-9\]+ 0048 D086501B\[^\n]*\n"    { set x [expr $x+1] }
2420
            -re "^ +\[0-9\]+ 004c D086701B\[^\n]*\n"    { set x [expr $x+1] }
2421
            -re "^ +\[0-9\]+ 0050 D086901B\[^\n]*\n"    { set x [expr $x+1] }
2422
            -re "^ +\[0-9\]+ 0054 D086B01B\[^\n]*\n"    { set x [expr $x+1] }
2423
            -re "^ +\[0-9\]+ 0058 D086D01B\[^\n]*\n"    { set x [expr $x+1] }
2424
            -re "^ +\[0-9\]+ 005c D086F01B\[^\n]*\n"    { set x [expr $x+1] }
2425
            -re "^ +\[0-9\]+ 0060 D086141B\[^\n]*\n"    { set x [expr $x+1] }
2426
            -re "^ +\[0-9\]+ 0064 D086341B\[^\n]*\n"    { set x [expr $x+1] }
2427
            -re "^ +\[0-9\]+ 0068 D086541B\[^\n]*\n"    { set x [expr $x+1] }
2428
            -re "^ +\[0-9\]+ 006c D086741B\[^\n]*\n"    { set x [expr $x+1] }
2429
            -re "^ +\[0-9\]+ 0070 D086941B\[^\n]*\n"    { set x [expr $x+1] }
2430
            -re "^ +\[0-9\]+ 0074 D086B41B\[^\n]*\n"    { set x [expr $x+1] }
2431
            -re "^ +\[0-9\]+ 0078 D086D41B\[^\n]*\n"    { set x [expr $x+1] }
2432
            -re "^ +\[0-9\]+ 007c D086F41B\[^\n]*\n"    { set x [expr $x+1] }
2433
            -re "\[^\n\]*\n"                            { }
2434
            timeout                             { perror "timeout\n"; break }
2435
            eof                                 { break }
2436
        }
2437
    }
2438
 
2439
    # This was intended to do any cleanup necessary.  It kinda looks like it
2440
    # isn't needed, but just in case, please keep it in for now.
2441
    gas_finish
2442
 
2443
    # Did we find what we were looking for?  If not, flunk it.
2444
    if [expr $x==32] then { pass $testname } else { fail $testname }
2445
}
2446
 
2447
proc do_extract2 {} {
2448
    set testname "extract2.s: extract2 tests"
2449
    set x 0
2450
 
2451
    gas_start "extract2.s" "-al"
2452
 
2453
    # Check the assembled instruction against a table built by the HP assembler
2454
    # Any differences should be checked by hand -- with the number of problems
2455
    # I've seen in the HP assembler I don't completely trust it.
2456
    #
2457
    # Instead of having a variable for each match string just increment the
2458
    # total number of matches seen.  That's simpler when testing large numbers
2459
    # of instructions (as these tests to).
2460
    while 1 {
2461
        expect {
2462
            -re "^ +\[0-9\]+ 0000 D08618B6\[^\n]*\n"    { set x [expr $x+1] }
2463
            -re "^ +\[0-9\]+ 0004 D08638B6\[^\n]*\n"    { set x [expr $x+1] }
2464
            -re "^ +\[0-9\]+ 0008 D08658B6\[^\n]*\n"    { set x [expr $x+1] }
2465
            -re "^ +\[0-9\]+ 000c D08678B6\[^\n]*\n"    { set x [expr $x+1] }
2466
            -re "^ +\[0-9\]+ 0010 D08698B6\[^\n]*\n"    { set x [expr $x+1] }
2467
            -re "^ +\[0-9\]+ 0014 D086B8B6\[^\n]*\n"    { set x [expr $x+1] }
2468
            -re "^ +\[0-9\]+ 0018 D086D8B6\[^\n]*\n"    { set x [expr $x+1] }
2469
            -re "^ +\[0-9\]+ 001c D086F8B6\[^\n]*\n"    { set x [expr $x+1] }
2470
            -re "^ +\[0-9\]+ 0020 D0861CB6\[^\n]*\n"    { set x [expr $x+1] }
2471
            -re "^ +\[0-9\]+ 0024 D0863CB6\[^\n]*\n"    { set x [expr $x+1] }
2472
            -re "^ +\[0-9\]+ 0028 D0865CB6\[^\n]*\n"    { set x [expr $x+1] }
2473
            -re "^ +\[0-9\]+ 002c D0867CB6\[^\n]*\n"    { set x [expr $x+1] }
2474
            -re "^ +\[0-9\]+ 0030 D0869CB6\[^\n]*\n"    { set x [expr $x+1] }
2475
            -re "^ +\[0-9\]+ 0034 D086BCB6\[^\n]*\n"    { set x [expr $x+1] }
2476
            -re "^ +\[0-9\]+ 0038 D086DCB6\[^\n]*\n"    { set x [expr $x+1] }
2477
            -re "^ +\[0-9\]+ 003c D086FCB6\[^\n]*\n"    { set x [expr $x+1] }
2478
            -re "^ +\[0-9\]+ 0040 D086101B\[^\n]*\n"    { set x [expr $x+1] }
2479
            -re "^ +\[0-9\]+ 0044 D086301B\[^\n]*\n"    { set x [expr $x+1] }
2480
            -re "^ +\[0-9\]+ 0048 D086501B\[^\n]*\n"    { set x [expr $x+1] }
2481
            -re "^ +\[0-9\]+ 004c D086701B\[^\n]*\n"    { set x [expr $x+1] }
2482
            -re "^ +\[0-9\]+ 0050 D086901B\[^\n]*\n"    { set x [expr $x+1] }
2483
            -re "^ +\[0-9\]+ 0054 D086B01B\[^\n]*\n"    { set x [expr $x+1] }
2484
            -re "^ +\[0-9\]+ 0058 D086D01B\[^\n]*\n"    { set x [expr $x+1] }
2485
            -re "^ +\[0-9\]+ 005c D086F01B\[^\n]*\n"    { set x [expr $x+1] }
2486
            -re "^ +\[0-9\]+ 0060 D086141B\[^\n]*\n"    { set x [expr $x+1] }
2487
            -re "^ +\[0-9\]+ 0064 D086341B\[^\n]*\n"    { set x [expr $x+1] }
2488
            -re "^ +\[0-9\]+ 0068 D086541B\[^\n]*\n"    { set x [expr $x+1] }
2489
            -re "^ +\[0-9\]+ 006c D086741B\[^\n]*\n"    { set x [expr $x+1] }
2490
            -re "^ +\[0-9\]+ 0070 D086941B\[^\n]*\n"    { set x [expr $x+1] }
2491
            -re "^ +\[0-9\]+ 0074 D086B41B\[^\n]*\n"    { set x [expr $x+1] }
2492
            -re "^ +\[0-9\]+ 0078 D086D41B\[^\n]*\n"    { set x [expr $x+1] }
2493
            -re "^ +\[0-9\]+ 007c D086F41B\[^\n]*\n"    { set x [expr $x+1] }
2494
            -re "\[^\n\]*\n"                            { }
2495
            timeout                             { perror "timeout\n"; break }
2496
            eof                                 { break }
2497
        }
2498
    }
2499
 
2500
    # This was intended to do any cleanup necessary.  It kinda looks like it
2501
    # isn't needed, but just in case, please keep it in for now.
2502
    gas_finish
2503
 
2504
    # Did we find what we were looking for?  If not, flunk it.
2505
    if [expr $x==32] then { pass $testname } else { fail $testname }
2506
}
2507
 
2508
proc do_extract3 {} {
2509
    set testname "extract3.s: extract3 tests"
2510
    set x 0
2511
 
2512
    gas_start "extract3.s" "-al"
2513
 
2514
    # Check the assembled instruction against a table built by the HP assembler
2515
    # Any differences should be checked by hand -- with the number of problems
2516
    # I've seen in the HP assembler I don't completely trust it.
2517
    #
2518
    # Instead of having a variable for each match string just increment the
2519
    # total number of matches seen.  That's simpler when testing large numbers
2520
    # of instructions (as these tests to).
2521
    while 1 {
2522
        expect {
2523
            -re "^ +\[0-9\]+ 0000 D886015B\[^\n]*\n"    { set x [expr $x+1] }
2524
            -re "^ +\[0-9\]+ 0004 D886215B\[^\n]*\n"    { set x [expr $x+1] }
2525
            -re "^ +\[0-9\]+ 0008 D886415B\[^\n]*\n"    { set x [expr $x+1] }
2526
            -re "^ +\[0-9\]+ 000c D886615B\[^\n]*\n"    { set x [expr $x+1] }
2527
            -re "^ +\[0-9\]+ 0010 D886815B\[^\n]*\n"    { set x [expr $x+1] }
2528
            -re "^ +\[0-9\]+ 0014 D886A15B\[^\n]*\n"    { set x [expr $x+1] }
2529
            -re "^ +\[0-9\]+ 0018 D886C15B\[^\n]*\n"    { set x [expr $x+1] }
2530
            -re "^ +\[0-9\]+ 001c D886E15B\[^\n]*\n"    { set x [expr $x+1] }
2531
            -re "^ +\[0-9\]+ 0020 D886055B\[^\n]*\n"    { set x [expr $x+1] }
2532
            -re "^ +\[0-9\]+ 0024 D886255B\[^\n]*\n"    { set x [expr $x+1] }
2533
            -re "^ +\[0-9\]+ 0028 D886455B\[^\n]*\n"    { set x [expr $x+1] }
2534
            -re "^ +\[0-9\]+ 002c D886655B\[^\n]*\n"    { set x [expr $x+1] }
2535
            -re "^ +\[0-9\]+ 0030 D886855B\[^\n]*\n"    { set x [expr $x+1] }
2536
            -re "^ +\[0-9\]+ 0034 D886A55B\[^\n]*\n"    { set x [expr $x+1] }
2537
            -re "^ +\[0-9\]+ 0038 D886C55B\[^\n]*\n"    { set x [expr $x+1] }
2538
            -re "^ +\[0-9\]+ 003c D886E55B\[^\n]*\n"    { set x [expr $x+1] }
2539
            -re "^ +\[0-9\]+ 0040 D086121B\[^\n]*\n"    { set x [expr $x+1] }
2540
            -re "^ +\[0-9\]+ 0044 D086321B\[^\n]*\n"    { set x [expr $x+1] }
2541
            -re "^ +\[0-9\]+ 0048 D086521B\[^\n]*\n"    { set x [expr $x+1] }
2542
            -re "^ +\[0-9\]+ 004c D086721B\[^\n]*\n"    { set x [expr $x+1] }
2543
            -re "^ +\[0-9\]+ 0050 D086921B\[^\n]*\n"    { set x [expr $x+1] }
2544
            -re "^ +\[0-9\]+ 0054 D086B21B\[^\n]*\n"    { set x [expr $x+1] }
2545
            -re "^ +\[0-9\]+ 0058 D086D21B\[^\n]*\n"    { set x [expr $x+1] }
2546
            -re "^ +\[0-9\]+ 005c D086F21B\[^\n]*\n"    { set x [expr $x+1] }
2547
            -re "^ +\[0-9\]+ 0060 D086161B\[^\n]*\n"    { set x [expr $x+1] }
2548
            -re "^ +\[0-9\]+ 0064 D086361B\[^\n]*\n"    { set x [expr $x+1] }
2549
            -re "^ +\[0-9\]+ 0068 D086561B\[^\n]*\n"    { set x [expr $x+1] }
2550
            -re "^ +\[0-9\]+ 006c D086761B\[^\n]*\n"    { set x [expr $x+1] }
2551
            -re "^ +\[0-9\]+ 0070 D086961B\[^\n]*\n"    { set x [expr $x+1] }
2552
            -re "^ +\[0-9\]+ 0074 D086B61B\[^\n]*\n"    { set x [expr $x+1] }
2553
            -re "^ +\[0-9\]+ 0078 D086D61B\[^\n]*\n"    { set x [expr $x+1] }
2554
            -re "^ +\[0-9\]+ 007c D086F61B\[^\n]*\n"    { set x [expr $x+1] }
2555
            -re "\[^\n\]*\n"                            { }
2556
            timeout                             { perror "timeout\n"; break }
2557
            eof                                 { break }
2558
        }
2559
    }
2560
 
2561
    # This was intended to do any cleanup necessary.  It kinda looks like it
2562
    # isn't needed, but just in case, please keep it in for now.
2563
    gas_finish
2564
 
2565
    # Did we find what we were looking for?  If not, flunk it.
2566
    if [expr $x==32] then { pass $testname } else { fail $testname }
2567
}
2568
 
2569
proc do_deposit {} {
2570
    set testname "deposit.s: deposit tests"
2571
    set x 0
2572
 
2573
    gas_start "deposit.s" "-al"
2574
 
2575
    # Check the assembled instruction against a table built by the HP assembler
2576
    # Any differences should be checked by hand -- with the number of problems
2577
    # I've seen in the HP assembler I don't completely trust it.
2578
    #
2579
    # Instead of having a variable for each match string just increment the
2580
    # total number of matches seen.  That's simpler when testing large numbers
2581
    # of instructions (as these tests to).
2582
    while 1 {
2583
        expect {
2584
            -re "^ +\[0-9\]+ 0000 D4C40B56\[^\n]*\n"    { set x [expr $x+1] }
2585
            -re "^ +\[0-9\]+ 0004 D4C42B56\[^\n]*\n"    { set x [expr $x+1] }
2586
            -re "^ +\[0-9\]+ 0008 D4C44B56\[^\n]*\n"    { set x [expr $x+1] }
2587
            -re "^ +\[0-9\]+ 000c D4C46B56\[^\n]*\n"    { set x [expr $x+1] }
2588
            -re "^ +\[0-9\]+ 0010 D4C48B56\[^\n]*\n"    { set x [expr $x+1] }
2589
            -re "^ +\[0-9\]+ 0014 D4C4AB56\[^\n]*\n"    { set x [expr $x+1] }
2590
            -re "^ +\[0-9\]+ 0018 D4C4CB56\[^\n]*\n"    { set x [expr $x+1] }
2591
            -re "^ +\[0-9\]+ 001c D4C4EB56\[^\n]*\n"    { set x [expr $x+1] }
2592
            -re "^ +\[0-9\]+ 0020 D4C40F56\[^\n]*\n"    { set x [expr $x+1] }
2593
            -re "^ +\[0-9\]+ 0024 D4C42F56\[^\n]*\n"    { set x [expr $x+1] }
2594
            -re "^ +\[0-9\]+ 0028 D4C44F56\[^\n]*\n"    { set x [expr $x+1] }
2595
            -re "^ +\[0-9\]+ 002c D4C46F56\[^\n]*\n"    { set x [expr $x+1] }
2596
            -re "^ +\[0-9\]+ 0030 D4C48F56\[^\n]*\n"    { set x [expr $x+1] }
2597
            -re "^ +\[0-9\]+ 0034 D4C4AF56\[^\n]*\n"    { set x [expr $x+1] }
2598
            -re "^ +\[0-9\]+ 0038 D4C4CF56\[^\n]*\n"    { set x [expr $x+1] }
2599
            -re "^ +\[0-9\]+ 003c D4C4EF56\[^\n]*\n"    { set x [expr $x+1] }
2600
            -re "^ +\[0-9\]+ 0040 D4C4001B\[^\n]*\n"    { set x [expr $x+1] }
2601
            -re "^ +\[0-9\]+ 0044 D4C4201B\[^\n]*\n"    { set x [expr $x+1] }
2602
            -re "^ +\[0-9\]+ 0048 D4C4401B\[^\n]*\n"    { set x [expr $x+1] }
2603
            -re "^ +\[0-9\]+ 004c D4C4601B\[^\n]*\n"    { set x [expr $x+1] }
2604
            -re "^ +\[0-9\]+ 0050 D4C4801B\[^\n]*\n"    { set x [expr $x+1] }
2605
            -re "^ +\[0-9\]+ 0054 D4C4A01B\[^\n]*\n"    { set x [expr $x+1] }
2606
            -re "^ +\[0-9\]+ 0058 D4C4C01B\[^\n]*\n"    { set x [expr $x+1] }
2607
            -re "^ +\[0-9\]+ 005c D4C4E01B\[^\n]*\n"    { set x [expr $x+1] }
2608
            -re "^ +\[0-9\]+ 0060 D4C4041B\[^\n]*\n"    { set x [expr $x+1] }
2609
            -re "^ +\[0-9\]+ 0064 D4C4241B\[^\n]*\n"    { set x [expr $x+1] }
2610
            -re "^ +\[0-9\]+ 0068 D4C4441B\[^\n]*\n"    { set x [expr $x+1] }
2611
            -re "^ +\[0-9\]+ 006c D4C4641B\[^\n]*\n"    { set x [expr $x+1] }
2612
            -re "^ +\[0-9\]+ 0070 D4C4841B\[^\n]*\n"    { set x [expr $x+1] }
2613
            -re "^ +\[0-9\]+ 0074 D4C4A41B\[^\n]*\n"    { set x [expr $x+1] }
2614
            -re "^ +\[0-9\]+ 0078 D4C4C41B\[^\n]*\n"    { set x [expr $x+1] }
2615
            -re "^ +\[0-9\]+ 007c D4C4E41B\[^\n]*\n"    { set x [expr $x+1] }
2616
            -re "^ +\[0-9\]+ 0080 D4DF141B\[^\n]*\n"    { set x [expr $x+1] }
2617
            -re "^ +\[0-9\]+ 0084 D4DF341B\[^\n]*\n"    { set x [expr $x+1] }
2618
            -re "^ +\[0-9\]+ 0088 D4DF541B\[^\n]*\n"    { set x [expr $x+1] }
2619
            -re "^ +\[0-9\]+ 008c D4DF741B\[^\n]*\n"    { set x [expr $x+1] }
2620
            -re "^ +\[0-9\]+ 0090 D4DF941B\[^\n]*\n"    { set x [expr $x+1] }
2621
            -re "^ +\[0-9\]+ 0094 D4DFB41B\[^\n]*\n"    { set x [expr $x+1] }
2622
            -re "^ +\[0-9\]+ 0098 D4DFD41B\[^\n]*\n"    { set x [expr $x+1] }
2623
            -re "^ +\[0-9\]+ 009c D4DFF41B\[^\n]*\n"    { set x [expr $x+1] }
2624
            -re "^ +\[0-9\]+ 00a0 D4DF101B\[^\n]*\n"    { set x [expr $x+1] }
2625
            -re "^ +\[0-9\]+ 00a4 D4DF301B\[^\n]*\n"    { set x [expr $x+1] }
2626
            -re "^ +\[0-9\]+ 00a8 D4DF501B\[^\n]*\n"    { set x [expr $x+1] }
2627
            -re "^ +\[0-9\]+ 00ac D4DF701B\[^\n]*\n"    { set x [expr $x+1] }
2628
            -re "^ +\[0-9\]+ 00b0 D4DF901B\[^\n]*\n"    { set x [expr $x+1] }
2629
            -re "^ +\[0-9\]+ 00b4 D4DFB01B\[^\n]*\n"    { set x [expr $x+1] }
2630
            -re "^ +\[0-9\]+ 00b8 D4DFD01B\[^\n]*\n"    { set x [expr $x+1] }
2631
            -re "^ +\[0-9\]+ 00bc D4DFF01B\[^\n]*\n"    { set x [expr $x+1] }
2632
            -re "^ +\[0-9\]+ 00c0 D4DF1F76\[^\n]*\n"    { set x [expr $x+1] }
2633
            -re "^ +\[0-9\]+ 00c4 D4DF3F76\[^\n]*\n"    { set x [expr $x+1] }
2634
            -re "^ +\[0-9\]+ 00c8 D4DF5F76\[^\n]*\n"    { set x [expr $x+1] }
2635
            -re "^ +\[0-9\]+ 00cc D4DF7F76\[^\n]*\n"    { set x [expr $x+1] }
2636
            -re "^ +\[0-9\]+ 00d0 D4DF9F76\[^\n]*\n"    { set x [expr $x+1] }
2637
            -re "^ +\[0-9\]+ 00d4 D4DFBF76\[^\n]*\n"    { set x [expr $x+1] }
2638
            -re "^ +\[0-9\]+ 00d8 D4DFDF76\[^\n]*\n"    { set x [expr $x+1] }
2639
            -re "^ +\[0-9\]+ 00dc D4DFFF76\[^\n]*\n"    { set x [expr $x+1] }
2640
            -re "^ +\[0-9\]+ 00e0 D4DF1B76\[^\n]*\n"    { set x [expr $x+1] }
2641
            -re "^ +\[0-9\]+ 00e4 D4DF3B76\[^\n]*\n"    { set x [expr $x+1] }
2642
            -re "^ +\[0-9\]+ 00e8 D4DF5B76\[^\n]*\n"    { set x [expr $x+1] }
2643
            -re "^ +\[0-9\]+ 00ec D4DF7B76\[^\n]*\n"    { set x [expr $x+1] }
2644
            -re "^ +\[0-9\]+ 00f0 D4DF9B76\[^\n]*\n"    { set x [expr $x+1] }
2645
            -re "^ +\[0-9\]+ 00f4 D4DFBB76\[^\n]*\n"    { set x [expr $x+1] }
2646
            -re "^ +\[0-9\]+ 00f8 D4DFDB76\[^\n]*\n"    { set x [expr $x+1] }
2647
            -re "^ +\[0-9\]+ 00fc D4DFFB76\[^\n]*\n"    { set x [expr $x+1] }
2648
            -re "\[^\n\]*\n"                            { }
2649
            timeout                             { perror "timeout\n"; break }
2650
            eof                                 { break }
2651
        }
2652
    }
2653
 
2654
    # This was intended to do any cleanup necessary.  It kinda looks like it
2655
    # isn't needed, but just in case, please keep it in for now.
2656
    gas_finish
2657
 
2658
    # Did we find what we were looking for?  If not, flunk it.
2659
    if [expr $x==64] then { pass $testname } else { fail $testname }
2660
}
2661
 
2662
proc do_deposit2 {} {
2663
    set testname "deposit2.s: deposit2 tests"
2664
    set x 0
2665
 
2666
    gas_start "deposit2.s" "-al"
2667
 
2668
    # Check the assembled instruction against a table built by the HP assembler
2669
    # Any differences should be checked by hand -- with the number of problems
2670
    # I've seen in the HP assembler I don't completely trust it.
2671
    #
2672
    # Instead of having a variable for each match string just increment the
2673
    # total number of matches seen.  That's simpler when testing large numbers
2674
    # of instructions (as these tests to).
2675
    while 1 {
2676
        expect {
2677
            -re "^ +\[0-9\]+ 0000 D4C40B56\[^\n]*\n"    { set x [expr $x+1] }
2678
            -re "^ +\[0-9\]+ 0004 D4C42B56\[^\n]*\n"    { set x [expr $x+1] }
2679
            -re "^ +\[0-9\]+ 0008 D4C44B56\[^\n]*\n"    { set x [expr $x+1] }
2680
            -re "^ +\[0-9\]+ 000c D4C46B56\[^\n]*\n"    { set x [expr $x+1] }
2681
            -re "^ +\[0-9\]+ 0010 D4C48B56\[^\n]*\n"    { set x [expr $x+1] }
2682
            -re "^ +\[0-9\]+ 0014 D4C4AB56\[^\n]*\n"    { set x [expr $x+1] }
2683
            -re "^ +\[0-9\]+ 0018 D4C4CB56\[^\n]*\n"    { set x [expr $x+1] }
2684
            -re "^ +\[0-9\]+ 001c D4C4EB56\[^\n]*\n"    { set x [expr $x+1] }
2685
            -re "^ +\[0-9\]+ 0020 D4C40F56\[^\n]*\n"    { set x [expr $x+1] }
2686
            -re "^ +\[0-9\]+ 0024 D4C42F56\[^\n]*\n"    { set x [expr $x+1] }
2687
            -re "^ +\[0-9\]+ 0028 D4C44F56\[^\n]*\n"    { set x [expr $x+1] }
2688
            -re "^ +\[0-9\]+ 002c D4C46F56\[^\n]*\n"    { set x [expr $x+1] }
2689
            -re "^ +\[0-9\]+ 0030 D4C48F56\[^\n]*\n"    { set x [expr $x+1] }
2690
            -re "^ +\[0-9\]+ 0034 D4C4AF56\[^\n]*\n"    { set x [expr $x+1] }
2691
            -re "^ +\[0-9\]+ 0038 D4C4CF56\[^\n]*\n"    { set x [expr $x+1] }
2692
            -re "^ +\[0-9\]+ 003c D4C4EF56\[^\n]*\n"    { set x [expr $x+1] }
2693
            -re "^ +\[0-9\]+ 0040 D4C4001B\[^\n]*\n"    { set x [expr $x+1] }
2694
            -re "^ +\[0-9\]+ 0044 D4C4201B\[^\n]*\n"    { set x [expr $x+1] }
2695
            -re "^ +\[0-9\]+ 0048 D4C4401B\[^\n]*\n"    { set x [expr $x+1] }
2696
            -re "^ +\[0-9\]+ 004c D4C4601B\[^\n]*\n"    { set x [expr $x+1] }
2697
            -re "^ +\[0-9\]+ 0050 D4C4801B\[^\n]*\n"    { set x [expr $x+1] }
2698
            -re "^ +\[0-9\]+ 0054 D4C4A01B\[^\n]*\n"    { set x [expr $x+1] }
2699
            -re "^ +\[0-9\]+ 0058 D4C4C01B\[^\n]*\n"    { set x [expr $x+1] }
2700
            -re "^ +\[0-9\]+ 005c D4C4E01B\[^\n]*\n"    { set x [expr $x+1] }
2701
            -re "^ +\[0-9\]+ 0060 D4C4041B\[^\n]*\n"    { set x [expr $x+1] }
2702
            -re "^ +\[0-9\]+ 0064 D4C4241B\[^\n]*\n"    { set x [expr $x+1] }
2703
            -re "^ +\[0-9\]+ 0068 D4C4441B\[^\n]*\n"    { set x [expr $x+1] }
2704
            -re "^ +\[0-9\]+ 006c D4C4641B\[^\n]*\n"    { set x [expr $x+1] }
2705
            -re "^ +\[0-9\]+ 0070 D4C4841B\[^\n]*\n"    { set x [expr $x+1] }
2706
            -re "^ +\[0-9\]+ 0074 D4C4A41B\[^\n]*\n"    { set x [expr $x+1] }
2707
            -re "^ +\[0-9\]+ 0078 D4C4C41B\[^\n]*\n"    { set x [expr $x+1] }
2708
            -re "^ +\[0-9\]+ 007c D4C4E41B\[^\n]*\n"    { set x [expr $x+1] }
2709
            -re "^ +\[0-9\]+ 0080 D4DF141B\[^\n]*\n"    { set x [expr $x+1] }
2710
            -re "^ +\[0-9\]+ 0084 D4DF341B\[^\n]*\n"    { set x [expr $x+1] }
2711
            -re "^ +\[0-9\]+ 0088 D4DF541B\[^\n]*\n"    { set x [expr $x+1] }
2712
            -re "^ +\[0-9\]+ 008c D4DF741B\[^\n]*\n"    { set x [expr $x+1] }
2713
            -re "^ +\[0-9\]+ 0090 D4DF941B\[^\n]*\n"    { set x [expr $x+1] }
2714
            -re "^ +\[0-9\]+ 0094 D4DFB41B\[^\n]*\n"    { set x [expr $x+1] }
2715
            -re "^ +\[0-9\]+ 0098 D4DFD41B\[^\n]*\n"    { set x [expr $x+1] }
2716
            -re "^ +\[0-9\]+ 009c D4DFF41B\[^\n]*\n"    { set x [expr $x+1] }
2717
            -re "^ +\[0-9\]+ 00a0 D4DF101B\[^\n]*\n"    { set x [expr $x+1] }
2718
            -re "^ +\[0-9\]+ 00a4 D4DF301B\[^\n]*\n"    { set x [expr $x+1] }
2719
            -re "^ +\[0-9\]+ 00a8 D4DF501B\[^\n]*\n"    { set x [expr $x+1] }
2720
            -re "^ +\[0-9\]+ 00ac D4DF701B\[^\n]*\n"    { set x [expr $x+1] }
2721
            -re "^ +\[0-9\]+ 00b0 D4DF901B\[^\n]*\n"    { set x [expr $x+1] }
2722
            -re "^ +\[0-9\]+ 00b4 D4DFB01B\[^\n]*\n"    { set x [expr $x+1] }
2723
            -re "^ +\[0-9\]+ 00b8 D4DFD01B\[^\n]*\n"    { set x [expr $x+1] }
2724
            -re "^ +\[0-9\]+ 00bc D4DFF01B\[^\n]*\n"    { set x [expr $x+1] }
2725
            -re "^ +\[0-9\]+ 00c0 D4DF1F76\[^\n]*\n"    { set x [expr $x+1] }
2726
            -re "^ +\[0-9\]+ 00c4 D4DF3F76\[^\n]*\n"    { set x [expr $x+1] }
2727
            -re "^ +\[0-9\]+ 00c8 D4DF5F76\[^\n]*\n"    { set x [expr $x+1] }
2728
            -re "^ +\[0-9\]+ 00cc D4DF7F76\[^\n]*\n"    { set x [expr $x+1] }
2729
            -re "^ +\[0-9\]+ 00d0 D4DF9F76\[^\n]*\n"    { set x [expr $x+1] }
2730
            -re "^ +\[0-9\]+ 00d4 D4DFBF76\[^\n]*\n"    { set x [expr $x+1] }
2731
            -re "^ +\[0-9\]+ 00d8 D4DFDF76\[^\n]*\n"    { set x [expr $x+1] }
2732
            -re "^ +\[0-9\]+ 00dc D4DFFF76\[^\n]*\n"    { set x [expr $x+1] }
2733
            -re "^ +\[0-9\]+ 00e0 D4DF1B76\[^\n]*\n"    { set x [expr $x+1] }
2734
            -re "^ +\[0-9\]+ 00e4 D4DF3B76\[^\n]*\n"    { set x [expr $x+1] }
2735
            -re "^ +\[0-9\]+ 00e8 D4DF5B76\[^\n]*\n"    { set x [expr $x+1] }
2736
            -re "^ +\[0-9\]+ 00ec D4DF7B76\[^\n]*\n"    { set x [expr $x+1] }
2737
            -re "^ +\[0-9\]+ 00f0 D4DF9B76\[^\n]*\n"    { set x [expr $x+1] }
2738
            -re "^ +\[0-9\]+ 00f4 D4DFBB76\[^\n]*\n"    { set x [expr $x+1] }
2739
            -re "^ +\[0-9\]+ 00f8 D4DFDB76\[^\n]*\n"    { set x [expr $x+1] }
2740
            -re "^ +\[0-9\]+ 00fc D4DFFB76\[^\n]*\n"    { set x [expr $x+1] }
2741
            -re "\[^\n\]*\n"                            { }
2742
            timeout                             { perror "timeout\n"; break }
2743
            eof                                 { break }
2744
        }
2745
    }
2746
 
2747
    # This was intended to do any cleanup necessary.  It kinda looks like it
2748
    # isn't needed, but just in case, please keep it in for now.
2749
    gas_finish
2750
 
2751
    # Did we find what we were looking for?  If not, flunk it.
2752
    if [expr $x==64] then { pass $testname } else { fail $testname }
2753
}
2754
 
2755
proc do_deposit3 {} {
2756
    set testname "deposit3.s: deposit3 tests"
2757
    set x 0
2758
 
2759
    gas_start "deposit3.s" "-al"
2760
 
2761
    # Check the assembled instruction against a table built by the HP assembler
2762
    # Any differences should be checked by hand -- with the number of problems
2763
    # I've seen in the HP assembler I don't completely trust it.
2764
    #
2765
    # Instead of having a variable for each match string just increment the
2766
    # total number of matches seen.  That's simpler when testing large numbers
2767
    # of instructions (as these tests to).
2768
    while 1 {
2769
        expect {
2770
            -re "^ +\[0-9\]+ 0000 F0C40ABB\[^\n\]*\n"   { set x [expr $x+1] }
2771
            -re "^ +\[0-9\]+ 0004 F0C42ABB\[^\n\]*\n"   { set x [expr $x+1] }
2772
            -re "^ +\[0-9\]+ 0008 F0C44ABB\[^\n\]*\n"   { set x [expr $x+1] }
2773
            -re "^ +\[0-9\]+ 000c F0C46ABB\[^\n\]*\n"   { set x [expr $x+1] }
2774
            -re "^ +\[0-9\]+ 0010 F0C48ABB\[^\n\]*\n"   { set x [expr $x+1] }
2775
            -re "^ +\[0-9\]+ 0014 F0C4AABB\[^\n\]*\n"   { set x [expr $x+1] }
2776
            -re "^ +\[0-9\]+ 0018 F0C4CABB\[^\n\]*\n"   { set x [expr $x+1] }
2777
            -re "^ +\[0-9\]+ 001c F0C4EABB\[^\n\]*\n"   { set x [expr $x+1] }
2778
            -re "^ +\[0-9\]+ 0020 F0C40EBB\[^\n\]*\n"   { set x [expr $x+1] }
2779
            -re "^ +\[0-9\]+ 0024 F0C42EBB\[^\n\]*\n"   { set x [expr $x+1] }
2780
            -re "^ +\[0-9\]+ 0028 F0C44EBB\[^\n\]*\n"   { set x [expr $x+1] }
2781
            -re "^ +\[0-9\]+ 002c F0C46EBB\[^\n\]*\n"   { set x [expr $x+1] }
2782
            -re "^ +\[0-9\]+ 0030 F0C48EBB\[^\n\]*\n"   { set x [expr $x+1] }
2783
            -re "^ +\[0-9\]+ 0034 F0C4AEBB\[^\n\]*\n"   { set x [expr $x+1] }
2784
            -re "^ +\[0-9\]+ 0038 F0C4CEBB\[^\n\]*\n"   { set x [expr $x+1] }
2785
            -re "^ +\[0-9\]+ 003c F0C4EEBB\[^\n\]*\n"   { set x [expr $x+1] }
2786
            -re "^ +\[0-9\]+ 0040 D4C4021B\[^\n\]*\n"   { set x [expr $x+1] }
2787
            -re "^ +\[0-9\]+ 0044 D4C4221B\[^\n\]*\n"   { set x [expr $x+1] }
2788
            -re "^ +\[0-9\]+ 0048 D4C4421B\[^\n\]*\n"   { set x [expr $x+1] }
2789
            -re "^ +\[0-9\]+ 004c D4C4621B\[^\n\]*\n"   { set x [expr $x+1] }
2790
            -re "^ +\[0-9\]+ 0050 D4C4821B\[^\n\]*\n"   { set x [expr $x+1] }
2791
            -re "^ +\[0-9\]+ 0054 D4C4A21B\[^\n\]*\n"   { set x [expr $x+1] }
2792
            -re "^ +\[0-9\]+ 0058 D4C4C21B\[^\n\]*\n"   { set x [expr $x+1] }
2793
            -re "^ +\[0-9\]+ 005c D4C4E21B\[^\n\]*\n"   { set x [expr $x+1] }
2794
            -re "^ +\[0-9\]+ 0060 D4C4061B\[^\n\]*\n"   { set x [expr $x+1] }
2795
            -re "^ +\[0-9\]+ 0064 D4C4261B\[^\n\]*\n"   { set x [expr $x+1] }
2796
            -re "^ +\[0-9\]+ 0068 D4C4461B\[^\n\]*\n"   { set x [expr $x+1] }
2797
            -re "^ +\[0-9\]+ 006c D4C4661B\[^\n\]*\n"   { set x [expr $x+1] }
2798
            -re "^ +\[0-9\]+ 0070 D4C4861B\[^\n\]*\n"   { set x [expr $x+1] }
2799
            -re "^ +\[0-9\]+ 0074 D4C4A61B\[^\n\]*\n"   { set x [expr $x+1] }
2800
            -re "^ +\[0-9\]+ 0078 D4C4C61B\[^\n\]*\n"   { set x [expr $x+1] }
2801
            -re "^ +\[0-9\]+ 007c D4C4E61B\[^\n\]*\n"   { set x [expr $x+1] }
2802
            -re "^ +\[0-9\]+ 0080 D4DF161B\[^\n\]*\n"   { set x [expr $x+1] }
2803
            -re "^ +\[0-9\]+ 0084 D4DF361B\[^\n\]*\n"   { set x [expr $x+1] }
2804
            -re "^ +\[0-9\]+ 0088 D4DF561B\[^\n\]*\n"   { set x [expr $x+1] }
2805
            -re "^ +\[0-9\]+ 008c D4DF761B\[^\n\]*\n"   { set x [expr $x+1] }
2806
            -re "^ +\[0-9\]+ 0090 D4DF961B\[^\n\]*\n"   { set x [expr $x+1] }
2807
            -re "^ +\[0-9\]+ 0094 D4DFB61B\[^\n\]*\n"   { set x [expr $x+1] }
2808
            -re "^ +\[0-9\]+ 0098 D4DFD61B\[^\n\]*\n"   { set x [expr $x+1] }
2809
            -re "^ +\[0-9\]+ 009c D4DFF61B\[^\n\]*\n"   { set x [expr $x+1] }
2810
            -re "^ +\[0-9\]+ 00a0 D4DF121B\[^\n\]*\n"   { set x [expr $x+1] }
2811
            -re "^ +\[0-9\]+ 00a4 D4DF321B\[^\n\]*\n"   { set x [expr $x+1] }
2812
            -re "^ +\[0-9\]+ 00a8 D4DF521B\[^\n\]*\n"   { set x [expr $x+1] }
2813
            -re "^ +\[0-9\]+ 00ac D4DF721B\[^\n\]*\n"   { set x [expr $x+1] }
2814
            -re "^ +\[0-9\]+ 00b0 D4DF921B\[^\n\]*\n"   { set x [expr $x+1] }
2815
            -re "^ +\[0-9\]+ 00b4 D4DFB21B\[^\n\]*\n"   { set x [expr $x+1] }
2816
            -re "^ +\[0-9\]+ 00b8 D4DFD21B\[^\n\]*\n"   { set x [expr $x+1] }
2817
            -re "^ +\[0-9\]+ 00bc D4DFF21B\[^\n\]*\n"   { set x [expr $x+1] }
2818
            -re "^ +\[0-9\]+ 00c0 F4DF0EBC\[^\n\]*\n"   { set x [expr $x+1] }
2819
            -re "^ +\[0-9\]+ 00c4 F4DF2EBC\[^\n\]*\n"   { set x [expr $x+1] }
2820
            -re "^ +\[0-9\]+ 00c8 F4DF4EBC\[^\n\]*\n"   { set x [expr $x+1] }
2821
            -re "^ +\[0-9\]+ 00cc F4DF6EBC\[^\n\]*\n"   { set x [expr $x+1] }
2822
            -re "^ +\[0-9\]+ 00d0 F4DF8EBC\[^\n\]*\n"   { set x [expr $x+1] }
2823
            -re "^ +\[0-9\]+ 00d4 F4DFAEBC\[^\n\]*\n"   { set x [expr $x+1] }
2824
            -re "^ +\[0-9\]+ 00d8 F4DFCEBC\[^\n\]*\n"   { set x [expr $x+1] }
2825
            -re "^ +\[0-9\]+ 00dc F4DFEEBC\[^\n\]*\n"   { set x [expr $x+1] }
2826
            -re "^ +\[0-9\]+ 00e0 F4DF0ABC\[^\n\]*\n"   { set x [expr $x+1] }
2827
            -re "^ +\[0-9\]+ 00e4 F4DF2ABC\[^\n\]*\n"   { set x [expr $x+1] }
2828
            -re "^ +\[0-9\]+ 00e8 F4DF4ABC\[^\n\]*\n"   { set x [expr $x+1] }
2829
            -re "^ +\[0-9\]+ 00ec F4DF6ABC\[^\n\]*\n"   { set x [expr $x+1] }
2830
            -re "^ +\[0-9\]+ 00f0 F4DF8ABC\[^\n\]*\n"   { set x [expr $x+1] }
2831
            -re "^ +\[0-9\]+ 00f4 F4DFAABC\[^\n\]*\n"   { set x [expr $x+1] }
2832
            -re "^ +\[0-9\]+ 00f8 F4DFCABC\[^\n\]*\n"   { set x [expr $x+1] }
2833
            -re "^ +\[0-9\]+ 00fc F4DFEABC\[^\n\]*\n"   { set x [expr $x+1] }
2834
            -re "\[^\n\]*\n"                            { }
2835
            timeout                             { perror "timeout\n"; break }
2836
            eof                                 { break }
2837
        }
2838
    }
2839
 
2840
    # This was intended to do any cleanup necessary.  It kinda looks like it
2841
    # isn't needed, but just in case, please keep it in for now.
2842
    gas_finish
2843
 
2844
    # Did we find what we were looking for?  If not, flunk it.
2845
    if [expr $x==64] then { pass $testname } else { fail $testname }
2846
}
2847
 
2848
proc do_system {} {
2849
    set testname "system.s: system tests"
2850
    set x 0
2851
 
2852
    gas_start "system.s" "-al"
2853
 
2854
    # Check the assembled instruction against a table built by the HP assembler
2855
    # Any differences should be checked by hand -- with the number of problems
2856
    # I've seen in the HP assembler I don't completely trust it.
2857
    #
2858
    # Instead of having a variable for each match string just increment the
2859
    # total number of matches seen.  That's simpler when testing large numbers
2860
    # of instructions (as these tests to).
2861
    while 1 {
2862
        expect {
2863
            -re "^ +\[0-9\]+ 0000 00018005\[^\n]*\n"    { set x [expr $x+1] }
2864
            -re "^ +\[0-9\]+ 0004 00000C00\[^\n]*\n"    { set x [expr $x+1] }
2865
            -re "^ +\[0-9\]+ 0008 00000CA0\[^\n]*\n"    { set x [expr $x+1] }
2866
            -re "^ +\[0-9\]+ 000c 00050D64\[^\n]*\n"    { set x [expr $x+1] }
2867
            -re "^ +\[0-9\]+ 0010 00050E64\[^\n]*\n"    { set x [expr $x+1] }
2868
            -re "^ +\[0-9\]+ 0014 00041860\[^\n]*\n"    { set x [expr $x+1] }
2869
            -re "^ +\[0-9\]+ 0018 00A010A4\[^\n]*\n"    { set x [expr $x+1] }
2870
            -re "^ +\[0-9\]+ 001c 00041820\[^\n]*\n"    { set x [expr $x+1] }
2871
            -re "^ +\[0-9\]+ 0020 01441840\[^\n]*\n"    { set x [expr $x+1] }
2872
            -re "^ +\[0-9\]+ 0024 000004A4\[^\n]*\n"    { set x [expr $x+1] }
2873
            -re "^ +\[0-9\]+ 0028 014008A4\[^\n]*\n"    { set x [expr $x+1] }
2874
            -re "^ +\[0-9\]+ 002c 00000400\[^\n]*\n"    { set x [expr $x+1] }
2875
            -re "^ +\[0-9\]+ 0030 00100400\[^\n]*\n"    { set x [expr $x+1] }
2876
            -re "^ +\[0-9\]+ 0034 140004D2\[^\n]*\n"    { set x [expr $x+1] }
2877
            -re "^ +\[0-9\]+ 0038 04A61187\[^\n]*\n"    { set x [expr $x+1] }
2878
            -re "^ +\[0-9\]+ 003c 04A13187\[^\n]*\n"    { set x [expr $x+1] }
2879
            -re "^ +\[0-9\]+ 0040 04A611C7\[^\n]*\n"    { set x [expr $x+1] }
2880
            -re "^ +\[0-9\]+ 0044 04A131C7\[^\n]*\n"    { set x [expr $x+1] }
2881
            -re "^ +\[0-9\]+ 0048 04A41346\[^\n]*\n"    { set x [expr $x+1] }
2882
            -re "^ +\[0-9\]+ 004c 04A41366\[^\n]*\n"    { set x [expr $x+1] }
2883
            -re "^ +\[0-9\]+ 0050 04A41306\[^\n]*\n"    { set x [expr $x+1] }
2884
            -re "^ +\[0-9\]+ 0054 04A41040\[^\n]*\n"    { set x [expr $x+1] }
2885
            -re "^ +\[0-9\]+ 0058 04A42040\[^\n]*\n"    { set x [expr $x+1] }
2886
            -re "^ +\[0-9\]+ 005c 04A41000\[^\n]*\n"    { set x [expr $x+1] }
2887
            -re "^ +\[0-9\]+ 0060 04A42000\[^\n]*\n"    { set x [expr $x+1] }
2888
            -re "\[^\n\]*\n"                            { }
2889
            timeout                             { perror "timeout\n"; break }
2890
            eof                                 { break }
2891
        }
2892
    }
2893
 
2894
    # This was intended to do any cleanup necessary.  It kinda looks like it
2895
    # isn't needed, but just in case, please keep it in for now.
2896
    gas_finish
2897
 
2898
    # Did we find what we were looking for?  If not, flunk it.
2899
    if [expr $x==25] then { pass $testname } else { fail $testname }
2900
}
2901
 
2902
proc do_system2 {} {
2903
    set testname "system2.s: system2 tests"
2904
    set x 0
2905
 
2906
    gas_start "system2.s" "-al"
2907
 
2908
    # Check the assembled instruction against a table built by the HP assembler
2909
    # Any differences should be checked by hand -- with the number of problems
2910
    # I've seen in the HP assembler I don't completely trust it.
2911
    #
2912
    # Instead of having a variable for each match string just increment the
2913
    # total number of matches seen.  That's simpler when testing large numbers
2914
    # of instructions (as these tests to).
2915
    while 1 {
2916
        expect {
2917
            -re "^ +\[0-9\]+ 0000 00000C00\[^\n]*\n"    { set x [expr $x+1] }
2918
            -re "^ +\[0-9\]+ 0004 00000CA0\[^\n]*\n"    { set x [expr $x+1] }
2919
            -re "^ +\[0-9\]+ 0008 039B0D64\[^\n]*\n"    { set x [expr $x+1] }
2920
            -re "^ +\[0-9\]+ 000c 039B0E64\[^\n]*\n"    { set x [expr $x+1] }
2921
            -re "^ +\[0-9\]+ 0010 016048A4\[^\n]*\n"    { set x [expr $x+1] }
2922
            -re "^ +\[0-9\]+ 0014 04A61187\[^\n]*\n"    { set x [expr $x+1] }
2923
            -re "^ +\[0-9\]+ 0018 04A13187\[^\n]*\n"    { set x [expr $x+1] }
2924
            -re "^ +\[0-9\]+ 001c 04A611C7\[^\n]*\n"    { set x [expr $x+1] }
2925
            -re "^ +\[0-9\]+ 0020 04A131C7\[^\n]*\n"    { set x [expr $x+1] }
2926
            -re "\[^\n\]*\n"                            { }
2927
            timeout                             { perror "timeout\n"; break }
2928
            eof                                 { break }
2929
        }
2930
    }
2931
 
2932
    # This was intended to do any cleanup necessary.  It kinda looks like it
2933
    # isn't needed, but just in case, please keep it in for now.
2934
    gas_finish
2935
 
2936
    # Did we find what we were looking for?  If not, flunk it.
2937
    if [expr $x==9] then { pass $testname } else { fail $testname }
2938
}
2939
 
2940
proc do_purge {} {
2941
    set testname "purge.s: purge tests"
2942
    set x 0
2943
 
2944
    gas_start "purge.s" "-al"
2945
 
2946
    # Check the assembled instruction against a table built by the HP assembler
2947
    # Any differences should be checked by hand -- with the number of problems
2948
    # I've seen in the HP assembler I don't completely trust it.
2949
    #
2950
    # Instead of having a variable for each match string just increment the
2951
    # total number of matches seen.  That's simpler when testing large numbers
2952
    # of instructions (as these tests to).
2953
    while 1 {
2954
        expect {
2955
            -re "^ +\[0-9\]+ 0000 04A41200\[^\n]*\n"    { set x [expr $x+1] }
2956
            -re "^ +\[0-9\]+ 0004 04A41220\[^\n]*\n"    { set x [expr $x+1] }
2957
            -re "^ +\[0-9\]+ 0008 04A42200\[^\n]*\n"    { set x [expr $x+1] }
2958
            -re "^ +\[0-9\]+ 000c 04A42220\[^\n]*\n"    { set x [expr $x+1] }
2959
            -re "^ +\[0-9\]+ 0010 04A41240\[^\n]*\n"    { set x [expr $x+1] }
2960
            -re "^ +\[0-9\]+ 0014 04A41260\[^\n]*\n"    { set x [expr $x+1] }
2961
            -re "^ +\[0-9\]+ 0018 04A42240\[^\n]*\n"    { set x [expr $x+1] }
2962
            -re "^ +\[0-9\]+ 001c 04A42260\[^\n]*\n"    { set x [expr $x+1] }
2963
            -re "^ +\[0-9\]+ 0020 04A41380\[^\n]*\n"    { set x [expr $x+1] }
2964
            -re "^ +\[0-9\]+ 0024 04A413A0\[^\n]*\n"    { set x [expr $x+1] }
2965
            -re "^ +\[0-9\]+ 0028 04A41280\[^\n]*\n"    { set x [expr $x+1] }
2966
            -re "^ +\[0-9\]+ 002c 04A412A0\[^\n]*\n"    { set x [expr $x+1] }
2967
            -re "^ +\[0-9\]+ 0030 04A42280\[^\n]*\n"    { set x [expr $x+1] }
2968
            -re "^ +\[0-9\]+ 0034 04A422A0\[^\n]*\n"    { set x [expr $x+1] }
2969
            -re "^ +\[0-9\]+ 0038 04A412C0\[^\n]*\n"    { set x [expr $x+1] }
2970
            -re "^ +\[0-9\]+ 003c 04A412E0\[^\n]*\n"    { set x [expr $x+1] }
2971
            -re "^ +\[0-9\]+ 0040 04A422C0\[^\n]*\n"    { set x [expr $x+1] }
2972
            -re "^ +\[0-9\]+ 0044 04A422E0\[^\n]*\n"    { set x [expr $x+1] }
2973
 
2974
            -re "\[^\n\]*\n"                            { }
2975
            timeout                             { perror "timeout\n"; break }
2976
            eof                                 { break }
2977
        }
2978
    }
2979
 
2980
    # This was intended to do any cleanup necessary.  It kinda looks like it
2981
    # isn't needed, but just in case, please keep it in for now.
2982
    gas_finish
2983
 
2984
    # Did we find what we were looking for?  If not, flunk it.
2985
    if [expr $x==18] then { pass $testname } else { fail $testname }
2986
}
2987
 
2988
proc do_purge2 {} {
2989
    set testname "purge2.s: purge2 tests"
2990
    set x 0
2991
 
2992
    gas_start "purge2.s" "-al"
2993
 
2994
    # Check the assembled instruction against a table built by the HP assembler
2995
    # Any differences should be checked by hand -- with the number of problems
2996
    # I've seen in the HP assembler I don't completely trust it.
2997
    #
2998
    # Instead of having a variable for each match string just increment the
2999
    # total number of matches seen.  That's simpler when testing large numbers
3000
    # of instructions (as these tests to).
3001
    while 1 {
3002
        expect {
3003
            -re "^ +\[0-9\]+ 0000 04A41600\[^\n]*\n"    { set x [expr $x+1] }
3004
            -re "^ +\[0-9\]+ 0004 04A41620\[^\n]*\n"    { set x [expr $x+1] }
3005
            -re "^ +\[0-9\]+ 0008 04A42600\[^\n]*\n"    { set x [expr $x+1] }
3006
            -re "^ +\[0-9\]+ 000c 04A42620\[^\n]*\n"    { set x [expr $x+1] }
3007
 
3008
            -re "\[^\n\]*\n"                            { }
3009
            timeout                             { perror "timeout\n"; break }
3010
            eof                                 { break }
3011
        }
3012
    }
3013
 
3014
    # This was intended to do any cleanup necessary.  It kinda looks like it
3015
    # isn't needed, but just in case, please keep it in for now.
3016
    gas_finish
3017
 
3018
    # Did we find what we were looking for?  If not, flunk it.
3019
    if [expr $x==4] then { pass $testname } else { fail $testname }
3020
}
3021
 
3022
proc do_fp_misc {} {
3023
    set testname "fp_misc.s: fp_misc tests"
3024
    set x 0
3025
 
3026
    gas_start "fp_misc.s" "-al"
3027
 
3028
    # Check the assembled instruction against a table built by the HP assembler
3029
    # Any differences should be checked by hand -- with the number of problems
3030
    # I've seen in the HP assembler I don't completely trust it.
3031
    #
3032
    # Instead of having a variable for each match string just increment the
3033
    # total number of matches seen.  That's simpler when testing large numbers
3034
    # of instructions (as these tests to).
3035
    while 1 {
3036
        expect {
3037
            -re "^ +\[0-9\]+ 0000 30002420\[^\n\]*\n"   { set x [expr $x+1] }
3038
            -re "\[^\n\]*\n"                            { }
3039
            timeout                             { perror "timeout\n"; break }
3040
            eof                                 { break }
3041
        }
3042
    }
3043
 
3044
    # This was intended to do any cleanup necessary.  It kinda looks like it
3045
    # isn't needed, but just in case, please keep it in for now.
3046
    gas_finish
3047
 
3048
    # Did we find what we were looking for?  If not, flunk it.
3049
    if [expr $x==1] then { pass $testname } else { fail $testname }
3050
}
3051
 
3052
proc do_fmem {} {
3053
    set testname "fmem.s: fmem tests"
3054
    set x 0
3055
 
3056
    gas_start "fmem.s" "-al"
3057
 
3058
    # Check the assembled instruction against a table built by the HP assembler
3059
    # Any differences should be checked by hand -- with the number of problems
3060
    # I've seen in the HP assembler I don't completely trust it.
3061
    #
3062
    # Instead of having a variable for each match string just increment the
3063
    # total number of matches seen.  That's simpler when testing large numbers
3064
    # of instructions (as these tests to).
3065
    while 1 {
3066
        expect {
3067
            -re "^ +\[0-9\]+ 0000 24A40006\[^\n\]*\n"   { set x [expr $x+1] }
3068
            -re "^ +\[0-9\]+ 0004 24A42006\[^\n\]*\n"   { set x [expr $x+1] }
3069
            -re "^ +\[0-9\]+ 0008 24A40026\[^\n\]*\n"   { set x [expr $x+1] }
3070
            -re "^ +\[0-9\]+ 000c 24A42026\[^\n\]*\n"   { set x [expr $x+1] }
3071
            -re "^ +\[0-9\]+ 0010 2CA40006\[^\n\]*\n"   { set x [expr $x+1] }
3072
            -re "^ +\[0-9\]+ 0014 2CA42006\[^\n\]*\n"   { set x [expr $x+1] }
3073
            -re "^ +\[0-9\]+ 0018 2CA40026\[^\n\]*\n"   { set x [expr $x+1] }
3074
            -re "^ +\[0-9\]+ 001c 2CA42026\[^\n\]*\n"   { set x [expr $x+1] }
3075
            -re "^ +\[0-9\]+ 0020 24A40206\[^\n\]*\n"   { set x [expr $x+1] }
3076
            -re "^ +\[0-9\]+ 0024 24A42206\[^\n\]*\n"   { set x [expr $x+1] }
3077
            -re "^ +\[0-9\]+ 0028 24A40226\[^\n\]*\n"   { set x [expr $x+1] }
3078
            -re "^ +\[0-9\]+ 002c 24A42226\[^\n\]*\n"   { set x [expr $x+1] }
3079
            -re "^ +\[0-9\]+ 0030 2CA40206\[^\n\]*\n"   { set x [expr $x+1] }
3080
            -re "^ +\[0-9\]+ 0034 2CA42206\[^\n\]*\n"   { set x [expr $x+1] }
3081
            -re "^ +\[0-9\]+ 0038 2CA40226\[^\n\]*\n"   { set x [expr $x+1] }
3082
            -re "^ +\[0-9\]+ 003c 2CA42226\[^\n\]*\n"   { set x [expr $x+1] }
3083
            -re "^ +\[0-9\]+ 0040 3CA40206\[^\n\]*\n"   { set x [expr $x+1] }
3084
            -re "^ +\[0-9\]+ 0044 3CA42206\[^\n\]*\n"   { set x [expr $x+1] }
3085
            -re "^ +\[0-9\]+ 0048 3CA40226\[^\n\]*\n"   { set x [expr $x+1] }
3086
            -re "^ +\[0-9\]+ 004c 3CA42226\[^\n\]*\n"   { set x [expr $x+1] }
3087
            -re "^ +\[0-9\]+ 0050 24A01006\[^\n\]*\n"   { set x [expr $x+1] }
3088
            -re "^ +\[0-9\]+ 0054 24A03026\[^\n\]*\n"   { set x [expr $x+1] }
3089
            -re "^ +\[0-9\]+ 0058 24A01026\[^\n\]*\n"   { set x [expr $x+1] }
3090
            -re "^ +\[0-9\]+ 005c 2CA01006\[^\n\]*\n"   { set x [expr $x+1] }
3091
            -re "^ +\[0-9\]+ 0060 2CA03026\[^\n\]*\n"   { set x [expr $x+1] }
3092
            -re "^ +\[0-9\]+ 0064 2CA01026\[^\n\]*\n"   { set x [expr $x+1] }
3093
            -re "^ +\[0-9\]+ 0068 24A01206\[^\n\]*\n"   { set x [expr $x+1] }
3094
            -re "^ +\[0-9\]+ 006c 24A03226\[^\n\]*\n"   { set x [expr $x+1] }
3095
            -re "^ +\[0-9\]+ 0070 24A01226\[^\n\]*\n"   { set x [expr $x+1] }
3096
            -re "^ +\[0-9\]+ 0074 2CA01206\[^\n\]*\n"   { set x [expr $x+1] }
3097
            -re "^ +\[0-9\]+ 0078 2CA03226\[^\n\]*\n"   { set x [expr $x+1] }
3098
            -re "^ +\[0-9\]+ 007c 2CA01226\[^\n\]*\n"   { set x [expr $x+1] }
3099
            -re "^ +\[0-9\]+ 0080 3CA01206\[^\n\]*\n"   { set x [expr $x+1] }
3100
            -re "^ +\[0-9\]+ 0084 3CA03226\[^\n\]*\n"   { set x [expr $x+1] }
3101
            -re "^ +\[0-9\]+ 0088 3CA01226\[^\n\]*\n"   { set x [expr $x+1] }
3102
            -re "\[^\n\]*\n"                            { }
3103
            timeout                             { perror "timeout\n"; break }
3104
            eof                                 { break }
3105
        }
3106
    }
3107
 
3108
    # This was intended to do any cleanup necessary.  It kinda looks like it
3109
    # isn't needed, but just in case, please keep it in for now.
3110
    gas_finish
3111
 
3112
    # Did we find what we were looking for?  If not, flunk it.
3113
    if [expr $x==35] then { pass $testname } else { fail $testname }
3114
}
3115
 
3116
proc do_fp_comp {} {
3117
    set testname "fp_comp.s: fp_comp tests"
3118
    set x 0
3119
 
3120
    gas_start "fp_comp.s" "-al"
3121
 
3122
    # Check the assembled instruction against a table built by the HP assembler
3123
    # Any differences should be checked by hand -- with the number of problems
3124
    # I've seen in the HP assembler I don't completely trust it.
3125
    #
3126
    # Instead of having a variable for each match string just increment the
3127
    # total number of matches seen.  That's simpler when testing large numbers
3128
    # of instructions (as these tests to).
3129
    while 1 {
3130
        expect {
3131
            -re "^ +\[0-9\]+ 0000 30A0400A\[^\n\]*\n"   { set x [expr $x+1] }
3132
            -re "^ +\[0-9\]+ 0004 30A0480A\[^\n\]*\n"   { set x [expr $x+1] }
3133
            -re "^ +\[0-9\]+ 0008 30A0580A\[^\n\]*\n"   { set x [expr $x+1] }
3134
            -re "^ +\[0-9\]+ 000c 32804018\[^\n\]*\n"   { set x [expr $x+1] }
3135
            -re "^ +\[0-9\]+ 0010 32804818\[^\n\]*\n"   { set x [expr $x+1] }
3136
            -re "^ +\[0-9\]+ 0014 30A0600A\[^\n\]*\n"   { set x [expr $x+1] }
3137
            -re "^ +\[0-9\]+ 0018 30A0680A\[^\n\]*\n"   { set x [expr $x+1] }
3138
            -re "^ +\[0-9\]+ 001c 30A0780A\[^\n\]*\n"   { set x [expr $x+1] }
3139
            -re "^ +\[0-9\]+ 0020 32806018\[^\n\]*\n"   { set x [expr $x+1] }
3140
            -re "^ +\[0-9\]+ 0024 32806818\[^\n\]*\n"   { set x [expr $x+1] }
3141
            -re "^ +\[0-9\]+ 0028 30A0800A\[^\n\]*\n"   { set x [expr $x+1] }
3142
            -re "^ +\[0-9\]+ 002c 30A0880A\[^\n\]*\n"   { set x [expr $x+1] }
3143
            -re "^ +\[0-9\]+ 0030 30A0980A\[^\n\]*\n"   { set x [expr $x+1] }
3144
            -re "^ +\[0-9\]+ 0034 32808018\[^\n\]*\n"   { set x [expr $x+1] }
3145
            -re "^ +\[0-9\]+ 0038 32808818\[^\n\]*\n"   { set x [expr $x+1] }
3146
            -re "^ +\[0-9\]+ 003c 30A0A00A\[^\n\]*\n"   { set x [expr $x+1] }
3147
            -re "^ +\[0-9\]+ 0040 30A0A80A\[^\n\]*\n"   { set x [expr $x+1] }
3148
            -re "^ +\[0-9\]+ 0044 30A0B80A\[^\n\]*\n"   { set x [expr $x+1] }
3149
            -re "^ +\[0-9\]+ 0048 3280A018\[^\n\]*\n"   { set x [expr $x+1] }
3150
            -re "^ +\[0-9\]+ 004c 3280A818\[^\n\]*\n"   { set x [expr $x+1] }
3151
            -re "^ +\[0-9\]+ 0050 3088060C\[^\n\]*\n"   { set x [expr $x+1] }
3152
            -re "^ +\[0-9\]+ 0054 30880E0C\[^\n\]*\n"   { set x [expr $x+1] }
3153
            -re "^ +\[0-9\]+ 0058 30881E0C\[^\n\]*\n"   { set x [expr $x+1] }
3154
            -re "^ +\[0-9\]+ 005c 3298061C\[^\n\]*\n"   { set x [expr $x+1] }
3155
            -re "^ +\[0-9\]+ 0060 32980E1C\[^\n\]*\n"   { set x [expr $x+1] }
3156
            -re "^ +\[0-9\]+ 0064 32981E1C\[^\n\]*\n"   { set x [expr $x+1] }
3157
            -re "^ +\[0-9\]+ 0068 3088260C\[^\n\]*\n"   { set x [expr $x+1] }
3158
            -re "^ +\[0-9\]+ 006c 30882E0C\[^\n\]*\n"   { set x [expr $x+1] }
3159
            -re "^ +\[0-9\]+ 0070 30883E0C\[^\n\]*\n"   { set x [expr $x+1] }
3160
            -re "^ +\[0-9\]+ 0074 3298261C\[^\n\]*\n"   { set x [expr $x+1] }
3161
            -re "^ +\[0-9\]+ 0078 32982E1C\[^\n\]*\n"   { set x [expr $x+1] }
3162
            -re "^ +\[0-9\]+ 007c 32983E1C\[^\n\]*\n"   { set x [expr $x+1] }
3163
            -re "^ +\[0-9\]+ 0080 3088460C\[^\n\]*\n"   { set x [expr $x+1] }
3164
            -re "^ +\[0-9\]+ 0084 30884E0C\[^\n\]*\n"   { set x [expr $x+1] }
3165
            -re "^ +\[0-9\]+ 0088 30885E0C\[^\n\]*\n"   { set x [expr $x+1] }
3166
            -re "^ +\[0-9\]+ 008c 3298461C\[^\n\]*\n"   { set x [expr $x+1] }
3167
            -re "^ +\[0-9\]+ 0090 32984E1C\[^\n\]*\n"   { set x [expr $x+1] }
3168
            -re "^ +\[0-9\]+ 0094 32985E1C\[^\n\]*\n"   { set x [expr $x+1] }
3169
            -re "^ +\[0-9\]+ 0098 3088660C\[^\n\]*\n"   { set x [expr $x+1] }
3170
            -re "^ +\[0-9\]+ 009c 30886E0C\[^\n\]*\n"   { set x [expr $x+1] }
3171
            -re "^ +\[0-9\]+ 00a0 30887E0C\[^\n\]*\n"   { set x [expr $x+1] }
3172
            -re "^ +\[0-9\]+ 00a4 3298661C\[^\n\]*\n"   { set x [expr $x+1] }
3173
            -re "^ +\[0-9\]+ 00a8 32986E1C\[^\n\]*\n"   { set x [expr $x+1] }
3174
            -re "^ +\[0-9\]+ 00ac 32987E1C\[^\n\]*\n"   { set x [expr $x+1] }
3175
            -re "^ +\[0-9\]+ 00b0 3088860C\[^\n\]*\n"   { set x [expr $x+1] }
3176
            -re "^ +\[0-9\]+ 00b4 30888E0C\[^\n\]*\n"   { set x [expr $x+1] }
3177
            -re "^ +\[0-9\]+ 00b8 30889E0C\[^\n\]*\n"   { set x [expr $x+1] }
3178
            -re "^ +\[0-9\]+ 00bc 3298861C\[^\n\]*\n"   { set x [expr $x+1] }
3179
            -re "^ +\[0-9\]+ 00c0 32988E1C\[^\n\]*\n"   { set x [expr $x+1] }
3180
            -re "^ +\[0-9\]+ 00c4 32989E1C\[^\n\]*\n"   { set x [expr $x+1] }
3181
            -re "^ +\[0-9\]+ 00c8 180120E2\[^\n\]*\n"   { set x [expr $x+1] }
3182
            -re "^ +\[0-9\]+ 00cc 1A11A4D2\[^\n\]*\n"   { set x [expr $x+1] }
3183
            -re "^ +\[0-9\]+ 00d0 980120E2\[^\n\]*\n"   { set x [expr $x+1] }
3184
            -re "^ +\[0-9\]+ 00d4 9A11A4D2\[^\n\]*\n"   { set x [expr $x+1] }
3185
            -re "^ +\[0-9\]+ 00d8 38854706\[^\n\]*\n"   { set x [expr $x+1] }
3186
            -re "\[^\n\]*\n"                            { }
3187
            timeout                             { perror "timeout\n"; break }
3188
            eof                                 { break }
3189
        }
3190
    }
3191
 
3192
    # This was intended to do any cleanup necessary.  It kinda looks like it
3193
    # isn't needed, but just in case, please keep it in for now.
3194
    gas_finish
3195
 
3196
    # Did we find what we were looking for?  If not, flunk it.
3197
    if [expr $x==55] then { pass $testname } else { fail $testname }
3198
}
3199
 
3200
proc do_fp_comp2 {} {
3201
    set testname "fp_comp2.s: fp_comp2 tests"
3202
    set x 0
3203
 
3204
    gas_start "fp_comp2.s" "-al"
3205
 
3206
    # Check the assembled instruction against a table built by the HP assembler
3207
    # Any differences should be checked by hand -- with the number of problems
3208
    # I've seen in the HP assembler I don't completely trust it.
3209
    #
3210
    # Instead of having a variable for each match string just increment the
3211
    # total number of matches seen.  That's simpler when testing large numbers
3212
    # of instructions (as these tests to).
3213
    while 1 {
3214
        expect {
3215
            -re "^ +\[0-9\]+ 0000 B8AA638E\[^\n\]*\n"   { set x [expr $x+1] }
3216
            -re "^ +\[0-9\]+ 0004 B8AA6A0E\[^\n\]*\n"   { set x [expr $x+1] }
3217
            -re "^ +\[0-9\]+ 0008 BA5B2595\[^\n\]*\n"   { set x [expr $x+1] }
3218
            -re "^ +\[0-9\]+ 000c BA5B2C15\[^\n\]*\n"   { set x [expr $x+1] }
3219
            -re "^ +\[0-9\]+ 0010 B8AA63AE\[^\n\]*\n"   { set x [expr $x+1] }
3220
            -re "^ +\[0-9\]+ 0014 B8AA6A2E\[^\n\]*\n"   { set x [expr $x+1] }
3221
            -re "^ +\[0-9\]+ 0018 BA5B25B5\[^\n\]*\n"   { set x [expr $x+1] }
3222
            -re "^ +\[0-9\]+ 001c BA5B2C35\[^\n\]*\n"   { set x [expr $x+1] }
3223
            -re "^ +\[0-9\]+ 0020 38A0C04A\[^\n\]*\n"   { set x [expr $x+1] }
3224
            -re "^ +\[0-9\]+ 0024 30A0C80A\[^\n\]*\n"   { set x [expr $x+1] }
3225
            -re "^ +\[0-9\]+ 0028 30A0D80A\[^\n\]*\n"   { set x [expr $x+1] }
3226
            -re "^ +\[0-9\]+ 002c 3A80C098\[^\n\]*\n"   { set x [expr $x+1] }
3227
            -re "^ +\[0-9\]+ 0030 3280C818\[^\n\]*\n"   { set x [expr $x+1] }
3228
            -re "^ +\[0-9\]+ 0034 38A0E04A\[^\n\]*\n"   { set x [expr $x+1] }
3229
            -re "^ +\[0-9\]+ 0038 30A0E80A\[^\n\]*\n"   { set x [expr $x+1] }
3230
            -re "^ +\[0-9\]+ 003c 30A0F80A\[^\n\]*\n"   { set x [expr $x+1] }
3231
            -re "^ +\[0-9\]+ 0040 3A80E098\[^\n\]*\n"   { set x [expr $x+1] }
3232
            -re "^ +\[0-9\]+ 0044 3280E818\[^\n\]*\n"   { set x [expr $x+1] }
3233
            -re "\[^\n\]*\n"                            { }
3234
            timeout                             { perror "timeout\n"; break }
3235
            eof                                 { break }
3236
        }
3237
    }
3238
 
3239
    # This was intended to do any cleanup necessary.  It kinda looks like it
3240
    # isn't needed, but just in case, please keep it in for now.
3241
    gas_finish
3242
 
3243
    # Did we find what we were looking for?  If not, flunk it.
3244
    if [expr $x==18] then { pass $testname } else { fail $testname }
3245
}
3246
 
3247
proc do_fp_conv {} {
3248
    set testname "fp_conv.s: fp_conv tests"
3249
    set x 0
3250
 
3251
    gas_start "fp_conv.s" "-al"
3252
 
3253
    # Check the assembled instruction against a table built by the HP assembler
3254
    # Any differences should be checked by hand -- with the number of problems
3255
    # I've seen in the HP assembler I don't completely trust it.
3256
    #
3257
    # Instead of having a variable for each match string just increment the
3258
    # total number of matches seen.  That's simpler when testing large numbers
3259
    # of instructions (as these tests to).
3260
    while 1 {
3261
        expect {
3262
            -re "^ +\[0-9\]+ 0000 30A0020A\[^\n\]*\n"   { set x [expr $x+1] }
3263
            -re "^ +\[0-9\]+ 0004 30A0220A\[^\n\]*\n"   { set x [expr $x+1] }
3264
            -re "^ +\[0-9\]+ 0008 30A0620A\[^\n\]*\n"   { set x [expr $x+1] }
3265
            -re "^ +\[0-9\]+ 000c 30A00A0A\[^\n\]*\n"   { set x [expr $x+1] }
3266
            -re "^ +\[0-9\]+ 0010 30A02A0A\[^\n\]*\n"   { set x [expr $x+1] }
3267
            -re "^ +\[0-9\]+ 0014 30A06A0A\[^\n\]*\n"   { set x [expr $x+1] }
3268
            -re "^ +\[0-9\]+ 0018 30A01A0A\[^\n\]*\n"   { set x [expr $x+1] }
3269
            -re "^ +\[0-9\]+ 001c 30A03A0A\[^\n\]*\n"   { set x [expr $x+1] }
3270
            -re "^ +\[0-9\]+ 0020 30A07A0A\[^\n\]*\n"   { set x [expr $x+1] }
3271
            -re "^ +\[0-9\]+ 0024 32800218\[^\n\]*\n"   { set x [expr $x+1] }
3272
            -re "^ +\[0-9\]+ 0028 32802218\[^\n\]*\n"   { set x [expr $x+1] }
3273
            -re "^ +\[0-9\]+ 002c 32806218\[^\n\]*\n"   { set x [expr $x+1] }
3274
            -re "^ +\[0-9\]+ 0030 32800A18\[^\n\]*\n"   { set x [expr $x+1] }
3275
            -re "^ +\[0-9\]+ 0034 32802A18\[^\n\]*\n"   { set x [expr $x+1] }
3276
            -re "^ +\[0-9\]+ 0038 32806A18\[^\n\]*\n"   { set x [expr $x+1] }
3277
            -re "^ +\[0-9\]+ 003c 32801A18\[^\n\]*\n"   { set x [expr $x+1] }
3278
            -re "^ +\[0-9\]+ 0040 32803A18\[^\n\]*\n"   { set x [expr $x+1] }
3279
            -re "^ +\[0-9\]+ 0044 32807A18\[^\n\]*\n"   { set x [expr $x+1] }
3280
            -re "^ +\[0-9\]+ 0048 30A0820A\[^\n\]*\n"   { set x [expr $x+1] }
3281
            -re "^ +\[0-9\]+ 004c 30A0A20A\[^\n\]*\n"   { set x [expr $x+1] }
3282
            -re "^ +\[0-9\]+ 0050 30A0E20A\[^\n\]*\n"   { set x [expr $x+1] }
3283
            -re "^ +\[0-9\]+ 0054 30A08A0A\[^\n\]*\n"   { set x [expr $x+1] }
3284
            -re "^ +\[0-9\]+ 0058 30A0AA0A\[^\n\]*\n"   { set x [expr $x+1] }
3285
            -re "^ +\[0-9\]+ 005c 30A0EA0A\[^\n\]*\n"   { set x [expr $x+1] }
3286
            -re "^ +\[0-9\]+ 0060 30A09A0A\[^\n\]*\n"   { set x [expr $x+1] }
3287
            -re "^ +\[0-9\]+ 0064 30A0BA0A\[^\n\]*\n"   { set x [expr $x+1] }
3288
            -re "^ +\[0-9\]+ 0068 30A0FA0A\[^\n\]*\n"   { set x [expr $x+1] }
3289
            -re "^ +\[0-9\]+ 006c 32808218\[^\n\]*\n"   { set x [expr $x+1] }
3290
            -re "^ +\[0-9\]+ 0070 3280A218\[^\n\]*\n"   { set x [expr $x+1] }
3291
            -re "^ +\[0-9\]+ 0074 3280E218\[^\n\]*\n"   { set x [expr $x+1] }
3292
            -re "^ +\[0-9\]+ 0078 32808A18\[^\n\]*\n"   { set x [expr $x+1] }
3293
            -re "^ +\[0-9\]+ 007c 3280AA18\[^\n\]*\n"   { set x [expr $x+1] }
3294
            -re "^ +\[0-9\]+ 0080 3280EA18\[^\n\]*\n"   { set x [expr $x+1] }
3295
            -re "^ +\[0-9\]+ 0084 32809A18\[^\n\]*\n"   { set x [expr $x+1] }
3296
            -re "^ +\[0-9\]+ 0088 3280BA18\[^\n\]*\n"   { set x [expr $x+1] }
3297
            -re "^ +\[0-9\]+ 008c 3280FA18\[^\n\]*\n"   { set x [expr $x+1] }
3298
            -re "^ +\[0-9\]+ 0090 30A1020A\[^\n\]*\n"   { set x [expr $x+1] }
3299
            -re "^ +\[0-9\]+ 0094 30A1220A\[^\n\]*\n"   { set x [expr $x+1] }
3300
            -re "^ +\[0-9\]+ 0098 30A1620A\[^\n\]*\n"   { set x [expr $x+1] }
3301
            -re "^ +\[0-9\]+ 009c 30A10A0A\[^\n\]*\n"   { set x [expr $x+1] }
3302
            -re "^ +\[0-9\]+ 00a0 30A12A0A\[^\n\]*\n"   { set x [expr $x+1] }
3303
            -re "^ +\[0-9\]+ 00a4 30A16A0A\[^\n\]*\n"   { set x [expr $x+1] }
3304
            -re "^ +\[0-9\]+ 00a8 30A11A0A\[^\n\]*\n"   { set x [expr $x+1] }
3305
            -re "^ +\[0-9\]+ 00ac 30A13A0A\[^\n\]*\n"   { set x [expr $x+1] }
3306
            -re "^ +\[0-9\]+ 00b0 30A17A0A\[^\n\]*\n"   { set x [expr $x+1] }
3307
            -re "^ +\[0-9\]+ 00b4 32810218\[^\n\]*\n"   { set x [expr $x+1] }
3308
            -re "^ +\[0-9\]+ 00b8 32812218\[^\n\]*\n"   { set x [expr $x+1] }
3309
            -re "^ +\[0-9\]+ 00bc 32816218\[^\n\]*\n"   { set x [expr $x+1] }
3310
            -re "^ +\[0-9\]+ 00c0 32810A18\[^\n\]*\n"   { set x [expr $x+1] }
3311
            -re "^ +\[0-9\]+ 00c4 32812A18\[^\n\]*\n"   { set x [expr $x+1] }
3312
            -re "^ +\[0-9\]+ 00c8 32816A18\[^\n\]*\n"   { set x [expr $x+1] }
3313
            -re "^ +\[0-9\]+ 00cc 32811A18\[^\n\]*\n"   { set x [expr $x+1] }
3314
            -re "^ +\[0-9\]+ 00d0 32813A18\[^\n\]*\n"   { set x [expr $x+1] }
3315
            -re "^ +\[0-9\]+ 00d4 32817A18\[^\n\]*\n"   { set x [expr $x+1] }
3316
            -re "^ +\[0-9\]+ 00d8 30A1820A\[^\n\]*\n"   { set x [expr $x+1] }
3317
            -re "^ +\[0-9\]+ 00dc 30A1A20A\[^\n\]*\n"   { set x [expr $x+1] }
3318
            -re "^ +\[0-9\]+ 00e0 30A1E20A\[^\n\]*\n"   { set x [expr $x+1] }
3319
            -re "^ +\[0-9\]+ 00e4 30A18A0A\[^\n\]*\n"   { set x [expr $x+1] }
3320
            -re "^ +\[0-9\]+ 00e8 30A1AA0A\[^\n\]*\n"   { set x [expr $x+1] }
3321
            -re "^ +\[0-9\]+ 00ec 30A1EA0A\[^\n\]*\n"   { set x [expr $x+1] }
3322
            -re "^ +\[0-9\]+ 00f0 30A19A0A\[^\n\]*\n"   { set x [expr $x+1] }
3323
            -re "^ +\[0-9\]+ 00f4 30A1BA0A\[^\n\]*\n"   { set x [expr $x+1] }
3324
            -re "^ +\[0-9\]+ 00f8 30A1FA0A\[^\n\]*\n"   { set x [expr $x+1] }
3325
            -re "^ +\[0-9\]+ 00fc 32818218\[^\n\]*\n"   { set x [expr $x+1] }
3326
            -re "^ +\[0-9\]+ 0100 3281A218\[^\n\]*\n"   { set x [expr $x+1] }
3327
            -re "^ +\[0-9\]+ 0104 3281E218\[^\n\]*\n"   { set x [expr $x+1] }
3328
            -re "^ +\[0-9\]+ 0108 32818A18\[^\n\]*\n"   { set x [expr $x+1] }
3329
            -re "^ +\[0-9\]+ 010c 3281AA18\[^\n\]*\n"   { set x [expr $x+1] }
3330
            -re "^ +\[0-9\]+ 0110 3281EA18\[^\n\]*\n"   { set x [expr $x+1] }
3331
            -re "^ +\[0-9\]+ 0114 32819A18\[^\n\]*\n"   { set x [expr $x+1] }
3332
            -re "^ +\[0-9\]+ 0118 3281BA18\[^\n\]*\n"   { set x [expr $x+1] }
3333
            -re "^ +\[0-9\]+ 011c 3281FA18\[^\n\]*\n"   { set x [expr $x+1] }
3334
            -re "\[^\n\]*\n"                            { }
3335
            timeout                             { perror "timeout\n"; break }
3336
            eof                                 { break }
3337
        }
3338
    }
3339
 
3340
    # This was intended to do any cleanup necessary.  It kinda looks like it
3341
    # isn't needed, but just in case, please keep it in for now.
3342
    gas_finish
3343
 
3344
    # Did we find what we were looking for?  If not, flunk it.
3345
    if [expr $x==72] then { pass $testname } else { fail $testname }
3346
}
3347
 
3348
proc do_fp_fcmp {} {
3349
    set testname "fp_fcmp.s: fp_fcmp tests"
3350
    set x 0
3351
 
3352
    gas_start "fp_fcmp.s" "-al"
3353
 
3354
    # Check the assembled instruction against a table built by the HP assembler
3355
    # Any differences should be checked by hand -- with the number of problems
3356
    # I've seen in the HP assembler I don't completely trust it.
3357
    #
3358
    # Instead of having a variable for each match string just increment the
3359
    # total number of matches seen.  That's simpler when testing large numbers
3360
    # of instructions (as these tests to).
3361
    while 1 {
3362
        expect {
3363
            -re "^ +\[0-9\]+ 0000 30850400\[^\n\]*\n"   {set x [expr $x+1] }
3364
            -re "^ +\[0-9\]+ 0004 30850401\[^\n\]*\n"   {set x [expr $x+1] }
3365
            -re "^ +\[0-9\]+ 0008 30850402\[^\n\]*\n"   {set x [expr $x+1] }
3366
            -re "^ +\[0-9\]+ 000c 30850403\[^\n\]*\n"   {set x [expr $x+1] }
3367
            -re "^ +\[0-9\]+ 0010 30850404\[^\n\]*\n"   {set x [expr $x+1] }
3368
            -re "^ +\[0-9\]+ 0014 30850405\[^\n\]*\n"   {set x [expr $x+1] }
3369
            -re "^ +\[0-9\]+ 0018 30850406\[^\n\]*\n"   {set x [expr $x+1] }
3370
            -re "^ +\[0-9\]+ 001c 30850407\[^\n\]*\n"   {set x [expr $x+1] }
3371
            -re "^ +\[0-9\]+ 0020 30850408\[^\n\]*\n"   {set x [expr $x+1] }
3372
            -re "^ +\[0-9\]+ 0024 30850409\[^\n\]*\n"   {set x [expr $x+1] }
3373
            -re "^ +\[0-9\]+ 0028 3085040A\[^\n\]*\n"   {set x [expr $x+1] }
3374
            -re "^ +\[0-9\]+ 002c 3085040B\[^\n\]*\n"   {set x [expr $x+1] }
3375
            -re "^ +\[0-9\]+ 0030 3085040C\[^\n\]*\n"   {set x [expr $x+1] }
3376
            -re "^ +\[0-9\]+ 0034 3085040D\[^\n\]*\n"   {set x [expr $x+1] }
3377
            -re "^ +\[0-9\]+ 0038 3085040E\[^\n\]*\n"   {set x [expr $x+1] }
3378
            -re "^ +\[0-9\]+ 003c 3085040F\[^\n\]*\n"   {set x [expr $x+1] }
3379
            -re "^ +\[0-9\]+ 0040 30850410\[^\n\]*\n"   {set x [expr $x+1] }
3380
            -re "^ +\[0-9\]+ 0044 30850411\[^\n\]*\n"   {set x [expr $x+1] }
3381
            -re "^ +\[0-9\]+ 0048 30850412\[^\n\]*\n"   {set x [expr $x+1] }
3382
            -re "^ +\[0-9\]+ 004c 30850413\[^\n\]*\n"   {set x [expr $x+1] }
3383
            -re "^ +\[0-9\]+ 0050 30850414\[^\n\]*\n"   {set x [expr $x+1] }
3384
            -re "^ +\[0-9\]+ 0054 30850415\[^\n\]*\n"   {set x [expr $x+1] }
3385
            -re "^ +\[0-9\]+ 0058 30850416\[^\n\]*\n"   {set x [expr $x+1] }
3386
            -re "^ +\[0-9\]+ 005c 30850417\[^\n\]*\n"   {set x [expr $x+1] }
3387
            -re "^ +\[0-9\]+ 0060 30850418\[^\n\]*\n"   {set x [expr $x+1] }
3388
            -re "^ +\[0-9\]+ 0064 30850419\[^\n\]*\n"   {set x [expr $x+1] }
3389
            -re "^ +\[0-9\]+ 0068 3085041A\[^\n\]*\n"   {set x [expr $x+1] }
3390
            -re "^ +\[0-9\]+ 006c 3085041B\[^\n\]*\n"   {set x [expr $x+1] }
3391
            -re "^ +\[0-9\]+ 0070 3085041C\[^\n\]*\n"   {set x [expr $x+1] }
3392
            -re "^ +\[0-9\]+ 0074 3085041D\[^\n\]*\n"   {set x [expr $x+1] }
3393
            -re "^ +\[0-9\]+ 0078 3085041E\[^\n\]*\n"   {set x [expr $x+1] }
3394
            -re "^ +\[0-9\]+ 007c 3085041F\[^\n\]*\n"   {set x [expr $x+1] }
3395
            -re "^ +\[0-9\]+ 0080 30850C00\[^\n\]*\n"   {set x [expr $x+1] }
3396
            -re "^ +\[0-9\]+ 0084 30850C01\[^\n\]*\n"   {set x [expr $x+1] }
3397
            -re "^ +\[0-9\]+ 0088 30850C02\[^\n\]*\n"   {set x [expr $x+1] }
3398
            -re "^ +\[0-9\]+ 008c 30850C03\[^\n\]*\n"   {set x [expr $x+1] }
3399
            -re "^ +\[0-9\]+ 0090 30850C04\[^\n\]*\n"   {set x [expr $x+1] }
3400
            -re "^ +\[0-9\]+ 0094 30850C05\[^\n\]*\n"   {set x [expr $x+1] }
3401
            -re "^ +\[0-9\]+ 0098 30850C06\[^\n\]*\n"   {set x [expr $x+1] }
3402
            -re "^ +\[0-9\]+ 009c 30850C07\[^\n\]*\n"   {set x [expr $x+1] }
3403
            -re "^ +\[0-9\]+ 00a0 30850C08\[^\n\]*\n"   {set x [expr $x+1] }
3404
            -re "^ +\[0-9\]+ 00a4 30850C09\[^\n\]*\n"   {set x [expr $x+1] }
3405
            -re "^ +\[0-9\]+ 00a8 30850C0A\[^\n\]*\n"   {set x [expr $x+1] }
3406
            -re "^ +\[0-9\]+ 00ac 30850C0B\[^\n\]*\n"   {set x [expr $x+1] }
3407
            -re "^ +\[0-9\]+ 00b0 30850C0C\[^\n\]*\n"   {set x [expr $x+1] }
3408
            -re "^ +\[0-9\]+ 00b4 30850C0D\[^\n\]*\n"   {set x [expr $x+1] }
3409
            -re "^ +\[0-9\]+ 00b8 30850C0E\[^\n\]*\n"   {set x [expr $x+1] }
3410
            -re "^ +\[0-9\]+ 00bc 30850C0F\[^\n\]*\n"   {set x [expr $x+1] }
3411
            -re "^ +\[0-9\]+ 00c0 30850C10\[^\n\]*\n"   {set x [expr $x+1] }
3412
            -re "^ +\[0-9\]+ 00c4 30850C11\[^\n\]*\n"   {set x [expr $x+1] }
3413
            -re "^ +\[0-9\]+ 00c8 30850C12\[^\n\]*\n"   {set x [expr $x+1] }
3414
            -re "^ +\[0-9\]+ 00cc 30850C13\[^\n\]*\n"   {set x [expr $x+1] }
3415
            -re "^ +\[0-9\]+ 00d0 30850C14\[^\n\]*\n"   {set x [expr $x+1] }
3416
            -re "^ +\[0-9\]+ 00d4 30850C15\[^\n\]*\n"   {set x [expr $x+1] }
3417
            -re "^ +\[0-9\]+ 00d8 30850C16\[^\n\]*\n"   {set x [expr $x+1] }
3418
            -re "^ +\[0-9\]+ 00dc 30850C17\[^\n\]*\n"   {set x [expr $x+1] }
3419
            -re "^ +\[0-9\]+ 00e0 30850C18\[^\n\]*\n"   {set x [expr $x+1] }
3420
            -re "^ +\[0-9\]+ 00e4 30850C19\[^\n\]*\n"   {set x [expr $x+1] }
3421
            -re "^ +\[0-9\]+ 00e8 30850C1A\[^\n\]*\n"   {set x [expr $x+1] }
3422
            -re "^ +\[0-9\]+ 00ec 30850C1B\[^\n\]*\n"   {set x [expr $x+1] }
3423
            -re "^ +\[0-9\]+ 00f0 30850C1C\[^\n\]*\n"   {set x [expr $x+1] }
3424
            -re "^ +\[0-9\]+ 00f4 30850C1D\[^\n\]*\n"   {set x [expr $x+1] }
3425
            -re "^ +\[0-9\]+ 00f8 30850C1E\[^\n\]*\n"   {set x [expr $x+1] }
3426
            -re "^ +\[0-9\]+ 00fc 30850C1F\[^\n\]*\n"   {set x [expr $x+1] }
3427
            -re "^ +\[0-9\]+ 0100 30851C00\[^\n\]*\n"   {set x [expr $x+1] }
3428
            -re "^ +\[0-9\]+ 0104 30851C01\[^\n\]*\n"   {set x [expr $x+1] }
3429
            -re "^ +\[0-9\]+ 0108 30851C02\[^\n\]*\n"   {set x [expr $x+1] }
3430
            -re "^ +\[0-9\]+ 010c 30851C03\[^\n\]*\n"   {set x [expr $x+1] }
3431
            -re "^ +\[0-9\]+ 0110 30851C04\[^\n\]*\n"   {set x [expr $x+1] }
3432
            -re "^ +\[0-9\]+ 0114 30851C05\[^\n\]*\n"   {set x [expr $x+1] }
3433
            -re "^ +\[0-9\]+ 0118 30851C06\[^\n\]*\n"   {set x [expr $x+1] }
3434
            -re "^ +\[0-9\]+ 011c 30851C07\[^\n\]*\n"   {set x [expr $x+1] }
3435
            -re "^ +\[0-9\]+ 0120 30851C08\[^\n\]*\n"   {set x [expr $x+1] }
3436
            -re "^ +\[0-9\]+ 0124 30851C09\[^\n\]*\n"   {set x [expr $x+1] }
3437
            -re "^ +\[0-9\]+ 0128 30851C0A\[^\n\]*\n"   {set x [expr $x+1] }
3438
            -re "^ +\[0-9\]+ 012c 30851C0B\[^\n\]*\n"   {set x [expr $x+1] }
3439
            -re "^ +\[0-9\]+ 0130 30851C0C\[^\n\]*\n"   {set x [expr $x+1] }
3440
            -re "^ +\[0-9\]+ 0134 30851C0D\[^\n\]*\n"   {set x [expr $x+1] }
3441
            -re "^ +\[0-9\]+ 0138 30851C0E\[^\n\]*\n"   {set x [expr $x+1] }
3442
            -re "^ +\[0-9\]+ 013c 30851C0F\[^\n\]*\n"   {set x [expr $x+1] }
3443
            -re "^ +\[0-9\]+ 0140 30851C10\[^\n\]*\n"   {set x [expr $x+1] }
3444
            -re "^ +\[0-9\]+ 0144 30851C11\[^\n\]*\n"   {set x [expr $x+1] }
3445
            -re "^ +\[0-9\]+ 0148 30851C12\[^\n\]*\n"   {set x [expr $x+1] }
3446
            -re "^ +\[0-9\]+ 014c 30851C13\[^\n\]*\n"   {set x [expr $x+1] }
3447
            -re "^ +\[0-9\]+ 0150 30851C14\[^\n\]*\n"   {set x [expr $x+1] }
3448
            -re "^ +\[0-9\]+ 0154 30851C15\[^\n\]*\n"   {set x [expr $x+1] }
3449
            -re "^ +\[0-9\]+ 0158 30851C16\[^\n\]*\n"   {set x [expr $x+1] }
3450
            -re "^ +\[0-9\]+ 015c 30851C17\[^\n\]*\n"   {set x [expr $x+1] }
3451
            -re "^ +\[0-9\]+ 0160 30851C18\[^\n\]*\n"   {set x [expr $x+1] }
3452
            -re "^ +\[0-9\]+ 0164 30851C19\[^\n\]*\n"   {set x [expr $x+1] }
3453
            -re "^ +\[0-9\]+ 0168 30851C1A\[^\n\]*\n"   {set x [expr $x+1] }
3454
            -re "^ +\[0-9\]+ 016c 30851C1B\[^\n\]*\n"   {set x [expr $x+1] }
3455
            -re "^ +\[0-9\]+ 0170 30851C1C\[^\n\]*\n"   {set x [expr $x+1] }
3456
            -re "^ +\[0-9\]+ 0174 30851C1D\[^\n\]*\n"   {set x [expr $x+1] }
3457
            -re "^ +\[0-9\]+ 0178 30851C1E\[^\n\]*\n"   {set x [expr $x+1] }
3458
            -re "^ +\[0-9\]+ 017c 30851C1F\[^\n\]*\n"   {set x [expr $x+1] }
3459
            -re "\[^\n\]*\n"                            { }
3460
            timeout                             { perror "timeout\n"; break }
3461
            eof                                 { break }
3462
        }
3463
    }
3464
 
3465
    # This was intended to do any cleanup necessary.  It kinda looks like it
3466
    # isn't needed, but just in case, please keep it in for now.
3467
    gas_finish
3468
 
3469
    # Did we find what we were looking for?  If not, flunk it.
3470
    if [expr $x==96] then { pass $testname } else { fail $testname }
3471
}
3472
 
3473
proc do_media {} {
3474
    set testname "media.s: media tests"
3475
    set x 0
3476
 
3477
    gas_start "media.s" "-al"
3478
 
3479
    # Check the assembled instruction against a table built by the HP assembler
3480
    # Any differences should be checked by hand -- with the number of problems
3481
    # I've seen in the HP assembler I don't completely trust it.
3482
    #
3483
    # Instead of having a variable for each match string just increment the
3484
    # total number of matches seen.  That's simpler when testing large numbers
3485
    # of instructions (as these tests to).
3486
    while 1 {
3487
        expect {
3488
            -re "^ +\[0-9\]+ 0000 096703CC\[^\n\]*\n"   {set x [expr $x+1] }
3489
            -re "^ +\[0-9\]+ 0004 0967034C\[^\n\]*\n"   {set x [expr $x+1] }
3490
            -re "^ +\[0-9\]+ 0008 0967030C\[^\n\]*\n"   {set x [expr $x+1] }
3491
            -re "^ +\[0-9\]+ 000c 096702CC\[^\n\]*\n"   {set x [expr $x+1] }
3492
            -re "^ +\[0-9\]+ 0010 F8078B4B\[^\n\]*\n"   {set x [expr $x+1] }
3493
            -re "^ +\[0-9\]+ 0014 0967074C\[^\n\]*\n"   {set x [expr $x+1] }
3494
            -re "^ +\[0-9\]+ 0018 0967078C\[^\n\]*\n"   {set x [expr $x+1] }
3495
            -re "^ +\[0-9\]+ 001c 096707CC\[^\n\]*\n"   {set x [expr $x+1] }
3496
            -re "^ +\[0-9\]+ 0020 F8E0CF4B\[^\n\]*\n"   {set x [expr $x+1] }
3497
            -re "^ +\[0-9\]+ 0024 F8E0CF4B\[^\n\]*\n"   {set x [expr $x+1] }
3498
            -re "^ +\[0-9\]+ 0028 F8E0CB4B\[^\n\]*\n"   {set x [expr $x+1] }
3499
            -re "^ +\[0-9\]+ 002c 0967054C\[^\n\]*\n"   {set x [expr $x+1] }
3500
            -re "^ +\[0-9\]+ 0030 0967058C\[^\n\]*\n"   {set x [expr $x+1] }
3501
            -re "^ +\[0-9\]+ 0034 096705CC\[^\n\]*\n"   {set x [expr $x+1] }
3502
            -re "^ +\[0-9\]+ 0038 0ACE01C9\[^\n\]*\n"   {set x [expr $x+1] }
3503
            -re "^ +\[0-9\]+ 003c 0ACE0149\[^\n\]*\n"   {set x [expr $x+1] }
3504
            -re "^ +\[0-9\]+ 0040 0ACE0109\[^\n\]*\n"   {set x [expr $x+1] }
3505
            -re "^ +\[0-9\]+ 0044 FACE8409\[^\n\]*\n"   {set x [expr $x+1] }
3506
            -re "^ +\[0-9\]+ 0048 FACEC409\[^\n\]*\n"   {set x [expr $x+1] }
3507
            -re "^ +\[0-9\]+ 004c FACE8009\[^\n\]*\n"   {set x [expr $x+1] }
3508
            -re "^ +\[0-9\]+ 0050 FACEC009\[^\n\]*\n"   {set x [expr $x+1] }
3509
            -re "^ +\[0-9\]+ 0054 FAD60E49\[^\n\]*\n"   {set x [expr $x+1] }
3510
            -re "^ +\[0-9\]+ 0058 FAD64A89\[^\n\]*\n"   {set x [expr $x+1] }
3511
            -re "^ +\[0-9\]+ 005c FAD66309\[^\n\]*\n"   {set x [expr $x+1] }
3512
            -re "\[^\n\]*\n"                            { }
3513
            timeout                             { perror "timeout\n"; break }
3514
            eof                                 { break }
3515
        }
3516
    }
3517
 
3518
    # This was intended to do any cleanup necessary.  It kinda looks like it
3519
    # isn't needed, but just in case, please keep it in for now.
3520
    gas_finish
3521
 
3522
    # Did we find what we were looking for?  If not, flunk it.
3523
    if [expr $x==24] then { pass $testname } else { fail $testname }
3524
}
3525
 
3526
proc do_special {} {
3527
    set testname "special.s: special tests"
3528
    set x 0
3529
 
3530
    gas_start "special.s" "-al"
3531
 
3532
    # Check the assembled instruction against a table built by the HP assembler
3533
    # Any differences should be checked by hand -- with the number of problems
3534
    # I've seen in the HP assembler I don't completely trust it.
3535
    #
3536
    # Instead of having a variable for each match string just increment the
3537
    # total number of matches seen.  That's simpler when testing large numbers
3538
    # of instructions (as these tests to).
3539
    while 1 {
3540
        expect {
3541
            -re "^ +\[0-9\]+ 0000 04A41680\[^\n\]*\n"   { set x [expr $x+1] }
3542
            -re "^ +\[0-9\]+ 0004 04A416A0\[^\n\]*\n"   { set x [expr $x+1] }
3543
            -re "^ +\[0-9\]+ 0008 04A41A80\[^\n\]*\n"   { set x [expr $x+1] }
3544
            -re "^ +\[0-9\]+ 000c 04A41AA0\[^\n\]*\n"   { set x [expr $x+1] }
3545
            -re "\[^\n\]*\n"                            { }
3546
            timeout                             { perror "timeout\n"; break }
3547
            eof                                 { break }
3548
        }
3549
    }
3550
 
3551
    # This was intended to do any cleanup necessary.  It kinda looks like it
3552
    # isn't needed, but just in case, please keep it in for now.
3553
    gas_finish
3554
 
3555
    # Did we find what we were looking for?  If not, flunk it.
3556
    if [expr $x==4] then { pass $testname } else { fail $testname }
3557
}
3558
 
3559
proc do_perf {} {
3560
    set testname "perf.s: perf tests"
3561
    set x 0
3562
 
3563
    gas_start "perf.s" "-al"
3564
 
3565
    # Check the assembled instruction against a table built by the HP assembler
3566
    # Any differences should be checked by hand -- with the number of problems
3567
    # I've seen in the HP assembler I don't completely trust it.
3568
    #
3569
    # Instead of having a variable for each match string just increment the
3570
    # total number of matches seen.  That's simpler when testing large numbers
3571
    # of instructions (as these tests to).
3572
 
3573
    # The third one is questionable.  HP as doesn't generate what the book
3574
    # says.  It outputs the nullify flag at 30 instead.
3575
 
3576
    while 1 {
3577
        expect {
3578
            -re "^ +\[0-9\]+ 0000 30000680\[^\n\]*\n"   { set x [expr $x+1] }
3579
            -re "^ +\[0-9\]+ 0004 30000280\[^\n\]*\n"   { set x [expr $x+1] }
3580
            -re "^ +\[0-9\]+ 0008 300002A0\[^\n\]*\n"   { set x [expr $x+1] }
3581
            -re "\[^\n\]*\n"                            { }
3582
            timeout                             { perror "timeout\n"; break }
3583
            eof                                 { break }
3584
        }
3585
    }
3586
 
3587
    # This was intended to do any cleanup necessary.  It kinda looks like it
3588
    # isn't needed, but just in case, please keep it in for now.
3589
    gas_finish
3590
 
3591
    # Did we find what we were looking for?  If not, flunk it.
3592
    if [expr $x==3] then { pass $testname } else { fail $testname }
3593
}
3594
 
3595
proc do_spop {} {
3596
    set testname "spop.s: spop tests"
3597
    set x 0
3598
 
3599
    # This tickles a bug in the expression parser.
3600
    gas_start "spop.s" "-al"
3601
 
3602
    # Check the assembled instruction against a table built by the HP assembler
3603
    # Any differences should be checked by hand -- with the number of problems
3604
    # I've seen in the HP assembler I don't completely trust it.
3605
    #
3606
    # Instead of having a variable for each match string just increment the
3607
    # total number of matches seen.  That's simpler when testing large numbers
3608
    # of instructions (as these tests to).
3609
    while 1 {
3610
        expect {
3611
            -re "^ +\[0-9\]+ 0000 10000105\[^\n\]*\n"   { set x [expr $x+1] }
3612
            -re "^ +\[0-9\]+ 0004 10001913\[^\n\]*\n"   { set x [expr $x+1] }
3613
            -re "^ +\[0-9\]+ 0008 10000125\[^\n\]*\n"   { set x [expr $x+1] }
3614
            -re "^ +\[0-9\]+ 000c 10001933\[^\n\]*\n"   { set x [expr $x+1] }
3615
            -re "^ +\[0-9\]+ 0010 10002B05\[^\n\]*\n"   { set x [expr $x+1] }
3616
            -re "^ +\[0-9\]+ 0014 10039B05\[^\n\]*\n"   { set x [expr $x+1] }
3617
            -re "^ +\[0-9\]+ 0018 10002B25\[^\n\]*\n"   { set x [expr $x+1] }
3618
            -re "^ +\[0-9\]+ 001c 10039B25\[^\n\]*\n"   { set x [expr $x+1] }
3619
            -re "^ +\[0-9\]+ 0020 10A00505\[^\n\]*\n"   { set x [expr $x+1] }
3620
            -re "^ +\[0-9\]+ 0024 10A01D13\[^\n\]*\n"   { set x [expr $x+1] }
3621
            -re "^ +\[0-9\]+ 0028 10A00525\[^\n\]*\n"   { set x [expr $x+1] }
3622
            -re "^ +\[0-9\]+ 002c 10A01D33\[^\n\]*\n"   { set x [expr $x+1] }
3623
            -re "^ +\[0-9\]+ 0030 10C50705\[^\n\]*\n"   { set x [expr $x+1] }
3624
            -re "^ +\[0-9\]+ 0034 10C51F13\[^\n\]*\n"   { set x [expr $x+1] }
3625
            -re "^ +\[0-9\]+ 0038 10C50725\[^\n\]*\n"   { set x [expr $x+1] }
3626
            -re "^ +\[0-9\]+ 003c 10C51F33\[^\n\]*\n"   { set x [expr $x+1] }
3627
            -re "\[^\n\]*\n"                            { }
3628
            timeout                             { perror "timeout\n"; break }
3629
            eof                                 { break }
3630
        }
3631
    }
3632
 
3633
    # This was intended to do any cleanup necessary.  It kinda looks like it
3634
    # isn't needed, but just in case, please keep it in for now.
3635
    gas_finish
3636
 
3637
    # Did we find what we were looking for?  If not, flunk it.
3638
    if [expr $x==16] then { pass $testname } else { fail $testname }
3639
}
3640
 
3641
proc do_copr {} {
3642
    set testname "copr.s: copr tests"
3643
    set x 0
3644
 
3645
    gas_start "copr.s" "-al"
3646
 
3647
    # Check the assembled instruction against a table built by the HP assembler
3648
    # Any differences should be checked by hand -- with the number of problems
3649
    # I've seen in the HP assembler I don't completely trust it.
3650
    #
3651
    # Instead of having a variable for each match string just increment the
3652
    # total number of matches seen.  That's simpler when testing large numbers
3653
    # of instructions (as these tests to).
3654
    while 1 {
3655
        expect {
3656
            -re "^ +\[0-9\]+ 0000 30000105\[^\n\]*\n"   { set x [expr $x+1] }
3657
            -re "^ +\[0-9\]+ 0004 30000713\[^\n\]*\n"   { set x [expr $x+1] }
3658
            -re "^ +\[0-9\]+ 0008 30000125\[^\n\]*\n"   { set x [expr $x+1] }
3659
            -re "^ +\[0-9\]+ 000c 30000733\[^\n\]*\n"   { set x [expr $x+1] }
3660
            -re "\[^\n\]*\n"                            { }
3661
            timeout                             { perror "timeout\n"; break }
3662
            eof                                 { break }
3663
        }
3664
    }
3665
 
3666
    # This was intended to do any cleanup necessary.  It kinda looks like it
3667
    # isn't needed, but just in case, please keep it in for now.
3668
    gas_finish
3669
 
3670
    # Did we find what we were looking for?  If not, flunk it.
3671
    if [expr $x==4] then { pass $testname } else { fail $testname }
3672
}
3673
 
3674
proc do_coprmem {} {
3675
    set testname "coprmem.s: copr memory tests"
3676
    set x 0
3677
 
3678
    gas_start "coprmem.s" "-al"
3679
 
3680
    # Check the assembled instruction against a table built by the HP assembler
3681
    # Any differences should be checked by hand -- with the number of problems
3682
    # I've seen in the HP assembler I don't completely trust it.
3683
    #
3684
    # Instead of having a variable for each match string just increment the
3685
    # total number of matches seen.  That's simpler when testing large numbers
3686
    # of instructions (as these tests to).
3687
    while 1 {
3688
        expect {
3689
            -re "^ +\[0-9\]+ 0000 2485011A\[^\n\]*\n"   { set x [expr $x+1] }
3690
            -re "^ +\[0-9\]+ 0004 2485211A\[^\n\]*\n"   { set x [expr $x+1] }
3691
            -re "^ +\[0-9\]+ 0008 2485013A\[^\n\]*\n"   { set x [expr $x+1] }
3692
            -re "^ +\[0-9\]+ 000c 2485213A\[^\n\]*\n"   { set x [expr $x+1] }
3693
            -re "^ +\[0-9\]+ 0010 2C85011A\[^\n\]*\n"   { set x [expr $x+1] }
3694
            -re "^ +\[0-9\]+ 0014 2C85211A\[^\n\]*\n"   { set x [expr $x+1] }
3695
            -re "^ +\[0-9\]+ 0018 2C85013A\[^\n\]*\n"   { set x [expr $x+1] }
3696
            -re "^ +\[0-9\]+ 001c 2C85213A\[^\n\]*\n"   { set x [expr $x+1] }
3697
            -re "^ +\[0-9\]+ 0020 2485031A\[^\n\]*\n"   { set x [expr $x+1] }
3698
            -re "^ +\[0-9\]+ 0024 2485231A\[^\n\]*\n"   { set x [expr $x+1] }
3699
            -re "^ +\[0-9\]+ 0028 2485033A\[^\n\]*\n"   { set x [expr $x+1] }
3700
            -re "^ +\[0-9\]+ 002c 2485233A\[^\n\]*\n"   { set x [expr $x+1] }
3701
            -re "^ +\[0-9\]+ 0030 2C85031A\[^\n\]*\n"   { set x [expr $x+1] }
3702
            -re "^ +\[0-9\]+ 0034 2C85231A\[^\n\]*\n"   { set x [expr $x+1] }
3703
            -re "^ +\[0-9\]+ 0038 2C85033A\[^\n\]*\n"   { set x [expr $x+1] }
3704
            -re "^ +\[0-9\]+ 003c 2C85233A\[^\n\]*\n"   { set x [expr $x+1] }
3705
            -re "^ +\[0-9\]+ 0040 2480111A\[^\n\]*\n"   { set x [expr $x+1] }
3706
            -re "^ +\[0-9\]+ 0044 2480313A\[^\n\]*\n"   { set x [expr $x+1] }
3707
            -re "^ +\[0-9\]+ 0048 2480113A\[^\n\]*\n"   { set x [expr $x+1] }
3708
            -re "^ +\[0-9\]+ 004c 2C80111A\[^\n\]*\n"   { set x [expr $x+1] }
3709
            -re "^ +\[0-9\]+ 0050 2C80313A\[^\n\]*\n"   { set x [expr $x+1] }
3710
            -re "^ +\[0-9\]+ 0054 2C80113A\[^\n\]*\n"   { set x [expr $x+1] }
3711
            -re "^ +\[0-9\]+ 0058 2480131A\[^\n\]*\n"   { set x [expr $x+1] }
3712
            -re "^ +\[0-9\]+ 005c 2480333A\[^\n\]*\n"   { set x [expr $x+1] }
3713
            -re "^ +\[0-9\]+ 0060 2480133A\[^\n\]*\n"   { set x [expr $x+1] }
3714
            -re "^ +\[0-9\]+ 0064 2C80131A\[^\n\]*\n"   { set x [expr $x+1] }
3715
            -re "^ +\[0-9\]+ 0068 2C80333A\[^\n\]*\n"   { set x [expr $x+1] }
3716
            -re "^ +\[0-9\]+ 006c 2C80133A\[^\n\]*\n"   { set x [expr $x+1] }
3717
            -re "\[^\n\]*\n"                            { }
3718
            timeout                             { perror "timeout\n"; break }
3719
            eof                                 { break }
3720
        }
3721
    }
3722
 
3723
    # This was intended to do any cleanup necessary.  It kinda looks like it
3724
    # isn't needed, but just in case, please keep it in for now.
3725
    gas_finish
3726
 
3727
    # Did we find what we were looking for?  If not, flunk it.
3728
    if [expr $x==28] then { pass $testname } else { fail $testname }
3729
}
3730
 
3731
proc do_fmem_LR_tests {} {
3732
    set testname "fmemLRbug.s: LR register selection on fp mem instructions"
3733
    set x 0
3734
 
3735
    gas_start "fmemLRbug.s" "-al"
3736
 
3737
    # Make sure we correctly handle field selectors.
3738
    while 1 {
3739
        expect {
3740
            -re "^ +\[0-9\]+ 0000 27401246\[^\n\]*\n"   { set x [expr $x+1] }
3741
            -re "^ +\[0-9\]+ 0004 27481206\[^\n\]*\n"   { set x [expr $x+1] }
3742
            -re "^ +\[0-9\]+ 0008 27501206\[^\n\]*\n"   { set x [expr $x+1] }
3743
            -re "^ +\[0-9\]+ 000c 2F401206\[^\n\]*\n"   { set x [expr $x+1] }
3744
            -re "^ +\[0-9\]+ 0010 2F481206\[^\n\]*\n"   { set x [expr $x+1] }
3745
            -re "^ +\[0-9\]+ 0014 2F501206\[^\n\]*\n"   { set x [expr $x+1] }
3746
            -re "^ +\[0-9\]+ 0018 27401046\[^\n\]*\n"   { set x [expr $x+1] }
3747
            -re "^ +\[0-9\]+ 001c 27481006\[^\n\]*\n"   { set x [expr $x+1] }
3748
            -re "^ +\[0-9\]+ 0020 27501006\[^\n\]*\n"   { set x [expr $x+1] }
3749
            -re "^ +\[0-9\]+ 0024 2F401006\[^\n\]*\n"   { set x [expr $x+1] }
3750
            -re "^ +\[0-9\]+ 0028 2F481006\[^\n\]*\n"   { set x [expr $x+1] }
3751
            -re "^ +\[0-9\]+ 002c 2F501006\[^\n\]*\n"   { set x [expr $x+1] }
3752
            -re "^ +\[0-9\]+ 0030 27401246\[^\n\]*\n"   { set x [expr $x+1] }
3753
            -re "^ +\[0-9\]+ 0034 27481206\[^\n\]*\n"   { set x [expr $x+1] }
3754
            -re "^ +\[0-9\]+ 0038 27501206\[^\n\]*\n"   { set x [expr $x+1] }
3755
            -re "^ +\[0-9\]+ 003c 2F401206\[^\n\]*\n"   { set x [expr $x+1] }
3756
            -re "^ +\[0-9\]+ 0040 2F481206\[^\n\]*\n"   { set x [expr $x+1] }
3757
            -re "^ +\[0-9\]+ 0044 2F501206\[^\n\]*\n"   { set x [expr $x+1] }
3758
            -re "^ +\[0-9\]+ 0048 27401046\[^\n\]*\n"   { set x [expr $x+1] }
3759
            -re "^ +\[0-9\]+ 004c 27481006\[^\n\]*\n"   { set x [expr $x+1] }
3760
            -re "^ +\[0-9\]+ 0050 27501006\[^\n\]*\n"   { set x [expr $x+1] }
3761
            -re "^ +\[0-9\]+ 0054 2F401006\[^\n\]*\n"   { set x [expr $x+1] }
3762
            -re "^ +\[0-9\]+ 0058 2F481006\[^\n\]*\n"   { set x [expr $x+1] }
3763
            -re "^ +\[0-9\]+ 005c 2F501006\[^\n\]*\n"   { set x [expr $x+1] }
3764
            -re "^ +\[0-9\]+ 0060 27590246\[^\n\]*\n"   { set x [expr $x+1] }
3765
            -re "^ +\[0-9\]+ 0064 27590206\[^\n\]*\n"   { set x [expr $x+1] }
3766
            -re "^ +\[0-9\]+ 0068 27590206\[^\n\]*\n"   { set x [expr $x+1] }
3767
            -re "^ +\[0-9\]+ 006c 2F590206\[^\n\]*\n"   { set x [expr $x+1] }
3768
            -re "^ +\[0-9\]+ 0070 2F590206\[^\n\]*\n"   { set x [expr $x+1] }
3769
            -re "^ +\[0-9\]+ 0074 2F590206\[^\n\]*\n"   { set x [expr $x+1] }
3770
            -re "^ +\[0-9\]+ 0078 27590046\[^\n\]*\n"   { set x [expr $x+1] }
3771
            -re "^ +\[0-9\]+ 007c 27590006\[^\n\]*\n"   { set x [expr $x+1] }
3772
            -re "^ +\[0-9\]+ 0080 27590006\[^\n\]*\n"   { set x [expr $x+1] }
3773
            -re "^ +\[0-9\]+ 0084 2F590006\[^\n\]*\n"   { set x [expr $x+1] }
3774
            -re "^ +\[0-9\]+ 0088 2F590006\[^\n\]*\n"   { set x [expr $x+1] }
3775
            -re "^ +\[0-9\]+ 008c 2F590006\[^\n\]*\n"   { set x [expr $x+1] }
3776
            -re "^ +\[0-9\]+ 0090 27590246\[^\n\]*\n"   { set x [expr $x+1] }
3777
            -re "^ +\[0-9\]+ 0094 27590206\[^\n\]*\n"   { set x [expr $x+1] }
3778
            -re "^ +\[0-9\]+ 0098 27590206\[^\n\]*\n"   { set x [expr $x+1] }
3779
            -re "^ +\[0-9\]+ 009c 2F590206\[^\n\]*\n"   { set x [expr $x+1] }
3780
            -re "^ +\[0-9\]+ 00a0 2F590206\[^\n\]*\n"   { set x [expr $x+1] }
3781
            -re "^ +\[0-9\]+ 00a4 2F590206\[^\n\]*\n"   { set x [expr $x+1] }
3782
            -re "^ +\[0-9\]+ 00a8 27590046\[^\n\]*\n"   { set x [expr $x+1] }
3783
            -re "^ +\[0-9\]+ 00ac 27590006\[^\n\]*\n"   { set x [expr $x+1] }
3784
            -re "^ +\[0-9\]+ 00b0 27590006\[^\n\]*\n"   { set x [expr $x+1] }
3785
            -re "^ +\[0-9\]+ 00b4 2F590006\[^\n\]*\n"   { set x [expr $x+1] }
3786
            -re "^ +\[0-9\]+ 00b8 2F590006\[^\n\]*\n"   { set x [expr $x+1] }
3787
            -re "^ +\[0-9\]+ 00bc 2F590006\[^\n\]*\n"   { set x [expr $x+1] }
3788
            -re "^ +\[0-9\]+ 00c0 E840C000\[^\n\]*\n"   { set x [expr $x+1] }
3789
            -re "^ +\[0-9\]+ 00c4 08000240\[^\n\]*\n"   { set x [expr $x+1] }
3790
            -re "\[^\n\]*\n"                            { }
3791
            timeout                             { perror "timeout\n"; break }
3792
            eof                                 { break }
3793
        }
3794
    }
3795
 
3796
    # This was intended to do any cleanup necessary.  It kinda looks like it
3797
    # isn't needed, but just in case, please keep it in for now.
3798
    gas_finish
3799
 
3800
    # Did we find what we were looking for?  If not, flunk it.
3801
    if [expr $x==50] then { pass $testname } else { fail $testname }
3802
}
3803
 
3804
if [istarget hppa*-*-*] then {
3805
    # Test the basic instruction parser.
3806
    do_imem
3807
    do_immed
3808
    do_branch
3809
    do_add
3810
    do_add2
3811
    do_sh1add
3812
    do_sh2add
3813
    do_sh3add
3814
    do_shladd
3815
    do_shladd2
3816
    do_sub
3817
    do_sub2
3818
    do_ds
3819
    do_comclr
3820
    do_logical
3821
    do_unit
3822
    do_unit2
3823
    do_dcor
3824
    do_dcor2
3825
    do_addi
3826
    do_subi
3827
    do_shift
3828
    do_shift2
3829
    do_shift3
3830
    do_extract
3831
    do_extract2
3832
    do_extract3
3833
    do_deposit
3834
    do_deposit2
3835
    do_deposit3
3836
    do_system
3837
    do_system2
3838
    do_purge
3839
    do_purge2
3840
    do_fp_misc
3841
    do_fmem
3842
    do_fp_comp
3843
    do_fp_conv
3844
    do_fp_fcmp
3845
    do_special
3846
    do_perf
3847
    do_spop
3848
    do_copr
3849
    do_coprmem
3850
 
3851
    # The "weird.s" file from the gdb testsuite.  Simply verify it
3852
    # assembles.
3853
    gas_test "weird.s" "" "" "stabs parsing"
3854
 
3855
    # Test that we correctly assemble some FP memory tests which
3856
    # L/R register selects.  (Regression test for a bug Tege found).
3857
    do_fmem_LR_tests
3858
 
3859
    # PA2.0 tests
3860
    do_fp_comp2
3861
    do_branch2
3862
    do_media
3863
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.