1# Copyright (C) 1993-2016 Free Software Foundation, Inc.
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
16
17# Please email any bugs, comments, and/or additions to this file to:
18# dejagnu@gnu.org
19
20# Written by the Center for Software Science at the Univeristy of Utah
21# and by Cygnus Support.
22
23proc do_imem {} {
24    set testname "imem.s: integer memory loads and stores"
25    set x 0
26
27    gas_start "imem.s" "-al"
28
29    # Check the assembled instruction against a table built by the HP assembler
30    # Any differences should be checked by hand -- with the number of problems
31    # I've seen in the HP assembler I don't completely trust it.
32    #
33    # Instead of having a variable for each match string just increment the
34    # total number of matches seen.  That's simpler when testing large numbers
35    # of instructions (as these tests to).
36    while 1 {
37	expect {
38	    -re "^ +\[0-9\]+ 0000 489A0000\[^\n\]*\n"	{ set x [expr $x+1] }
39	    -re "^ +\[0-9\]+ 0000 0C80109A\[^\n\]*\n"	{ set x [expr $x+1] }
40	    -re "^ +\[0-9\]+ 0004 449A0000\[^\n\]*\n"	{ set x [expr $x+1] }
41	    -re "^ +\[0-9\]+ 0004 0C80105A\[^\n\]*\n"	{ set x [expr $x+1] }
42	    -re "^ +\[0-9\]+ 0008 409A0000\[^\n\]*\n"	{ set x [expr $x+1] }
43	    -re "^ +\[0-9\]+ 0008 0C80101A\[^\n\]*\n"	{ set x [expr $x+1] }
44	    -re "^ +\[0-9\]+ 000c 689A0000\[^\n\]*\n"	{ set x [expr $x+1] }
45	    -re "^ +\[0-9\]+ 000c 0C9A1280\[^\n\]*\n"	{ set x [expr $x+1] }
46	    -re "^ +\[0-9\]+ 0010 649A0000\[^\n\]*\n"	{ set x [expr $x+1] }
47	    -re "^ +\[0-9\]+ 0010 0C9A1240\[^\n\]*\n"	{ set x [expr $x+1] }
48	    -re "^ +\[0-9\]+ 0014 609A0000\[^\n\]*\n"	{ set x [expr $x+1] }
49	    -re "^ +\[0-9\]+ 0014 0C9A1200\[^\n\]*\n"	{ set x [expr $x+1] }
50	    -re "^ +\[0-9\]+ 0018 4C9A0000\[^\n\]*\n"	{ set x [expr $x+1] }
51	    -re "^ +\[0-9\]+ 001c 6C9A0000\[^\n\]*\n"	{ set x [expr $x+1] }
52	    -re "^ +\[0-9\]+ 0020 0C85009A\[^\n\]*\n"	{ set x [expr $x+1] }
53	    -re "^ +\[0-9\]+ 0024 0C85209A\[^\n\]*\n"	{ set x [expr $x+1] }
54	    -re "^ +\[0-9\]+ 0028 0C8500BA\[^\n\]*\n"	{ set x [expr $x+1] }
55	    -re "^ +\[0-9\]+ 002c 0C8520BA\[^\n\]*\n"	{ set x [expr $x+1] }
56	    -re "^ +\[0-9\]+ 0030 0C85005A\[^\n\]*\n"	{ set x [expr $x+1] }
57	    -re "^ +\[0-9\]+ 0034 0C85205A\[^\n\]*\n"	{ set x [expr $x+1] }
58	    -re "^ +\[0-9\]+ 0038 0C85007A\[^\n\]*\n"	{ set x [expr $x+1] }
59	    -re "^ +\[0-9\]+ 003c 0C85207A\[^\n\]*\n"	{ set x [expr $x+1] }
60	    -re "^ +\[0-9\]+ 0040 0C85001A\[^\n\]*\n"	{ set x [expr $x+1] }
61	    -re "^ +\[0-9\]+ 0044 0C85201A\[^\n\]*\n"	{ set x [expr $x+1] }
62	    -re "^ +\[0-9\]+ 0048 0C85003A\[^\n\]*\n"	{ set x [expr $x+1] }
63	    -re "^ +\[0-9\]+ 004c 0C85203A\[^\n\]*\n"	{ set x [expr $x+1] }
64	    -re "^ +\[0-9\]+ 0050 0C85019A\[^\n\]*\n"	{ set x [expr $x+1] }
65	    -re "^ +\[0-9\]+ 0054 0C85219A\[^\n\]*\n"	{ set x [expr $x+1] }
66	    -re "^ +\[0-9\]+ 0058 0C8501BA\[^\n\]*\n"	{ set x [expr $x+1] }
67	    -re "^ +\[0-9\]+ 005c 0C8521BA\[^\n\]*\n"	{ set x [expr $x+1] }
68	    -re "^ +\[0-9\]+ 0060 0C8501DA\[^\n\]*\n"	{ set x [expr $x+1] }
69	    -re "^ +\[0-9\]+ 0064 0C8521DA\[^\n\]*\n"	{ set x [expr $x+1] }
70	    -re "^ +\[0-9\]+ 0068 0C8501FA\[^\n\]*\n"	{ set x [expr $x+1] }
71	    -re "^ +\[0-9\]+ 006c 0C8521FA\[^\n\]*\n"	{ set x [expr $x+1] }
72	    -re "^ +\[0-9\]+ 0070 0C80109A\[^\n\]*\n"	{ set x [expr $x+1] }
73	    -re "^ +\[0-9\]+ 0074 0C8030BA\[^\n\]*\n"	{ set x [expr $x+1] }
74	    -re "^ +\[0-9\]+ 0078 0C8010BA\[^\n\]*\n"	{ set x [expr $x+1] }
75	    -re "^ +\[0-9\]+ 007c 0C80105A\[^\n\]*\n"	{ set x [expr $x+1] }
76	    -re "^ +\[0-9\]+ 0080 0C80307A\[^\n\]*\n"	{ set x [expr $x+1] }
77	    -re "^ +\[0-9\]+ 0084 0C80107A\[^\n\]*\n"	{ set x [expr $x+1] }
78	    -re "^ +\[0-9\]+ 0088 0C80101A\[^\n\]*\n"	{ set x [expr $x+1] }
79	    -re "^ +\[0-9\]+ 008c 0C80303A\[^\n\]*\n"	{ set x [expr $x+1] }
80	    -re "^ +\[0-9\]+ 0090 0C80103A\[^\n\]*\n"	{ set x [expr $x+1] }
81	    -re "^ +\[0-9\]+ 0094 0C80119A\[^\n\]*\n"	{ set x [expr $x+1] }
82	    -re "^ +\[0-9\]+ 0098 0C8031BA\[^\n\]*\n"	{ set x [expr $x+1] }
83	    -re "^ +\[0-9\]+ 009c 0C8011BA\[^\n\]*\n"	{ set x [expr $x+1] }
84	    -re "^ +\[0-9\]+ 00a0 0C8011DA\[^\n\]*\n"	{ set x [expr $x+1] }
85	    -re "^ +\[0-9\]+ 00a4 0C8031FA\[^\n\]*\n"	{ set x [expr $x+1] }
86	    -re "^ +\[0-9\]+ 00a8 0C8011FA\[^\n\]*\n"	{ set x [expr $x+1] }
87	    -re "^ +\[0-9\]+ 00ac 0C9A1280\[^\n\]*\n"	{ set x [expr $x+1] }
88	    -re "^ +\[0-9\]+ 00b0 0C9A32A0\[^\n\]*\n"	{ set x [expr $x+1] }
89	    -re "^ +\[0-9\]+ 00b4 0C9A12A0\[^\n\]*\n"	{ set x [expr $x+1] }
90	    -re "^ +\[0-9\]+ 00b8 0C9A1240\[^\n\]*\n"	{ set x [expr $x+1] }
91	    -re "^ +\[0-9\]+ 00bc 0C9A3260\[^\n\]*\n"	{ set x [expr $x+1] }
92	    -re "^ +\[0-9\]+ 00c0 0C9A1260\[^\n\]*\n"	{ set x [expr $x+1] }
93	    -re "^ +\[0-9\]+ 00c4 0C9A1200\[^\n\]*\n"	{ set x [expr $x+1] }
94	    -re "^ +\[0-9\]+ 00c8 0C9A3220\[^\n\]*\n"	{ set x [expr $x+1] }
95	    -re "^ +\[0-9\]+ 00cc 0C9A1220\[^\n\]*\n"	{ set x [expr $x+1] }
96	    -re "^ +\[0-9\]+ 00d0 0C9A1380\[^\n\]*\n"	{ set x [expr $x+1] }
97	    -re "^ +\[0-9\]+ 00d4 0C9A33A0\[^\n\]*\n"	{ set x [expr $x+1] }
98	    -re "^ +\[0-9\]+ 00d8 0C9A13A0\[^\n\]*\n"	{ set x [expr $x+1] }
99	    -re "^ +\[0-9\]+ 00dc 0C9A1300\[^\n\]*\n"	{ set x [expr $x+1] }
100	    -re "^ +\[0-9\]+ 00e0 0C9A1300\[^\n\]*\n"	{ set x [expr $x+1] }
101	    -re "^ +\[0-9\]+ 00e4 0C9A3300\[^\n\]*\n"	{ set x [expr $x+1] }
102	    -re "^ +\[0-9\]+ 00e8 0C9A1320\[^\n\]*\n"	{ set x [expr $x+1] }
103	    -re "^ +\[0-9\]+ 00ec 0C9A3320\[^\n\]*\n"	{ set x [expr $x+1] }
104	    -re "\[^\n\]*\n"				{ }
105	    timeout				{ perror "timeout\n"; break }
106	    eof					{ break }
107	}
108    }
109
110    # This was intended to do any cleanup necessary.  It kinda looks like it
111    # isn't needed, but just in case, please keep it in for now.
112    gas_finish
113
114    # Did we find what we were looking for?  If not, flunk it.
115    if [expr $x==60] then { pass $testname } else { fail $testname }
116}
117
118proc do_immed {} {
119    set testname "immed.s: immediate tests"
120    set x 0
121
122    gas_start "immed.s" "-al"
123
124    # Check the assembled instruction against a table built by the HP assembler
125    # Any differences should be checked by hand -- with the number of problems
126    # I've seen in the HP assembler I don't completely trust it.
127    #
128    # Instead of having a variable for each match string just increment the
129    # total number of matches seen.  That's simpler when testing large numbers
130    # of instructions (as these tests to).
131    while 1 {
132	expect {
133	    -re "^ +\[0-9\]+ 0000 375A000A\[^\n\]*\n"	{ set x [expr $x+1] }
134	    -re "^ +\[0-9\]+ 0004 234DFBD5\[^\n\]*\n"	{ set x [expr $x+1] }
135	    -re "^ +\[0-9\]+ 0008 28ADFBD5\[^\n\]*\n"	{ set x [expr $x+1] }
136	    -re "\[^\n\]*\n"				{ }
137	    timeout				{ perror "timeout\n"; break }
138	    eof					{ break }
139	}
140    }
141
142    # This was intended to do any cleanup necessary.  It kinda looks like it
143    # isn't needed, but just in case, please keep it in for now.
144    gas_finish
145
146    # Did we find what we were looking for?  If not, flunk it.
147    if [expr $x==3] then { pass $testname } else { fail $testname }
148}
149
150proc do_branch {} {
151    set testname "branch.s: branch tests"
152    set x 0
153
154    gas_start "branch.s" "-al"
155
156    # Check the assembled instruction against a table built by the HP assembler
157    # Any differences should be checked by hand -- with the number of problems
158    # I've seen in the HP assembler I don't completely trust it.
159    #
160    # Instead of having a variable for each match string just increment the
161    # total number of matches seen.  That's simpler when testing large numbers
162    # of instructions (as these tests to).
163    while 1 {
164	expect {
165	    -re "^ +\[0-9\]+ 0000 E85F1FF5\[^\n\]*\n"	{ set x [expr $x+1] }
166	    -re "^ +\[0-9\]+ 0004 E85F1FEF\[^\n\]*\n"	{ set x [expr $x+1] }
167	    -re "^ +\[0-9\]+ 0008 E81F1FE5\[^\n\]*\n"	{ set x [expr $x+1] }
168	    -re "^ +\[0-9\]+ 000c E81F1FDF\[^\n\]*\n"	{ set x [expr $x+1] }
169	    -re "^ +\[0-9\]+ 0010 E85F3FD5\[^\n\]*\n"	{ set x [expr $x+1] }
170	    -re "^ +\[0-9\]+ 0014 E85F3FCF\[^\n\]*\n"	{ set x [expr $x+1] }
171	    -re "^ +\[0-9\]+ 0018 E8444000\[^\n\]*\n"	{ set x [expr $x+1] }
172	    -re "^ +\[0-9\]+ 001c E8444002\[^\n\]*\n"	{ set x [expr $x+1] }
173	    -re "^ +\[0-9\]+ 0020 E8044000\[^\n\]*\n"	{ set x [expr $x+1] }
174	    -re "^ +\[0-9\]+ 0024 E8044002\[^\n\]*\n"	{ set x [expr $x+1] }
175	    -re "^ +\[0-9\]+ 0028 E840C000\[^\n\]*\n"	{ set x [expr $x+1] }
176	    -re "^ +\[0-9\]+ 002c E840C002\[^\n\]*\n"	{ set x [expr $x+1] }
177	    -re "^ +\[0-9\]+ 0030 E040446C\[^\n\]*\n"	{ set x [expr $x+1] }
178	    -re "^ +\[0-9\]+ 0034 E040446E\[^\n\]*\n"	{ set x [expr $x+1] }
179	    -re "^ +\[0-9\]+ 0038 E440446C\[^\n\]*\n"	{ set x [expr $x+1] }
180	    -re "^ +\[0-9\]+ 003c E440446E\[^\n\]*\n"	{ set x [expr $x+1] }
181	    -re "^ +\[0-9\]+ 0040 CB441FF5\[^\n\]*\n"	{ set x [expr $x+1] }
182	    -re "^ +\[0-9\]+ 0044 CB443FED\[^\n\]*\n"	{ set x [expr $x+1] }
183	    -re "^ +\[0-9\]+ 0048 CB445FE5\[^\n\]*\n"	{ set x [expr $x+1] }
184	    -re "^ +\[0-9\]+ 004c CB447FDD\[^\n\]*\n"	{ set x [expr $x+1] }
185	    -re "^ +\[0-9\]+ 0050 CB449FD5\[^\n\]*\n"	{ set x [expr $x+1] }
186	    -re "^ +\[0-9\]+ 0054 CB44BFCD\[^\n\]*\n"	{ set x [expr $x+1] }
187	    -re "^ +\[0-9\]+ 0058 CB44DFC5\[^\n\]*\n"	{ set x [expr $x+1] }
188	    -re "^ +\[0-9\]+ 005c CB44FFBD\[^\n\]*\n"	{ set x [expr $x+1] }
189	    -re "^ +\[0-9\]+ 0060 CB441FB7\[^\n\]*\n"	{ set x [expr $x+1] }
190	    -re "^ +\[0-9\]+ 0064 CB443FAF\[^\n\]*\n"	{ set x [expr $x+1] }
191	    -re "^ +\[0-9\]+ 0068 CB445FA7\[^\n\]*\n"	{ set x [expr $x+1] }
192	    -re "^ +\[0-9\]+ 006c CB447F9F\[^\n\]*\n"	{ set x [expr $x+1] }
193	    -re "^ +\[0-9\]+ 0070 CB449F97\[^\n\]*\n"	{ set x [expr $x+1] }
194	    -re "^ +\[0-9\]+ 0074 CB44BF8F\[^\n\]*\n"	{ set x [expr $x+1] }
195	    -re "^ +\[0-9\]+ 0078 CB44DF87\[^\n\]*\n"	{ set x [expr $x+1] }
196	    -re "^ +\[0-9\]+ 007c CB44FF7F\[^\n\]*\n"	{ set x [expr $x+1] }
197	    -re "^ +\[0-9\]+ 0080 CF4A1FF5\[^\n\]*\n"	{ set x [expr $x+1] }
198	    -re "^ +\[0-9\]+ 0084 CF4A3FED\[^\n\]*\n"	{ set x [expr $x+1] }
199	    -re "^ +\[0-9\]+ 0088 CF4A5FE5\[^\n\]*\n"	{ set x [expr $x+1] }
200	    -re "^ +\[0-9\]+ 008c CF4A7FDD\[^\n\]*\n"	{ set x [expr $x+1] }
201	    -re "^ +\[0-9\]+ 0090 CF4A9FD5\[^\n\]*\n"	{ set x [expr $x+1] }
202	    -re "^ +\[0-9\]+ 0094 CF4ABFCD\[^\n\]*\n"	{ set x [expr $x+1] }
203	    -re "^ +\[0-9\]+ 0098 CF4ADFC5\[^\n\]*\n"	{ set x [expr $x+1] }
204	    -re "^ +\[0-9\]+ 009c CF4AFFBD\[^\n\]*\n"	{ set x [expr $x+1] }
205	    -re "^ +\[0-9\]+ 00a0 CF4A1FB7\[^\n\]*\n"	{ set x [expr $x+1] }
206	    -re "^ +\[0-9\]+ 00a4 CF4A3FAF\[^\n\]*\n"	{ set x [expr $x+1] }
207	    -re "^ +\[0-9\]+ 00a8 CF4A5FA7\[^\n\]*\n"	{ set x [expr $x+1] }
208	    -re "^ +\[0-9\]+ 00ac CF4A7F9F\[^\n\]*\n"	{ set x [expr $x+1] }
209	    -re "^ +\[0-9\]+ 00b0 CF4A9F97\[^\n\]*\n"	{ set x [expr $x+1] }
210	    -re "^ +\[0-9\]+ 00b4 CF4ABF8F\[^\n\]*\n"	{ set x [expr $x+1] }
211	    -re "^ +\[0-9\]+ 00b8 CF4ADF87\[^\n\]*\n"	{ set x [expr $x+1] }
212	    -re "^ +\[0-9\]+ 00bc CF4AFF7F\[^\n\]*\n"	{ set x [expr $x+1] }
213	    -re "^ +\[0-9\]+ 00c0 80801FF5\[^\n\]*\n"	{ set x [expr $x+1] }
214	    -re "^ +\[0-9\]+ 00c4 80803FED\[^\n\]*\n"	{ set x [expr $x+1] }
215	    -re "^ +\[0-9\]+ 00c8 80805FE5\[^\n\]*\n"	{ set x [expr $x+1] }
216	    -re "^ +\[0-9\]+ 00cc 80807FDD\[^\n\]*\n"	{ set x [expr $x+1] }
217	    -re "^ +\[0-9\]+ 00d0 80809FD5\[^\n\]*\n"	{ set x [expr $x+1] }
218	    -re "^ +\[0-9\]+ 00d4 8080BFCD\[^\n\]*\n"	{ set x [expr $x+1] }
219	    -re "^ +\[0-9\]+ 00d8 8080DFC5\[^\n\]*\n"	{ set x [expr $x+1] }
220	    -re "^ +\[0-9\]+ 00dc 8080FFBD\[^\n\]*\n"	{ set x [expr $x+1] }
221	    -re "^ +\[0-9\]+ 00e0 88801FB5\[^\n\]*\n"	{ set x [expr $x+1] }
222	    -re "^ +\[0-9\]+ 00e4 88803FAD\[^\n\]*\n"	{ set x [expr $x+1] }
223	    -re "^ +\[0-9\]+ 00e8 88805FA5\[^\n\]*\n"	{ set x [expr $x+1] }
224	    -re "^ +\[0-9\]+ 00ec 88807F9D\[^\n\]*\n"	{ set x [expr $x+1] }
225	    -re "^ +\[0-9\]+ 00f0 88809F95\[^\n\]*\n"	{ set x [expr $x+1] }
226	    -re "^ +\[0-9\]+ 00f4 8880BF8D\[^\n\]*\n"	{ set x [expr $x+1] }
227	    -re "^ +\[0-9\]+ 00f8 8880DF85\[^\n\]*\n"	{ set x [expr $x+1] }
228	    -re "^ +\[0-9\]+ 00fc 8880FF7D\[^\n\]*\n"	{ set x [expr $x+1] }
229	    -re "^ +\[0-9\]+ 0100 80801F77\[^\n\]*\n"	{ set x [expr $x+1] }
230	    -re "^ +\[0-9\]+ 0104 80803F6F\[^\n\]*\n"	{ set x [expr $x+1] }
231	    -re "^ +\[0-9\]+ 0108 80805F67\[^\n\]*\n"	{ set x [expr $x+1] }
232	    -re "^ +\[0-9\]+ 010c 80807F5F\[^\n\]*\n"	{ set x [expr $x+1] }
233	    -re "^ +\[0-9\]+ 0110 80809F57\[^\n\]*\n"	{ set x [expr $x+1] }
234	    -re "^ +\[0-9\]+ 0114 8080BF4F\[^\n\]*\n"	{ set x [expr $x+1] }
235	    -re "^ +\[0-9\]+ 0118 8080DF47\[^\n\]*\n"	{ set x [expr $x+1] }
236	    -re "^ +\[0-9\]+ 011c 8080FF3F\[^\n\]*\n"	{ set x [expr $x+1] }
237	    -re "^ +\[0-9\]+ 0120 88801F37\[^\n\]*\n"	{ set x [expr $x+1] }
238	    -re "^ +\[0-9\]+ 0124 88803F2F\[^\n\]*\n"	{ set x [expr $x+1] }
239	    -re "^ +\[0-9\]+ 0128 88805F27\[^\n\]*\n"	{ set x [expr $x+1] }
240	    -re "^ +\[0-9\]+ 012c 88807F1F\[^\n\]*\n"	{ set x [expr $x+1] }
241	    -re "^ +\[0-9\]+ 0130 88809F17\[^\n\]*\n"	{ set x [expr $x+1] }
242	    -re "^ +\[0-9\]+ 0134 8880BF0F\[^\n\]*\n"	{ set x [expr $x+1] }
243	    -re "^ +\[0-9\]+ 0138 8880DF07\[^\n\]*\n"	{ set x [expr $x+1] }
244	    -re "^ +\[0-9\]+ 013c 8880FEFF\[^\n\]*\n"	{ set x [expr $x+1] }
245	    -re "^ +\[0-9\]+ 0140 84801FF5\[^\n\]*\n"	{ set x [expr $x+1] }
246	    -re "^ +\[0-9\]+ 0144 84805FED\[^\n\]*\n"	{ set x [expr $x+1] }
247	    -re "^ +\[0-9\]+ 0148 84807FE5\[^\n\]*\n"	{ set x [expr $x+1] }
248	    -re "^ +\[0-9\]+ 014c 84809FDD\[^\n\]*\n"	{ set x [expr $x+1] }
249	    -re "^ +\[0-9\]+ 0150 8480BFD5\[^\n\]*\n"	{ set x [expr $x+1] }
250	    -re "^ +\[0-9\]+ 0154 8480DFCD\[^\n\]*\n"	{ set x [expr $x+1] }
251	    -re "^ +\[0-9\]+ 0158 8480FFC5\[^\n\]*\n"	{ set x [expr $x+1] }
252	    -re "^ +\[0-9\]+ 015c 8C801FBD\[^\n\]*\n"	{ set x [expr $x+1] }
253	    -re "^ +\[0-9\]+ 0160 8C803FB5\[^\n\]*\n"	{ set x [expr $x+1] }
254	    -re "^ +\[0-9\]+ 0164 8C805FAD\[^\n\]*\n"	{ set x [expr $x+1] }
255	    -re "^ +\[0-9\]+ 0168 8C807FA5\[^\n\]*\n"	{ set x [expr $x+1] }
256	    -re "^ +\[0-9\]+ 016c 8C809F9D\[^\n\]*\n"	{ set x [expr $x+1] }
257	    -re "^ +\[0-9\]+ 0170 8C80BF95\[^\n\]*\n"	{ set x [expr $x+1] }
258	    -re "^ +\[0-9\]+ 0174 8C80DF8D\[^\n\]*\n"	{ set x [expr $x+1] }
259	    -re "^ +\[0-9\]+ 0178 8C80FE85\[^\n\]*\n"	{ set x [expr $x+1] }
260	    -re "^ +\[0-9\]+ 017c 84801F7F\[^\n\]*\n"	{ set x [expr $x+1] }
261	    -re "^ +\[0-9\]+ 0180 84803F77\[^\n\]*\n"	{ set x [expr $x+1] }
262	    -re "^ +\[0-9\]+ 0184 84805F6F\[^\n\]*\n"	{ set x [expr $x+1] }
263	    -re "^ +\[0-9\]+ 0188 84807F67\[^\n\]*\n"	{ set x [expr $x+1] }
264	    -re "^ +\[0-9\]+ 018c 84809F5F\[^\n\]*\n"	{ set x [expr $x+1] }
265	    -re "^ +\[0-9\]+ 0190 8480BF57\[^\n\]*\n"	{ set x [expr $x+1] }
266	    -re "^ +\[0-9\]+ 0194 8480DF4F\[^\n\]*\n"	{ set x [expr $x+1] }
267	    -re "^ +\[0-9\]+ 0198 8480FF47\[^\n\]*\n"	{ set x [expr $x+1] }
268	    -re "^ +\[0-9\]+ 019c 8C801F3F\[^\n\]*\n"	{ set x [expr $x+1] }
269	    -re "^ +\[0-9\]+ 01a0 8C803F37\[^\n\]*\n"	{ set x [expr $x+1] }
270	    -re "^ +\[0-9\]+ 01a4 8C805F2F\[^\n\]*\n"	{ set x [expr $x+1] }
271	    -re "^ +\[0-9\]+ 01a8 8C807F27\[^\n\]*\n"	{ set x [expr $x+1] }
272	    -re "^ +\[0-9\]+ 01ac 8C809F1F\[^\n\]*\n"	{ set x [expr $x+1] }
273	    -re "^ +\[0-9\]+ 01b0 8C80BF17\[^\n\]*\n"	{ set x [expr $x+1] }
274	    -re "^ +\[0-9\]+ 01b4 8C80DF0F\[^\n\]*\n"	{ set x [expr $x+1] }
275	    -re "^ +\[0-9\]+ 01b8 8C80FF07\[^\n\]*\n"	{ set x [expr $x+1] }
276	    -re "^ +\[0-9\]+ 01bc A0811FF5\[^\n\]*\n"	{ set x [expr $x+1] }
277	    -re "^ +\[0-9\]+ 01c0 A0813FED\[^\n\]*\n"	{ set x [expr $x+1] }
278	    -re "^ +\[0-9\]+ 01c4 A0815FE5\[^\n\]*\n"	{ set x [expr $x+1] }
279	    -re "^ +\[0-9\]+ 01c8 A0817FDD\[^\n\]*\n"	{ set x [expr $x+1] }
280	    -re "^ +\[0-9\]+ 01cc A0819FD5\[^\n\]*\n"	{ set x [expr $x+1] }
281	    -re "^ +\[0-9\]+ 01d0 A081BFCD\[^\n\]*\n"	{ set x [expr $x+1] }
282	    -re "^ +\[0-9\]+ 01d4 A081DFC5\[^\n\]*\n"	{ set x [expr $x+1] }
283	    -re "^ +\[0-9\]+ 01d8 A081FFBD\[^\n\]*\n"	{ set x [expr $x+1] }
284	    -re "^ +\[0-9\]+ 01dc A8811FB5\[^\n\]*\n"	{ set x [expr $x+1] }
285	    -re "^ +\[0-9\]+ 01e0 A8813FAD\[^\n\]*\n"	{ set x [expr $x+1] }
286	    -re "^ +\[0-9\]+ 01e4 A8815FA5\[^\n\]*\n"	{ set x [expr $x+1] }
287	    -re "^ +\[0-9\]+ 01e8 A8817F9D\[^\n\]*\n"	{ set x [expr $x+1] }
288	    -re "^ +\[0-9\]+ 01ec A8819F95\[^\n\]*\n"	{ set x [expr $x+1] }
289	    -re "^ +\[0-9\]+ 01f0 A881BF8D\[^\n\]*\n"	{ set x [expr $x+1] }
290	    -re "^ +\[0-9\]+ 01f4 A881DF85\[^\n\]*\n"	{ set x [expr $x+1] }
291	    -re "^ +\[0-9\]+ 01f8 A881FF7D\[^\n\]*\n"	{ set x [expr $x+1] }
292	    -re "^ +\[0-9\]+ 01fc A0811F77\[^\n\]*\n"	{ set x [expr $x+1] }
293	    -re "^ +\[0-9\]+ 0200 A0813F6F\[^\n\]*\n"	{ set x [expr $x+1] }
294	    -re "^ +\[0-9\]+ 0204 A0815F67\[^\n\]*\n"	{ set x [expr $x+1] }
295	    -re "^ +\[0-9\]+ 0208 A0817F5F\[^\n\]*\n"	{ set x [expr $x+1] }
296	    -re "^ +\[0-9\]+ 020c A0819F57\[^\n\]*\n"	{ set x [expr $x+1] }
297	    -re "^ +\[0-9\]+ 0210 A081BF4F\[^\n\]*\n"	{ set x [expr $x+1] }
298	    -re "^ +\[0-9\]+ 0214 A081DF47\[^\n\]*\n"	{ set x [expr $x+1] }
299	    -re "^ +\[0-9\]+ 0218 A081FF3F\[^\n\]*\n"	{ set x [expr $x+1] }
300	    -re "^ +\[0-9\]+ 021c A8811F37\[^\n\]*\n"	{ set x [expr $x+1] }
301	    -re "^ +\[0-9\]+ 0220 A8813F2F\[^\n\]*\n"	{ set x [expr $x+1] }
302	    -re "^ +\[0-9\]+ 0224 A8815F27\[^\n\]*\n"	{ set x [expr $x+1] }
303	    -re "^ +\[0-9\]+ 0228 A8817F1F\[^\n\]*\n"	{ set x [expr $x+1] }
304	    -re "^ +\[0-9\]+ 022c A8819F17\[^\n\]*\n"	{ set x [expr $x+1] }
305	    -re "^ +\[0-9\]+ 0230 A881BF0F\[^\n\]*\n"	{ set x [expr $x+1] }
306	    -re "^ +\[0-9\]+ 0234 A881DF07\[^\n\]*\n"	{ set x [expr $x+1] }
307	    -re "^ +\[0-9\]+ 0238 A881FEFF\[^\n\]*\n"	{ set x [expr $x+1] }
308	    -re "^ +\[0-9\]+ 023c A49F1FF5\[^\n\]*\n"	{ set x [expr $x+1] }
309	    -re "^ +\[0-9\]+ 0240 A49F3FED\[^\n\]*\n"	{ set x [expr $x+1] }
310	    -re "^ +\[0-9\]+ 0244 A49F5FE5\[^\n\]*\n"	{ set x [expr $x+1] }
311	    -re "^ +\[0-9\]+ 0248 A49F7FDD\[^\n\]*\n"	{ set x [expr $x+1] }
312	    -re "^ +\[0-9\]+ 024c A49F9FD5\[^\n\]*\n"	{ set x [expr $x+1] }
313	    -re "^ +\[0-9\]+ 0250 A49FBFCD\[^\n\]*\n"	{ set x [expr $x+1] }
314	    -re "^ +\[0-9\]+ 0254 A49FDFC5\[^\n\]*\n"	{ set x [expr $x+1] }
315	    -re "^ +\[0-9\]+ 0258 A49FFFBD\[^\n\]*\n"	{ set x [expr $x+1] }
316	    -re "^ +\[0-9\]+ 025c AC9F1FB5\[^\n\]*\n"	{ set x [expr $x+1] }
317	    -re "^ +\[0-9\]+ 0260 AC9F3FAD\[^\n\]*\n"	{ set x [expr $x+1] }
318	    -re "^ +\[0-9\]+ 0264 AC9F5FA5\[^\n\]*\n"	{ set x [expr $x+1] }
319	    -re "^ +\[0-9\]+ 0268 AC9F7F9D\[^\n\]*\n"	{ set x [expr $x+1] }
320	    -re "^ +\[0-9\]+ 026c AC9F9F95\[^\n\]*\n"	{ set x [expr $x+1] }
321	    -re "^ +\[0-9\]+ 0270 AC9FBF8D\[^\n\]*\n"	{ set x [expr $x+1] }
322	    -re "^ +\[0-9\]+ 0274 AC9FDF85\[^\n\]*\n"	{ set x [expr $x+1] }
323	    -re "^ +\[0-9\]+ 0278 AC9FFC85\[^\n\]*\n"	{ set x [expr $x+1] }
324	    -re "^ +\[0-9\]+ 027c A49F1F77\[^\n\]*\n"	{ set x [expr $x+1] }
325	    -re "^ +\[0-9\]+ 0280 A49F3F6F\[^\n\]*\n"	{ set x [expr $x+1] }
326	    -re "^ +\[0-9\]+ 0284 A49F5F67\[^\n\]*\n"	{ set x [expr $x+1] }
327	    -re "^ +\[0-9\]+ 0288 A49F7F5F\[^\n\]*\n"	{ set x [expr $x+1] }
328	    -re "^ +\[0-9\]+ 028c A49F9F57\[^\n\]*\n"	{ set x [expr $x+1] }
329	    -re "^ +\[0-9\]+ 0290 A49FBF4F\[^\n\]*\n"	{ set x [expr $x+1] }
330	    -re "^ +\[0-9\]+ 0294 A49FDF47\[^\n\]*\n"	{ set x [expr $x+1] }
331	    -re "^ +\[0-9\]+ 0298 A49FFF3F\[^\n\]*\n"	{ set x [expr $x+1] }
332	    -re "^ +\[0-9\]+ 029c AC9F1F37\[^\n\]*\n"	{ set x [expr $x+1] }
333	    -re "^ +\[0-9\]+ 02a0 AC9F3F2F\[^\n\]*\n"	{ set x [expr $x+1] }
334	    -re "^ +\[0-9\]+ 02a4 AC9F5F27\[^\n\]*\n"	{ set x [expr $x+1] }
335	    -re "^ +\[0-9\]+ 02a8 AC9F7F1F\[^\n\]*\n"	{ set x [expr $x+1] }
336	    -re "^ +\[0-9\]+ 02ac AC9F9F17\[^\n\]*\n"	{ set x [expr $x+1] }
337	    -re "^ +\[0-9\]+ 02b0 AC9FBF0F\[^\n\]*\n"	{ set x [expr $x+1] }
338	    -re "^ +\[0-9\]+ 02b4 AC9FDF07\[^\n\]*\n"	{ set x [expr $x+1] }
339	    -re "^ +\[0-9\]+ 02b8 AC9FFEFF\[^\n\]*\n"	{ set x [expr $x+1] }
340	    -re "^ +\[0-9\]+ 02bc C0045FF5\[^\n\]*\n"	{ set x [expr $x+1] }
341	    -re "^ +\[0-9\]+ 02c0 C004DFED\[^\n\]*\n"	{ set x [expr $x+1] }
342	    -re "^ +\[0-9\]+ 02c4 C0045FE7\[^\n\]*\n"	{ set x [expr $x+1] }
343	    -re "^ +\[0-9\]+ 02c8 C004DFDF\[^\n\]*\n"	{ set x [expr $x+1] }
344	    -re "^ +\[0-9\]+ 02cc C4A45FD5\[^\n\]*\n"	{ set x [expr $x+1] }
345	    -re "^ +\[0-9\]+ 02d0 C4A4DFCD\[^\n\]*\n"	{ set x [expr $x+1] }
346	    -re "^ +\[0-9\]+ 02d4 C4A45FC7\[^\n\]*\n"	{ set x [expr $x+1] }
347	    -re "^ +\[0-9\]+ 02d8 C4A4DFBF\[^\n\]*\n"	{ set x [expr $x+1] }
348	    -re "\[^\n\]*\n"				{ }
349	    timeout				{ perror "timeout\n"; break }
350	    eof					{ break }
351	}
352    }
353
354    # This was intended to do any cleanup necessary.  It kinda looks like it
355    # isn't needed, but just in case, please keep it in for now.
356    gas_finish
357
358    # Did we find what we were looking for?  If not, flunk it.
359    if [expr $x==183] then { pass $testname } else { fail $testname }
360}
361
362proc do_branch2 {} {
363    set testname "branch2.s: branch tests"
364    set x 0
365
366    gas_start "branch2.s" "-al"
367
368    # Check the assembled instruction against a table built by the HP assembler
369    # Any differences should be checked by hand -- with the number of problems
370    # I've seen in the HP assembler I don't completely trust it.
371    #
372    # Instead of having a variable for each match string just increment the
373    # total number of matches seen.  That's simpler when testing large numbers
374    # of instructions (as these tests to).
375    while 1 {
376	expect {
377	    -re "^ +\[0-9\]+ 0000 C0045FF5\[^\n\]*\n"	{ set x [expr $x+1] }
378	    -re "^ +\[0-9\]+ 0004 C004DFED\[^\n\]*\n"	{ set x [expr $x+1] }
379	    -re "^ +\[0-9\]+ 0008 C0045FE7\[^\n\]*\n"	{ set x [expr $x+1] }
380	    -re "^ +\[0-9\]+ 000c C004DFDF\[^\n\]*\n"	{ set x [expr $x+1] }
381	    -re "^ +\[0-9\]+ 0010 C0047FD5\[^\n\]*\n"	{ set x [expr $x+1] }
382	    -re "^ +\[0-9\]+ 0014 C004FFCD\[^\n\]*\n"	{ set x [expr $x+1] }
383	    -re "^ +\[0-9\]+ 0018 C0047FC7\[^\n\]*\n"	{ set x [expr $x+1] }
384	    -re "^ +\[0-9\]+ 001c C004FFBF\[^\n\]*\n"	{ set x [expr $x+1] }
385	    -re "^ +\[0-9\]+ 0020 C4A47FB5\[^\n\]*\n"	{ set x [expr $x+1] }
386	    -re "^ +\[0-9\]+ 0024 C4A4FFAD\[^\n\]*\n"	{ set x [expr $x+1] }
387	    -re "^ +\[0-9\]+ 0028 C4A47FA7\[^\n\]*\n"	{ set x [expr $x+1] }
388	    -re "^ +\[0-9\]+ 002c C4A4FF9F\[^\n\]*\n"	{ set x [expr $x+1] }
389	    -re "^ +\[0-9\]+ 0030 E8004005\[^\n\]*\n"	{ set x [expr $x+1] }
390	    -re "^ +\[0-9\]+ 0034 E800400D\[^\n\]*\n"	{ set x [expr $x+1] }
391	    -re "^ +\[0-9\]+ 0038 E8004F9D\[^\n\]*\n"	{ set x [expr $x+1] }
392	    -re "^ +\[0-9\]+ 003c E8004001\[^\n\]*\n"	{ set x [expr $x+1] }
393	    -re "^ +\[0-9\]+ 0040 E8044001\[^\n\]*\n"	{ set x [expr $x+1] }
394	    -re "\[^\n\]*\n"				{ }
395	    timeout				{ perror "timeout\n"; break }
396	    eof					{ break }
397	}
398    }
399
400    # This was intended to do any cleanup necessary.  It kinda looks like it
401    # isn't needed, but just in case, please keep it in for now.
402    gas_finish
403
404    # Did we find what we were looking for?  If not, flunk it.
405    if [expr $x==17] then { pass $testname } else { fail $testname }
406}
407
408proc do_add {} {
409    set testname "add.s: add tests"
410    set x 0
411
412    gas_start "add.s" "-al"
413
414    # Check the assembled instruction against a table built by the HP assembler
415    # Any differences should be checked by hand -- with the number of problems
416    # I've seen in the HP assembler I don't completely trust it.
417    #
418    # Instead of having a variable for each match string just increment the
419    # total number of matches seen.  That's simpler when testing large numbers
420    # of instructions (as these tests to).
421    while 1 {
422	expect {
423	    -re "^ +\[0-9\]+ 0000 08A40606\[^\n\]*\n"	{ set x [expr $x+1] }
424	    -re "^ +\[0-9\]+ 0004 08A42606\[^\n\]*\n"	{ set x [expr $x+1] }
425	    -re "^ +\[0-9\]+ 0008 08A44606\[^\n\]*\n"	{ set x [expr $x+1] }
426	    -re "^ +\[0-9\]+ 000c 08A46606\[^\n\]*\n"	{ set x [expr $x+1] }
427	    -re "^ +\[0-9\]+ 0010 08A48606\[^\n\]*\n"	{ set x [expr $x+1] }
428	    -re "^ +\[0-9\]+ 0014 08A4A606\[^\n\]*\n"	{ set x [expr $x+1] }
429	    -re "^ +\[0-9\]+ 0018 08A4C606\[^\n\]*\n"	{ set x [expr $x+1] }
430	    -re "^ +\[0-9\]+ 001c 08A4E606\[^\n\]*\n"	{ set x [expr $x+1] }
431	    -re "^ +\[0-9\]+ 0020 08A41606\[^\n\]*\n"	{ set x [expr $x+1] }
432	    -re "^ +\[0-9\]+ 0024 08A43606\[^\n\]*\n"	{ set x [expr $x+1] }
433	    -re "^ +\[0-9\]+ 0028 08A45606\[^\n\]*\n"	{ set x [expr $x+1] }
434	    -re "^ +\[0-9\]+ 002c 08A47606\[^\n\]*\n"	{ set x [expr $x+1] }
435	    -re "^ +\[0-9\]+ 0030 08A49606\[^\n\]*\n"	{ set x [expr $x+1] }
436	    -re "^ +\[0-9\]+ 0034 08A4B606\[^\n\]*\n"	{ set x [expr $x+1] }
437	    -re "^ +\[0-9\]+ 0038 08A4D606\[^\n\]*\n"	{ set x [expr $x+1] }
438	    -re "^ +\[0-9\]+ 003c 08A4F606\[^\n\]*\n"	{ set x [expr $x+1] }
439	    -re "^ +\[0-9\]+ 0040 08A40A06\[^\n\]*\n"	{ set x [expr $x+1] }
440	    -re "^ +\[0-9\]+ 0044 08A42A06\[^\n\]*\n"	{ set x [expr $x+1] }
441	    -re "^ +\[0-9\]+ 0048 08A44A06\[^\n\]*\n"	{ set x [expr $x+1] }
442	    -re "^ +\[0-9\]+ 004c 08A46A06\[^\n\]*\n"	{ set x [expr $x+1] }
443	    -re "^ +\[0-9\]+ 0050 08A48A06\[^\n\]*\n"	{ set x [expr $x+1] }
444	    -re "^ +\[0-9\]+ 0054 08A4AA06\[^\n\]*\n"	{ set x [expr $x+1] }
445	    -re "^ +\[0-9\]+ 0058 08A4CA06\[^\n\]*\n"	{ set x [expr $x+1] }
446	    -re "^ +\[0-9\]+ 005c 08A4EA06\[^\n\]*\n"	{ set x [expr $x+1] }
447	    -re "^ +\[0-9\]+ 0060 08A41A06\[^\n\]*\n"	{ set x [expr $x+1] }
448	    -re "^ +\[0-9\]+ 0064 08A43A06\[^\n\]*\n"	{ set x [expr $x+1] }
449	    -re "^ +\[0-9\]+ 0068 08A45A06\[^\n\]*\n"	{ set x [expr $x+1] }
450	    -re "^ +\[0-9\]+ 006c 08A47A06\[^\n\]*\n"	{ set x [expr $x+1] }
451	    -re "^ +\[0-9\]+ 0070 08A49A06\[^\n\]*\n"	{ set x [expr $x+1] }
452	    -re "^ +\[0-9\]+ 0074 08A4BA06\[^\n\]*\n"	{ set x [expr $x+1] }
453	    -re "^ +\[0-9\]+ 0078 08A4DA06\[^\n\]*\n"	{ set x [expr $x+1] }
454	    -re "^ +\[0-9\]+ 007c 08A4FA06\[^\n\]*\n"	{ set x [expr $x+1] }
455	    -re "^ +\[0-9\]+ 0080 08A40E06\[^\n\]*\n"	{ set x [expr $x+1] }
456	    -re "^ +\[0-9\]+ 0084 08A42E06\[^\n\]*\n"	{ set x [expr $x+1] }
457	    -re "^ +\[0-9\]+ 0088 08A44E06\[^\n\]*\n"	{ set x [expr $x+1] }
458	    -re "^ +\[0-9\]+ 008c 08A46E06\[^\n\]*\n"	{ set x [expr $x+1] }
459	    -re "^ +\[0-9\]+ 0090 08A48E06\[^\n\]*\n"	{ set x [expr $x+1] }
460	    -re "^ +\[0-9\]+ 0094 08A4AE06\[^\n\]*\n"	{ set x [expr $x+1] }
461	    -re "^ +\[0-9\]+ 0098 08A4CE06\[^\n\]*\n"	{ set x [expr $x+1] }
462	    -re "^ +\[0-9\]+ 009c 08A4EE06\[^\n\]*\n"	{ set x [expr $x+1] }
463	    -re "^ +\[0-9\]+ 00a0 08A41E06\[^\n\]*\n"	{ set x [expr $x+1] }
464	    -re "^ +\[0-9\]+ 00a4 08A43E06\[^\n\]*\n"	{ set x [expr $x+1] }
465	    -re "^ +\[0-9\]+ 00a8 08A45E06\[^\n\]*\n"	{ set x [expr $x+1] }
466	    -re "^ +\[0-9\]+ 00ac 08A47E06\[^\n\]*\n"	{ set x [expr $x+1] }
467	    -re "^ +\[0-9\]+ 00b0 08A49E06\[^\n\]*\n"	{ set x [expr $x+1] }
468	    -re "^ +\[0-9\]+ 00b4 08A4BE06\[^\n\]*\n"	{ set x [expr $x+1] }
469	    -re "^ +\[0-9\]+ 00b8 08A4DE06\[^\n\]*\n"	{ set x [expr $x+1] }
470	    -re "^ +\[0-9\]+ 00bc 08A4FE06\[^\n\]*\n"	{ set x [expr $x+1] }
471	    -re "^ +\[0-9\]+ 00c0 08A40706\[^\n\]*\n"	{ set x [expr $x+1] }
472	    -re "^ +\[0-9\]+ 00c4 08A42706\[^\n\]*\n"	{ set x [expr $x+1] }
473	    -re "^ +\[0-9\]+ 00c8 08A44706\[^\n\]*\n"	{ set x [expr $x+1] }
474	    -re "^ +\[0-9\]+ 00cc 08A46706\[^\n\]*\n"	{ set x [expr $x+1] }
475	    -re "^ +\[0-9\]+ 00d0 08A48706\[^\n\]*\n"	{ set x [expr $x+1] }
476	    -re "^ +\[0-9\]+ 00d4 08A4A706\[^\n\]*\n"	{ set x [expr $x+1] }
477	    -re "^ +\[0-9\]+ 00d8 08A4C706\[^\n\]*\n"	{ set x [expr $x+1] }
478	    -re "^ +\[0-9\]+ 00dc 08A4E706\[^\n\]*\n"	{ set x [expr $x+1] }
479	    -re "^ +\[0-9\]+ 00e0 08A41706\[^\n\]*\n"	{ set x [expr $x+1] }
480	    -re "^ +\[0-9\]+ 00e4 08A43706\[^\n\]*\n"	{ set x [expr $x+1] }
481	    -re "^ +\[0-9\]+ 00e8 08A45706\[^\n\]*\n"	{ set x [expr $x+1] }
482	    -re "^ +\[0-9\]+ 00ec 08A47706\[^\n\]*\n"	{ set x [expr $x+1] }
483	    -re "^ +\[0-9\]+ 00f0 08A49706\[^\n\]*\n"	{ set x [expr $x+1] }
484	    -re "^ +\[0-9\]+ 00f4 08A4B706\[^\n\]*\n"	{ set x [expr $x+1] }
485	    -re "^ +\[0-9\]+ 00f8 08A4D706\[^\n\]*\n"	{ set x [expr $x+1] }
486	    -re "^ +\[0-9\]+ 00fc 08A4F706\[^\n\]*\n"	{ set x [expr $x+1] }
487	    -re "^ +\[0-9\]+ 0100 08A40F06\[^\n\]*\n"	{ set x [expr $x+1] }
488	    -re "^ +\[0-9\]+ 0104 08A42F06\[^\n\]*\n"	{ set x [expr $x+1] }
489	    -re "^ +\[0-9\]+ 0108 08A44F06\[^\n\]*\n"	{ set x [expr $x+1] }
490	    -re "^ +\[0-9\]+ 010c 08A46F06\[^\n\]*\n"	{ set x [expr $x+1] }
491	    -re "^ +\[0-9\]+ 0110 08A48F06\[^\n\]*\n"	{ set x [expr $x+1] }
492	    -re "^ +\[0-9\]+ 0114 08A4AF06\[^\n\]*\n"	{ set x [expr $x+1] }
493	    -re "^ +\[0-9\]+ 0118 08A4CF06\[^\n\]*\n"	{ set x [expr $x+1] }
494	    -re "^ +\[0-9\]+ 011c 08A4EF06\[^\n\]*\n"	{ set x [expr $x+1] }
495	    -re "^ +\[0-9\]+ 0120 08A41F06\[^\n\]*\n"	{ set x [expr $x+1] }
496	    -re "^ +\[0-9\]+ 0124 08A43F06\[^\n\]*\n"	{ set x [expr $x+1] }
497	    -re "^ +\[0-9\]+ 0128 08A45F06\[^\n\]*\n"	{ set x [expr $x+1] }
498	    -re "^ +\[0-9\]+ 012c 08A47F06\[^\n\]*\n"	{ set x [expr $x+1] }
499	    -re "^ +\[0-9\]+ 0130 08A49F06\[^\n\]*\n"	{ set x [expr $x+1] }
500	    -re "^ +\[0-9\]+ 0134 08A4BF06\[^\n\]*\n"	{ set x [expr $x+1] }
501	    -re "^ +\[0-9\]+ 0138 08A4DF06\[^\n\]*\n"	{ set x [expr $x+1] }
502	    -re "^ +\[0-9\]+ 013c 08A4FF06\[^\n\]*\n"	{ set x [expr $x+1] }
503	    -re "^ +\[0-9\]+ 0140 08A40A06\[^\n\]*\n"	{ set x [expr $x+1] }
504	    -re "^ +\[0-9\]+ 0144 08A42A06\[^\n\]*\n"	{ set x [expr $x+1] }
505	    -re "^ +\[0-9\]+ 0148 08A44A06\[^\n\]*\n"	{ set x [expr $x+1] }
506	    -re "^ +\[0-9\]+ 014c 08A46A06\[^\n\]*\n"	{ set x [expr $x+1] }
507	    -re "^ +\[0-9\]+ 0150 08A48A06\[^\n\]*\n"	{ set x [expr $x+1] }
508	    -re "^ +\[0-9\]+ 0154 08A4AA06\[^\n\]*\n"	{ set x [expr $x+1] }
509	    -re "^ +\[0-9\]+ 0158 08A4CA06\[^\n\]*\n"	{ set x [expr $x+1] }
510	    -re "^ +\[0-9\]+ 015c 08A4EA06\[^\n\]*\n"	{ set x [expr $x+1] }
511	    -re "^ +\[0-9\]+ 0160 08A41A06\[^\n\]*\n"	{ set x [expr $x+1] }
512	    -re "^ +\[0-9\]+ 0164 08A43A06\[^\n\]*\n"	{ set x [expr $x+1] }
513	    -re "^ +\[0-9\]+ 0168 08A45A06\[^\n\]*\n"	{ set x [expr $x+1] }
514	    -re "^ +\[0-9\]+ 016c 08A47A06\[^\n\]*\n"	{ set x [expr $x+1] }
515	    -re "^ +\[0-9\]+ 0170 08A49A06\[^\n\]*\n"	{ set x [expr $x+1] }
516	    -re "^ +\[0-9\]+ 0174 08A4BA06\[^\n\]*\n"	{ set x [expr $x+1] }
517	    -re "^ +\[0-9\]+ 0178 08A4DA06\[^\n\]*\n"	{ set x [expr $x+1] }
518	    -re "^ +\[0-9\]+ 017c 08A4FA06\[^\n\]*\n"	{ set x [expr $x+1] }
519	    -re "^ +\[0-9\]+ 0180 08A40E06\[^\n\]*\n"	{ set x [expr $x+1] }
520	    -re "^ +\[0-9\]+ 0184 08A42E06\[^\n\]*\n"	{ set x [expr $x+1] }
521	    -re "^ +\[0-9\]+ 0188 08A44E06\[^\n\]*\n"	{ set x [expr $x+1] }
522	    -re "^ +\[0-9\]+ 018c 08A46E06\[^\n\]*\n"	{ set x [expr $x+1] }
523	    -re "^ +\[0-9\]+ 0190 08A48E06\[^\n\]*\n"	{ set x [expr $x+1] }
524	    -re "^ +\[0-9\]+ 0194 08A4AE06\[^\n\]*\n"	{ set x [expr $x+1] }
525	    -re "^ +\[0-9\]+ 0198 08A4CE06\[^\n\]*\n"	{ set x [expr $x+1] }
526	    -re "^ +\[0-9\]+ 019c 08A4EE06\[^\n\]*\n"	{ set x [expr $x+1] }
527	    -re "^ +\[0-9\]+ 01a0 08A41E06\[^\n\]*\n"	{ set x [expr $x+1] }
528	    -re "^ +\[0-9\]+ 01a4 08A43E06\[^\n\]*\n"	{ set x [expr $x+1] }
529	    -re "^ +\[0-9\]+ 01a8 08A45E06\[^\n\]*\n"	{ set x [expr $x+1] }
530	    -re "^ +\[0-9\]+ 01ac 08A47E06\[^\n\]*\n"	{ set x [expr $x+1] }
531	    -re "^ +\[0-9\]+ 01b0 08A49E06\[^\n\]*\n"	{ set x [expr $x+1] }
532	    -re "^ +\[0-9\]+ 01b4 08A4BE06\[^\n\]*\n"	{ set x [expr $x+1] }
533	    -re "^ +\[0-9\]+ 01b8 08A4DE06\[^\n\]*\n"	{ set x [expr $x+1] }
534	    -re "^ +\[0-9\]+ 01bc 08A4FE06\[^\n\]*\n"	{ set x [expr $x+1] }
535	    -re "^ +\[0-9\]+ 01c0 08A40706\[^\n\]*\n"	{ set x [expr $x+1] }
536	    -re "^ +\[0-9\]+ 01c4 08A42706\[^\n\]*\n"	{ set x [expr $x+1] }
537	    -re "^ +\[0-9\]+ 01c8 08A44706\[^\n\]*\n"	{ set x [expr $x+1] }
538	    -re "^ +\[0-9\]+ 01cc 08A46706\[^\n\]*\n"	{ set x [expr $x+1] }
539	    -re "^ +\[0-9\]+ 01d0 08A48706\[^\n\]*\n"	{ set x [expr $x+1] }
540	    -re "^ +\[0-9\]+ 01d4 08A4A706\[^\n\]*\n"	{ set x [expr $x+1] }
541	    -re "^ +\[0-9\]+ 01d8 08A4C706\[^\n\]*\n"	{ set x [expr $x+1] }
542	    -re "^ +\[0-9\]+ 01dc 08A4E706\[^\n\]*\n"	{ set x [expr $x+1] }
543	    -re "^ +\[0-9\]+ 01e0 08A41706\[^\n\]*\n"	{ set x [expr $x+1] }
544	    -re "^ +\[0-9\]+ 01e4 08A43706\[^\n\]*\n"	{ set x [expr $x+1] }
545	    -re "^ +\[0-9\]+ 01e8 08A45706\[^\n\]*\n"	{ set x [expr $x+1] }
546	    -re "^ +\[0-9\]+ 01ec 08A47706\[^\n\]*\n"	{ set x [expr $x+1] }
547	    -re "^ +\[0-9\]+ 01f0 08A49706\[^\n\]*\n"	{ set x [expr $x+1] }
548	    -re "^ +\[0-9\]+ 01f4 08A4B706\[^\n\]*\n"	{ set x [expr $x+1] }
549	    -re "^ +\[0-9\]+ 01f8 08A4D706\[^\n\]*\n"	{ set x [expr $x+1] }
550	    -re "^ +\[0-9\]+ 01fc 08A4F706\[^\n\]*\n"	{ set x [expr $x+1] }
551	    -re "^ +\[0-9\]+ 0200 08A40F06\[^\n\]*\n"	{ set x [expr $x+1] }
552	    -re "^ +\[0-9\]+ 0204 08A42F06\[^\n\]*\n"	{ set x [expr $x+1] }
553	    -re "^ +\[0-9\]+ 0208 08A44F06\[^\n\]*\n"	{ set x [expr $x+1] }
554	    -re "^ +\[0-9\]+ 020c 08A46F06\[^\n\]*\n"	{ set x [expr $x+1] }
555	    -re "^ +\[0-9\]+ 0210 08A48F06\[^\n\]*\n"	{ set x [expr $x+1] }
556	    -re "^ +\[0-9\]+ 0214 08A4AF06\[^\n\]*\n"	{ set x [expr $x+1] }
557	    -re "^ +\[0-9\]+ 0218 08A4CF06\[^\n\]*\n"	{ set x [expr $x+1] }
558	    -re "^ +\[0-9\]+ 021c 08A4EF06\[^\n\]*\n"	{ set x [expr $x+1] }
559	    -re "^ +\[0-9\]+ 0220 08A41F06\[^\n\]*\n"	{ set x [expr $x+1] }
560	    -re "^ +\[0-9\]+ 0224 08A43F06\[^\n\]*\n"	{ set x [expr $x+1] }
561	    -re "^ +\[0-9\]+ 0228 08A45F06\[^\n\]*\n"	{ set x [expr $x+1] }
562	    -re "^ +\[0-9\]+ 022c 08A47F06\[^\n\]*\n"	{ set x [expr $x+1] }
563	    -re "^ +\[0-9\]+ 0230 08A49F06\[^\n\]*\n"	{ set x [expr $x+1] }
564	    -re "^ +\[0-9\]+ 0234 08A4BF06\[^\n\]*\n"	{ set x [expr $x+1] }
565	    -re "^ +\[0-9\]+ 0238 08A4DF06\[^\n\]*\n"	{ set x [expr $x+1] }
566	    -re "^ +\[0-9\]+ 023c 08A4FF06\[^\n\]*\n"	{ set x [expr $x+1] }
567	    -re "\[^\n\]*\n"				{ }
568	    timeout				{ perror "timeout\n"; break }
569	    eof					{ break }
570	}
571    }
572
573    # This was intended to do any cleanup necessary.  It kinda looks like it
574    # isn't needed, but just in case, please keep it in for now.
575    gas_finish
576
577    # Did we find what we were looking for?  If not, flunk it.
578    if [expr $x==144] then { pass $testname } else { fail $testname }
579}
580
581proc do_add2 {} {
582    set testname "add2.s: add2 tests"
583    set x 0
584
585    gas_start "add2.s" "-al"
586
587    # Check the assembled instruction against a table built by the HP assembler
588    # Any differences should be checked by hand -- with the number of problems
589    # I've seen in the HP assembler I don't completely trust it.
590    #
591    # Instead of having a variable for each match string just increment the
592    # total number of matches seen.  That's simpler when testing large numbers
593    # of instructions (as these tests to).
594    while 1 {
595	expect {
596	    -re "^ +\[0-9\]+ 0000 08A40626\[^\n\]*\n"	{ set x [expr $x+1] }
597	    -re "^ +\[0-9\]+ 0004 08A42626\[^\n\]*\n"	{ set x [expr $x+1] }
598	    -re "^ +\[0-9\]+ 0008 08A44626\[^\n\]*\n"	{ set x [expr $x+1] }
599	    -re "^ +\[0-9\]+ 000c 08A46626\[^\n\]*\n"	{ set x [expr $x+1] }
600	    -re "^ +\[0-9\]+ 0010 08A48626\[^\n\]*\n"	{ set x [expr $x+1] }
601	    -re "^ +\[0-9\]+ 0014 08A4A626\[^\n\]*\n"	{ set x [expr $x+1] }
602	    -re "^ +\[0-9\]+ 0018 08A4C626\[^\n\]*\n"	{ set x [expr $x+1] }
603	    -re "^ +\[0-9\]+ 001c 08A4E626\[^\n\]*\n"	{ set x [expr $x+1] }
604	    -re "^ +\[0-9\]+ 0020 08A41626\[^\n\]*\n"	{ set x [expr $x+1] }
605	    -re "^ +\[0-9\]+ 0024 08A43626\[^\n\]*\n"	{ set x [expr $x+1] }
606	    -re "^ +\[0-9\]+ 0028 08A45626\[^\n\]*\n"	{ set x [expr $x+1] }
607	    -re "^ +\[0-9\]+ 002c 08A47626\[^\n\]*\n"	{ set x [expr $x+1] }
608	    -re "^ +\[0-9\]+ 0030 08A49626\[^\n\]*\n"	{ set x [expr $x+1] }
609	    -re "^ +\[0-9\]+ 0034 08A4B626\[^\n\]*\n"	{ set x [expr $x+1] }
610	    -re "^ +\[0-9\]+ 0038 08A4D626\[^\n\]*\n"	{ set x [expr $x+1] }
611	    -re "^ +\[0-9\]+ 003c 08A4F626\[^\n\]*\n"	{ set x [expr $x+1] }
612	    -re "^ +\[0-9\]+ 0040 08A40A26\[^\n\]*\n"	{ set x [expr $x+1] }
613	    -re "^ +\[0-9\]+ 0044 08A42A26\[^\n\]*\n"	{ set x [expr $x+1] }
614	    -re "^ +\[0-9\]+ 0048 08A44A26\[^\n\]*\n"	{ set x [expr $x+1] }
615	    -re "^ +\[0-9\]+ 004c 08A46A26\[^\n\]*\n"	{ set x [expr $x+1] }
616	    -re "^ +\[0-9\]+ 0050 08A48A26\[^\n\]*\n"	{ set x [expr $x+1] }
617	    -re "^ +\[0-9\]+ 0054 08A4AA26\[^\n\]*\n"	{ set x [expr $x+1] }
618	    -re "^ +\[0-9\]+ 0058 08A4CA26\[^\n\]*\n"	{ set x [expr $x+1] }
619	    -re "^ +\[0-9\]+ 005c 08A4EA26\[^\n\]*\n"	{ set x [expr $x+1] }
620	    -re "^ +\[0-9\]+ 0060 08A41A26\[^\n\]*\n"	{ set x [expr $x+1] }
621	    -re "^ +\[0-9\]+ 0064 08A43A26\[^\n\]*\n"	{ set x [expr $x+1] }
622	    -re "^ +\[0-9\]+ 0068 08A45A26\[^\n\]*\n"	{ set x [expr $x+1] }
623	    -re "^ +\[0-9\]+ 006c 08A47A26\[^\n\]*\n"	{ set x [expr $x+1] }
624	    -re "^ +\[0-9\]+ 0070 08A49A26\[^\n\]*\n"	{ set x [expr $x+1] }
625	    -re "^ +\[0-9\]+ 0074 08A4BA26\[^\n\]*\n"	{ set x [expr $x+1] }
626	    -re "^ +\[0-9\]+ 0078 08A4DA26\[^\n\]*\n"	{ set x [expr $x+1] }
627	    -re "^ +\[0-9\]+ 007c 08A4FA26\[^\n\]*\n"	{ set x [expr $x+1] }
628	    -re "^ +\[0-9\]+ 0080 08A40E26\[^\n\]*\n"	{ set x [expr $x+1] }
629	    -re "^ +\[0-9\]+ 0084 08A42E26\[^\n\]*\n"	{ set x [expr $x+1] }
630	    -re "^ +\[0-9\]+ 0088 08A44E26\[^\n\]*\n"	{ set x [expr $x+1] }
631	    -re "^ +\[0-9\]+ 008c 08A46E26\[^\n\]*\n"	{ set x [expr $x+1] }
632	    -re "^ +\[0-9\]+ 0090 08A48E26\[^\n\]*\n"	{ set x [expr $x+1] }
633	    -re "^ +\[0-9\]+ 0094 08A4AE26\[^\n\]*\n"	{ set x [expr $x+1] }
634	    -re "^ +\[0-9\]+ 0098 08A4CE26\[^\n\]*\n"	{ set x [expr $x+1] }
635	    -re "^ +\[0-9\]+ 009c 08A4EE26\[^\n\]*\n"	{ set x [expr $x+1] }
636	    -re "^ +\[0-9\]+ 00a0 08A41E26\[^\n\]*\n"	{ set x [expr $x+1] }
637	    -re "^ +\[0-9\]+ 00a4 08A43E26\[^\n\]*\n"	{ set x [expr $x+1] }
638	    -re "^ +\[0-9\]+ 00a8 08A45E26\[^\n\]*\n"	{ set x [expr $x+1] }
639	    -re "^ +\[0-9\]+ 00ac 08A47E26\[^\n\]*\n"	{ set x [expr $x+1] }
640	    -re "^ +\[0-9\]+ 00b0 08A49E26\[^\n\]*\n"	{ set x [expr $x+1] }
641	    -re "^ +\[0-9\]+ 00b4 08A4BE26\[^\n\]*\n"	{ set x [expr $x+1] }
642	    -re "^ +\[0-9\]+ 00b8 08A4DE26\[^\n\]*\n"	{ set x [expr $x+1] }
643	    -re "^ +\[0-9\]+ 00bc 08A4FE26\[^\n\]*\n"	{ set x [expr $x+1] }
644	    -re "^ +\[0-9\]+ 00c0 08A40726\[^\n\]*\n"	{ set x [expr $x+1] }
645	    -re "^ +\[0-9\]+ 00c4 08A42726\[^\n\]*\n"	{ set x [expr $x+1] }
646	    -re "^ +\[0-9\]+ 00c8 08A44726\[^\n\]*\n"	{ set x [expr $x+1] }
647	    -re "^ +\[0-9\]+ 00cc 08A46726\[^\n\]*\n"	{ set x [expr $x+1] }
648	    -re "^ +\[0-9\]+ 00d0 08A48726\[^\n\]*\n"	{ set x [expr $x+1] }
649	    -re "^ +\[0-9\]+ 00d4 08A4A726\[^\n\]*\n"	{ set x [expr $x+1] }
650	    -re "^ +\[0-9\]+ 00d8 08A4C726\[^\n\]*\n"	{ set x [expr $x+1] }
651	    -re "^ +\[0-9\]+ 00dc 08A4E726\[^\n\]*\n"	{ set x [expr $x+1] }
652	    -re "^ +\[0-9\]+ 00e0 08A41726\[^\n\]*\n"	{ set x [expr $x+1] }
653	    -re "^ +\[0-9\]+ 00e4 08A43726\[^\n\]*\n"	{ set x [expr $x+1] }
654	    -re "^ +\[0-9\]+ 00e8 08A45726\[^\n\]*\n"	{ set x [expr $x+1] }
655	    -re "^ +\[0-9\]+ 00ec 08A47726\[^\n\]*\n"	{ set x [expr $x+1] }
656	    -re "^ +\[0-9\]+ 00f0 08A49726\[^\n\]*\n"	{ set x [expr $x+1] }
657	    -re "^ +\[0-9\]+ 00f4 08A4B726\[^\n\]*\n"	{ set x [expr $x+1] }
658	    -re "^ +\[0-9\]+ 00f8 08A4D726\[^\n\]*\n"	{ set x [expr $x+1] }
659	    -re "^ +\[0-9\]+ 00fc 08A4F726\[^\n\]*\n"	{ set x [expr $x+1] }
660	    -re "^ +\[0-9\]+ 0100 08A40F26\[^\n\]*\n"	{ set x [expr $x+1] }
661	    -re "^ +\[0-9\]+ 0104 08A42F26\[^\n\]*\n"	{ set x [expr $x+1] }
662	    -re "^ +\[0-9\]+ 0108 08A44F26\[^\n\]*\n"	{ set x [expr $x+1] }
663	    -re "^ +\[0-9\]+ 010c 08A46F26\[^\n\]*\n"	{ set x [expr $x+1] }
664	    -re "^ +\[0-9\]+ 0110 08A48F26\[^\n\]*\n"	{ set x [expr $x+1] }
665	    -re "^ +\[0-9\]+ 0114 08A4AF26\[^\n\]*\n"	{ set x [expr $x+1] }
666	    -re "^ +\[0-9\]+ 0118 08A4CF26\[^\n\]*\n"	{ set x [expr $x+1] }
667	    -re "^ +\[0-9\]+ 011c 08A4EF26\[^\n\]*\n"	{ set x [expr $x+1] }
668	    -re "^ +\[0-9\]+ 0120 08A41F26\[^\n\]*\n"	{ set x [expr $x+1] }
669	    -re "^ +\[0-9\]+ 0124 08A43F26\[^\n\]*\n"	{ set x [expr $x+1] }
670	    -re "^ +\[0-9\]+ 0128 08A45F26\[^\n\]*\n"	{ set x [expr $x+1] }
671	    -re "^ +\[0-9\]+ 012c 08A47F26\[^\n\]*\n"	{ set x [expr $x+1] }
672	    -re "^ +\[0-9\]+ 0130 08A49F26\[^\n\]*\n"	{ set x [expr $x+1] }
673	    -re "^ +\[0-9\]+ 0134 08A4BF26\[^\n\]*\n"	{ set x [expr $x+1] }
674	    -re "^ +\[0-9\]+ 0138 08A4DF26\[^\n\]*\n"	{ set x [expr $x+1] }
675	    -re "^ +\[0-9\]+ 013c 08A4FF26\[^\n\]*\n"	{ set x [expr $x+1] }
676	    -re "^ +\[0-9\]+ 0140 08210601\[^\n\]*\n"	{ set x [expr $x+1] }
677	    -re "^ +\[0-9\]+ 0144 08210721\[^\n\]*\n"	{ set x [expr $x+1] }
678	    -re "\[^\n\]*\n"				{ }
679	    timeout				{ perror "timeout\n"; break }
680	    eof					{ break }
681	}
682    }
683
684    # This was intended to do any cleanup necessary.  It kinda looks like it
685    # isn't needed, but just in case, please keep it in for now.
686    gas_finish
687
688    # Did we find what we were looking for?  If not, flunk it.
689    if [expr $x==82] then { pass $testname } else { fail $testname }
690}
691
692proc do_sh1add {} {
693    set testname "sh1add.s: sh1add tests"
694    set x 0
695
696    gas_start "sh1add.s" "-al"
697
698    # Check the assembled instruction against a table built by the HP assembler
699    # Any differences should be checked by hand -- with the number of problems
700    # I've seen in the HP assembler I don't completely trust it.
701    #
702    # Instead of having a variable for each match string just increment the
703    # total number of matches seen.  That's simpler when testing large numbers
704    # of instructions (as these tests to).
705    while 1 {
706	expect {
707	    -re "^ +\[0-9\]+ 0000 08A40646\[^\n\]*\n"	{ set x [expr $x+1] }
708	    -re "^ +\[0-9\]+ 0004 08A42646\[^\n\]*\n"	{ set x [expr $x+1] }
709	    -re "^ +\[0-9\]+ 0008 08A44646\[^\n\]*\n"	{ set x [expr $x+1] }
710	    -re "^ +\[0-9\]+ 000c 08A46646\[^\n\]*\n"	{ set x [expr $x+1] }
711	    -re "^ +\[0-9\]+ 0010 08A48646\[^\n\]*\n"	{ set x [expr $x+1] }
712	    -re "^ +\[0-9\]+ 0014 08A4A646\[^\n\]*\n"	{ set x [expr $x+1] }
713	    -re "^ +\[0-9\]+ 0018 08A4C646\[^\n\]*\n"	{ set x [expr $x+1] }
714	    -re "^ +\[0-9\]+ 001c 08A4E646\[^\n\]*\n"	{ set x [expr $x+1] }
715	    -re "^ +\[0-9\]+ 0020 08A41646\[^\n\]*\n"	{ set x [expr $x+1] }
716	    -re "^ +\[0-9\]+ 0024 08A43646\[^\n\]*\n"	{ set x [expr $x+1] }
717	    -re "^ +\[0-9\]+ 0028 08A45646\[^\n\]*\n"	{ set x [expr $x+1] }
718	    -re "^ +\[0-9\]+ 002c 08A47646\[^\n\]*\n"	{ set x [expr $x+1] }
719	    -re "^ +\[0-9\]+ 0030 08A49646\[^\n\]*\n"	{ set x [expr $x+1] }
720	    -re "^ +\[0-9\]+ 0034 08A4B646\[^\n\]*\n"	{ set x [expr $x+1] }
721	    -re "^ +\[0-9\]+ 0038 08A4D646\[^\n\]*\n"	{ set x [expr $x+1] }
722	    -re "^ +\[0-9\]+ 003c 08A4F646\[^\n\]*\n"	{ set x [expr $x+1] }
723	    -re "^ +\[0-9\]+ 0040 08A40A46\[^\n\]*\n"	{ set x [expr $x+1] }
724	    -re "^ +\[0-9\]+ 0044 08A42A46\[^\n\]*\n"	{ set x [expr $x+1] }
725	    -re "^ +\[0-9\]+ 0048 08A44A46\[^\n\]*\n"	{ set x [expr $x+1] }
726	    -re "^ +\[0-9\]+ 004c 08A46A46\[^\n\]*\n"	{ set x [expr $x+1] }
727	    -re "^ +\[0-9\]+ 0050 08A48A46\[^\n\]*\n"	{ set x [expr $x+1] }
728	    -re "^ +\[0-9\]+ 0054 08A4AA46\[^\n\]*\n"	{ set x [expr $x+1] }
729	    -re "^ +\[0-9\]+ 0058 08A4CA46\[^\n\]*\n"	{ set x [expr $x+1] }
730	    -re "^ +\[0-9\]+ 005c 08A4EA46\[^\n\]*\n"	{ set x [expr $x+1] }
731	    -re "^ +\[0-9\]+ 0060 08A41A46\[^\n\]*\n"	{ set x [expr $x+1] }
732	    -re "^ +\[0-9\]+ 0064 08A43A46\[^\n\]*\n"	{ set x [expr $x+1] }
733	    -re "^ +\[0-9\]+ 0068 08A45A46\[^\n\]*\n"	{ set x [expr $x+1] }
734	    -re "^ +\[0-9\]+ 006c 08A47A46\[^\n\]*\n"	{ set x [expr $x+1] }
735	    -re "^ +\[0-9\]+ 0070 08A49A46\[^\n\]*\n"	{ set x [expr $x+1] }
736	    -re "^ +\[0-9\]+ 0074 08A4BA46\[^\n\]*\n"	{ set x [expr $x+1] }
737	    -re "^ +\[0-9\]+ 0078 08A4DA46\[^\n\]*\n"	{ set x [expr $x+1] }
738	    -re "^ +\[0-9\]+ 007c 08A4FA46\[^\n\]*\n"	{ set x [expr $x+1] }
739	    -re "^ +\[0-9\]+ 0080 08A40E46\[^\n\]*\n"	{ set x [expr $x+1] }
740	    -re "^ +\[0-9\]+ 0084 08A42E46\[^\n\]*\n"	{ set x [expr $x+1] }
741	    -re "^ +\[0-9\]+ 0088 08A44E46\[^\n\]*\n"	{ set x [expr $x+1] }
742	    -re "^ +\[0-9\]+ 008c 08A46E46\[^\n\]*\n"	{ set x [expr $x+1] }
743	    -re "^ +\[0-9\]+ 0090 08A48E46\[^\n\]*\n"	{ set x [expr $x+1] }
744	    -re "^ +\[0-9\]+ 0094 08A4AE46\[^\n\]*\n"	{ set x [expr $x+1] }
745	    -re "^ +\[0-9\]+ 0098 08A4CE46\[^\n\]*\n"	{ set x [expr $x+1] }
746	    -re "^ +\[0-9\]+ 009c 08A4EE46\[^\n\]*\n"	{ set x [expr $x+1] }
747	    -re "^ +\[0-9\]+ 00a0 08A41E46\[^\n\]*\n"	{ set x [expr $x+1] }
748	    -re "^ +\[0-9\]+ 00a4 08A43E46\[^\n\]*\n"	{ set x [expr $x+1] }
749	    -re "^ +\[0-9\]+ 00a8 08A45E46\[^\n\]*\n"	{ set x [expr $x+1] }
750	    -re "^ +\[0-9\]+ 00ac 08A47E46\[^\n\]*\n"	{ set x [expr $x+1] }
751	    -re "^ +\[0-9\]+ 00b0 08A49E46\[^\n\]*\n"	{ set x [expr $x+1] }
752	    -re "^ +\[0-9\]+ 00b4 08A4BE46\[^\n\]*\n"	{ set x [expr $x+1] }
753	    -re "^ +\[0-9\]+ 00b8 08A4DE46\[^\n\]*\n"	{ set x [expr $x+1] }
754	    -re "^ +\[0-9\]+ 00bc 08A4FE46\[^\n\]*\n"	{ set x [expr $x+1] }
755	    -re "\[^\n\]*\n"				{ }
756	    timeout				{ perror "timeout\n"; break }
757	    eof					{ break }
758	}
759    }
760
761    # This was intended to do any cleanup necessary.  It kinda looks like it
762    # isn't needed, but just in case, please keep it in for now.
763    gas_finish
764
765    # Did we find what we were looking for?  If not, flunk it.
766    if [expr $x==48] then { pass $testname } else { fail $testname }
767}
768
769proc do_sh2add {} {
770    set testname "sh2add.s: sh2add tests"
771    set x 0
772
773    gas_start "sh2add.s" "-al"
774
775    # Check the assembled instruction against a table built by the HP assembler
776    # Any differences should be checked by hand -- with the number of problems
777    # I've seen in the HP assembler I don't completely trust it.
778    #
779    # Instead of having a variable for each match string just increment the
780    # total number of matches seen.  That's simpler when testing large numbers
781    # of instructions (as these tests to).
782    while 1 {
783	expect {
784	    -re "^ +\[0-9\]+ 0000 08A40686\[^\n\]*\n"	{ set x [expr $x+1] }
785	    -re "^ +\[0-9\]+ 0004 08A42686\[^\n\]*\n"	{ set x [expr $x+1] }
786	    -re "^ +\[0-9\]+ 0008 08A44686\[^\n\]*\n"	{ set x [expr $x+1] }
787	    -re "^ +\[0-9\]+ 000c 08A46686\[^\n\]*\n"	{ set x [expr $x+1] }
788	    -re "^ +\[0-9\]+ 0010 08A48686\[^\n\]*\n"	{ set x [expr $x+1] }
789	    -re "^ +\[0-9\]+ 0014 08A4A686\[^\n\]*\n"	{ set x [expr $x+1] }
790	    -re "^ +\[0-9\]+ 0018 08A4C686\[^\n\]*\n"	{ set x [expr $x+1] }
791	    -re "^ +\[0-9\]+ 001c 08A4E686\[^\n\]*\n"	{ set x [expr $x+1] }
792	    -re "^ +\[0-9\]+ 0020 08A41686\[^\n\]*\n"	{ set x [expr $x+1] }
793	    -re "^ +\[0-9\]+ 0024 08A43686\[^\n\]*\n"	{ set x [expr $x+1] }
794	    -re "^ +\[0-9\]+ 0028 08A45686\[^\n\]*\n"	{ set x [expr $x+1] }
795	    -re "^ +\[0-9\]+ 002c 08A47686\[^\n\]*\n"	{ set x [expr $x+1] }
796	    -re "^ +\[0-9\]+ 0030 08A49686\[^\n\]*\n"	{ set x [expr $x+1] }
797	    -re "^ +\[0-9\]+ 0034 08A4B686\[^\n\]*\n"	{ set x [expr $x+1] }
798	    -re "^ +\[0-9\]+ 0038 08A4D686\[^\n\]*\n"	{ set x [expr $x+1] }
799	    -re "^ +\[0-9\]+ 003c 08A4F686\[^\n\]*\n"	{ set x [expr $x+1] }
800	    -re "^ +\[0-9\]+ 0040 08A40A86\[^\n\]*\n"	{ set x [expr $x+1] }
801	    -re "^ +\[0-9\]+ 0044 08A42A86\[^\n\]*\n"	{ set x [expr $x+1] }
802	    -re "^ +\[0-9\]+ 0048 08A44A86\[^\n\]*\n"	{ set x [expr $x+1] }
803	    -re "^ +\[0-9\]+ 004c 08A46A86\[^\n\]*\n"	{ set x [expr $x+1] }
804	    -re "^ +\[0-9\]+ 0050 08A48A86\[^\n\]*\n"	{ set x [expr $x+1] }
805	    -re "^ +\[0-9\]+ 0054 08A4AA86\[^\n\]*\n"	{ set x [expr $x+1] }
806	    -re "^ +\[0-9\]+ 0058 08A4CA86\[^\n\]*\n"	{ set x [expr $x+1] }
807	    -re "^ +\[0-9\]+ 005c 08A4EA86\[^\n\]*\n"	{ set x [expr $x+1] }
808	    -re "^ +\[0-9\]+ 0060 08A41A86\[^\n\]*\n"	{ set x [expr $x+1] }
809	    -re "^ +\[0-9\]+ 0064 08A43A86\[^\n\]*\n"	{ set x [expr $x+1] }
810	    -re "^ +\[0-9\]+ 0068 08A45A86\[^\n\]*\n"	{ set x [expr $x+1] }
811	    -re "^ +\[0-9\]+ 006c 08A47A86\[^\n\]*\n"	{ set x [expr $x+1] }
812	    -re "^ +\[0-9\]+ 0070 08A49A86\[^\n\]*\n"	{ set x [expr $x+1] }
813	    -re "^ +\[0-9\]+ 0074 08A4BA86\[^\n\]*\n"	{ set x [expr $x+1] }
814	    -re "^ +\[0-9\]+ 0078 08A4DA86\[^\n\]*\n"	{ set x [expr $x+1] }
815	    -re "^ +\[0-9\]+ 007c 08A4FA86\[^\n\]*\n"	{ set x [expr $x+1] }
816	    -re "^ +\[0-9\]+ 0080 08A40E86\[^\n\]*\n"	{ set x [expr $x+1] }
817	    -re "^ +\[0-9\]+ 0084 08A42E86\[^\n\]*\n"	{ set x [expr $x+1] }
818	    -re "^ +\[0-9\]+ 0088 08A44E86\[^\n\]*\n"	{ set x [expr $x+1] }
819	    -re "^ +\[0-9\]+ 008c 08A46E86\[^\n\]*\n"	{ set x [expr $x+1] }
820	    -re "^ +\[0-9\]+ 0090 08A48E86\[^\n\]*\n"	{ set x [expr $x+1] }
821	    -re "^ +\[0-9\]+ 0094 08A4AE86\[^\n\]*\n"	{ set x [expr $x+1] }
822	    -re "^ +\[0-9\]+ 0098 08A4CE86\[^\n\]*\n"	{ set x [expr $x+1] }
823	    -re "^ +\[0-9\]+ 009c 08A4EE86\[^\n\]*\n"	{ set x [expr $x+1] }
824	    -re "^ +\[0-9\]+ 00a0 08A41E86\[^\n\]*\n"	{ set x [expr $x+1] }
825	    -re "^ +\[0-9\]+ 00a4 08A43E86\[^\n\]*\n"	{ set x [expr $x+1] }
826	    -re "^ +\[0-9\]+ 00a8 08A45E86\[^\n\]*\n"	{ set x [expr $x+1] }
827	    -re "^ +\[0-9\]+ 00ac 08A47E86\[^\n\]*\n"	{ set x [expr $x+1] }
828	    -re "^ +\[0-9\]+ 00b0 08A49E86\[^\n\]*\n"	{ set x [expr $x+1] }
829	    -re "^ +\[0-9\]+ 00b4 08A4BE86\[^\n\]*\n"	{ set x [expr $x+1] }
830	    -re "^ +\[0-9\]+ 00b8 08A4DE86\[^\n\]*\n"	{ set x [expr $x+1] }
831	    -re "^ +\[0-9\]+ 00bc 08A4FE86\[^\n\]*\n"	{ set x [expr $x+1] }
832	    -re "\[^\n\]*\n"				{ }
833	    timeout				{ perror "timeout\n"; break }
834	    eof					{ break }
835	}
836    }
837
838    # This was intended to do any cleanup necessary.  It kinda looks like it
839    # isn't needed, but just in case, please keep it in for now.
840    gas_finish
841
842    # Did we find what we were looking for?  If not, flunk it.
843    if [expr $x==48] then { pass $testname } else { fail $testname }
844}
845
846proc do_sh3add {} {
847    set testname "sh3add.s: sh3add tests"
848    set x 0
849
850    gas_start "sh3add.s" "-al"
851
852    # Check the assembled instruction against a table built by the HP assembler
853    # Any differences should be checked by hand -- with the number of problems
854    # I've seen in the HP assembler I don't completely trust it.
855    #
856    # Instead of having a variable for each match string just increment the
857    # total number of matches seen.  That's simpler when testing large numbers
858    # of instructions (as these tests to).
859    while 1 {
860	expect {
861	    -re "^ +\[0-9\]+ 0000 08A406C6\[^\n\]*\n"	{ set x [expr $x+1] }
862	    -re "^ +\[0-9\]+ 0004 08A426C6\[^\n\]*\n"	{ set x [expr $x+1] }
863	    -re "^ +\[0-9\]+ 0008 08A446C6\[^\n\]*\n"	{ set x [expr $x+1] }
864	    -re "^ +\[0-9\]+ 000c 08A466C6\[^\n\]*\n"	{ set x [expr $x+1] }
865	    -re "^ +\[0-9\]+ 0010 08A486C6\[^\n\]*\n"	{ set x [expr $x+1] }
866	    -re "^ +\[0-9\]+ 0014 08A4A6C6\[^\n\]*\n"	{ set x [expr $x+1] }
867	    -re "^ +\[0-9\]+ 0018 08A4C6C6\[^\n\]*\n"	{ set x [expr $x+1] }
868	    -re "^ +\[0-9\]+ 001c 08A4E6C6\[^\n\]*\n"	{ set x [expr $x+1] }
869	    -re "^ +\[0-9\]+ 0020 08A416C6\[^\n\]*\n"	{ set x [expr $x+1] }
870	    -re "^ +\[0-9\]+ 0024 08A436C6\[^\n\]*\n"	{ set x [expr $x+1] }
871	    -re "^ +\[0-9\]+ 0028 08A456C6\[^\n\]*\n"	{ set x [expr $x+1] }
872	    -re "^ +\[0-9\]+ 002c 08A476C6\[^\n\]*\n"	{ set x [expr $x+1] }
873	    -re "^ +\[0-9\]+ 0030 08A496C6\[^\n\]*\n"	{ set x [expr $x+1] }
874	    -re "^ +\[0-9\]+ 0034 08A4B6C6\[^\n\]*\n"	{ set x [expr $x+1] }
875	    -re "^ +\[0-9\]+ 0038 08A4D6C6\[^\n\]*\n"	{ set x [expr $x+1] }
876	    -re "^ +\[0-9\]+ 003c 08A4F6C6\[^\n\]*\n"	{ set x [expr $x+1] }
877	    -re "^ +\[0-9\]+ 0040 08A40AC6\[^\n\]*\n"	{ set x [expr $x+1] }
878	    -re "^ +\[0-9\]+ 0044 08A42AC6\[^\n\]*\n"	{ set x [expr $x+1] }
879	    -re "^ +\[0-9\]+ 0048 08A44AC6\[^\n\]*\n"	{ set x [expr $x+1] }
880	    -re "^ +\[0-9\]+ 004c 08A46AC6\[^\n\]*\n"	{ set x [expr $x+1] }
881	    -re "^ +\[0-9\]+ 0050 08A48AC6\[^\n\]*\n"	{ set x [expr $x+1] }
882	    -re "^ +\[0-9\]+ 0054 08A4AAC6\[^\n\]*\n"	{ set x [expr $x+1] }
883	    -re "^ +\[0-9\]+ 0058 08A4CAC6\[^\n\]*\n"	{ set x [expr $x+1] }
884	    -re "^ +\[0-9\]+ 005c 08A4EAC6\[^\n\]*\n"	{ set x [expr $x+1] }
885	    -re "^ +\[0-9\]+ 0060 08A41AC6\[^\n\]*\n"	{ set x [expr $x+1] }
886	    -re "^ +\[0-9\]+ 0064 08A43AC6\[^\n\]*\n"	{ set x [expr $x+1] }
887	    -re "^ +\[0-9\]+ 0068 08A45AC6\[^\n\]*\n"	{ set x [expr $x+1] }
888	    -re "^ +\[0-9\]+ 006c 08A47AC6\[^\n\]*\n"	{ set x [expr $x+1] }
889	    -re "^ +\[0-9\]+ 0070 08A49AC6\[^\n\]*\n"	{ set x [expr $x+1] }
890	    -re "^ +\[0-9\]+ 0074 08A4BAC6\[^\n\]*\n"	{ set x [expr $x+1] }
891	    -re "^ +\[0-9\]+ 0078 08A4DAC6\[^\n\]*\n"	{ set x [expr $x+1] }
892	    -re "^ +\[0-9\]+ 007c 08A4FAC6\[^\n\]*\n"	{ set x [expr $x+1] }
893	    -re "^ +\[0-9\]+ 0080 08A40EC6\[^\n\]*\n"	{ set x [expr $x+1] }
894	    -re "^ +\[0-9\]+ 0084 08A42EC6\[^\n\]*\n"	{ set x [expr $x+1] }
895	    -re "^ +\[0-9\]+ 0088 08A44EC6\[^\n\]*\n"	{ set x [expr $x+1] }
896	    -re "^ +\[0-9\]+ 008c 08A46EC6\[^\n\]*\n"	{ set x [expr $x+1] }
897	    -re "^ +\[0-9\]+ 0090 08A48EC6\[^\n\]*\n"	{ set x [expr $x+1] }
898	    -re "^ +\[0-9\]+ 0094 08A4AEC6\[^\n\]*\n"	{ set x [expr $x+1] }
899	    -re "^ +\[0-9\]+ 0098 08A4CEC6\[^\n\]*\n"	{ set x [expr $x+1] }
900	    -re "^ +\[0-9\]+ 009c 08A4EEC6\[^\n\]*\n"	{ set x [expr $x+1] }
901	    -re "^ +\[0-9\]+ 00a0 08A41EC6\[^\n\]*\n"	{ set x [expr $x+1] }
902	    -re "^ +\[0-9\]+ 00a4 08A43EC6\[^\n\]*\n"	{ set x [expr $x+1] }
903	    -re "^ +\[0-9\]+ 00a8 08A45EC6\[^\n\]*\n"	{ set x [expr $x+1] }
904	    -re "^ +\[0-9\]+ 00ac 08A47EC6\[^\n\]*\n"	{ set x [expr $x+1] }
905	    -re "^ +\[0-9\]+ 00b0 08A49EC6\[^\n\]*\n"	{ set x [expr $x+1] }
906	    -re "^ +\[0-9\]+ 00b4 08A4BEC6\[^\n\]*\n"	{ set x [expr $x+1] }
907	    -re "^ +\[0-9\]+ 00b8 08A4DEC6\[^\n\]*\n"	{ set x [expr $x+1] }
908	    -re "^ +\[0-9\]+ 00bc 08A4FEC6\[^\n\]*\n"	{ set x [expr $x+1] }
909	    -re "\[^\n\]*\n"				{ }
910	    timeout				{ perror "timeout\n"; break }
911	    eof					{ break }
912	}
913    }
914
915    # This was intended to do any cleanup necessary.  It kinda looks like it
916    # isn't needed, but just in case, please keep it in for now.
917    gas_finish
918
919    # Did we find what we were looking for?  If not, flunk it.
920    if [expr $x==48] then { pass $testname } else { fail $testname }
921}
922
923proc do_shladd {} {
924    set testname "shladd.s: shladd tests"
925    set x 0
926
927    gas_start "shladd.s" "-al"
928
929    # Check the assembled instruction against a table built by the HP assembler
930    # Any differences should be checked by hand -- with the number of problems
931    # I've seen in the HP assembler I don't completely trust it.
932    #
933    # Instead of having a variable for each match string just increment the
934    # total number of matches seen.  That's simpler when testing large numbers
935    # of instructions (as these tests to).
936    while 1 {
937	expect {
938	    -re "^ +\[0-9\]+ 0000 08A40646\[^\n\]*\n"	{ set x [expr $x+1] }
939	    -re "^ +\[0-9\]+ 0004 08A42646\[^\n\]*\n"	{ set x [expr $x+1] }
940	    -re "^ +\[0-9\]+ 0008 08A44646\[^\n\]*\n"	{ set x [expr $x+1] }
941	    -re "^ +\[0-9\]+ 000c 08A46646\[^\n\]*\n"	{ set x [expr $x+1] }
942	    -re "^ +\[0-9\]+ 0010 08A48646\[^\n\]*\n"	{ set x [expr $x+1] }
943	    -re "^ +\[0-9\]+ 0014 08A4A646\[^\n\]*\n"	{ set x [expr $x+1] }
944	    -re "^ +\[0-9\]+ 0018 08A4C646\[^\n\]*\n"	{ set x [expr $x+1] }
945	    -re "^ +\[0-9\]+ 001c 08A4E646\[^\n\]*\n"	{ set x [expr $x+1] }
946	    -re "^ +\[0-9\]+ 0020 08A41646\[^\n\]*\n"	{ set x [expr $x+1] }
947	    -re "^ +\[0-9\]+ 0024 08A43646\[^\n\]*\n"	{ set x [expr $x+1] }
948	    -re "^ +\[0-9\]+ 0028 08A45646\[^\n\]*\n"	{ set x [expr $x+1] }
949	    -re "^ +\[0-9\]+ 002c 08A47646\[^\n\]*\n"	{ set x [expr $x+1] }
950	    -re "^ +\[0-9\]+ 0030 08A49646\[^\n\]*\n"	{ set x [expr $x+1] }
951	    -re "^ +\[0-9\]+ 0034 08A4B646\[^\n\]*\n"	{ set x [expr $x+1] }
952	    -re "^ +\[0-9\]+ 0038 08A4D646\[^\n\]*\n"	{ set x [expr $x+1] }
953	    -re "^ +\[0-9\]+ 003c 08A4F646\[^\n\]*\n"	{ set x [expr $x+1] }
954	    -re "^ +\[0-9\]+ 0040 08A40A46\[^\n\]*\n"	{ set x [expr $x+1] }
955	    -re "^ +\[0-9\]+ 0044 08A42A46\[^\n\]*\n"	{ set x [expr $x+1] }
956	    -re "^ +\[0-9\]+ 0048 08A44A46\[^\n\]*\n"	{ set x [expr $x+1] }
957	    -re "^ +\[0-9\]+ 004c 08A46A46\[^\n\]*\n"	{ set x [expr $x+1] }
958	    -re "^ +\[0-9\]+ 0050 08A48A46\[^\n\]*\n"	{ set x [expr $x+1] }
959	    -re "^ +\[0-9\]+ 0054 08A4AA46\[^\n\]*\n"	{ set x [expr $x+1] }
960	    -re "^ +\[0-9\]+ 0058 08A4CA46\[^\n\]*\n"	{ set x [expr $x+1] }
961	    -re "^ +\[0-9\]+ 005c 08A4EA46\[^\n\]*\n"	{ set x [expr $x+1] }
962	    -re "^ +\[0-9\]+ 0060 08A41A46\[^\n\]*\n"	{ set x [expr $x+1] }
963	    -re "^ +\[0-9\]+ 0064 08A43A46\[^\n\]*\n"	{ set x [expr $x+1] }
964	    -re "^ +\[0-9\]+ 0068 08A45A46\[^\n\]*\n"	{ set x [expr $x+1] }
965	    -re "^ +\[0-9\]+ 006c 08A47A46\[^\n\]*\n"	{ set x [expr $x+1] }
966	    -re "^ +\[0-9\]+ 0070 08A49A46\[^\n\]*\n"	{ set x [expr $x+1] }
967	    -re "^ +\[0-9\]+ 0074 08A4BA46\[^\n\]*\n"	{ set x [expr $x+1] }
968	    -re "^ +\[0-9\]+ 0078 08A4DA46\[^\n\]*\n"	{ set x [expr $x+1] }
969	    -re "^ +\[0-9\]+ 007c 08A4FA46\[^\n\]*\n"	{ set x [expr $x+1] }
970	    -re "^ +\[0-9\]+ 0080 08A40E46\[^\n\]*\n"	{ set x [expr $x+1] }
971	    -re "^ +\[0-9\]+ 0084 08A42E46\[^\n\]*\n"	{ set x [expr $x+1] }
972	    -re "^ +\[0-9\]+ 0088 08A44E46\[^\n\]*\n"	{ set x [expr $x+1] }
973	    -re "^ +\[0-9\]+ 008c 08A46E46\[^\n\]*\n"	{ set x [expr $x+1] }
974	    -re "^ +\[0-9\]+ 0090 08A48E46\[^\n\]*\n"	{ set x [expr $x+1] }
975	    -re "^ +\[0-9\]+ 0094 08A4AE46\[^\n\]*\n"	{ set x [expr $x+1] }
976	    -re "^ +\[0-9\]+ 0098 08A4CE46\[^\n\]*\n"	{ set x [expr $x+1] }
977	    -re "^ +\[0-9\]+ 009c 08A4EE46\[^\n\]*\n"	{ set x [expr $x+1] }
978	    -re "^ +\[0-9\]+ 00a0 08A41E46\[^\n\]*\n"	{ set x [expr $x+1] }
979	    -re "^ +\[0-9\]+ 00a4 08A43E46\[^\n\]*\n"	{ set x [expr $x+1] }
980	    -re "^ +\[0-9\]+ 00a8 08A45E46\[^\n\]*\n"	{ set x [expr $x+1] }
981	    -re "^ +\[0-9\]+ 00ac 08A47E46\[^\n\]*\n"	{ set x [expr $x+1] }
982	    -re "^ +\[0-9\]+ 00b0 08A49E46\[^\n\]*\n"	{ set x [expr $x+1] }
983	    -re "^ +\[0-9\]+ 00b4 08A4BE46\[^\n\]*\n"	{ set x [expr $x+1] }
984	    -re "^ +\[0-9\]+ 00b8 08A4DE46\[^\n\]*\n"	{ set x [expr $x+1] }
985	    -re "^ +\[0-9\]+ 00bc 08A4FE46\[^\n\]*\n"	{ set x [expr $x+1] }
986	    -re "^ +\[0-9\]+ 00c0 08A40686\[^\n\]*\n"	{ set x [expr $x+1] }
987	    -re "^ +\[0-9\]+ 00c4 08A42686\[^\n\]*\n"	{ set x [expr $x+1] }
988	    -re "^ +\[0-9\]+ 00c8 08A44686\[^\n\]*\n"	{ set x [expr $x+1] }
989	    -re "^ +\[0-9\]+ 00cc 08A46686\[^\n\]*\n"	{ set x [expr $x+1] }
990	    -re "^ +\[0-9\]+ 00d0 08A48686\[^\n\]*\n"	{ set x [expr $x+1] }
991	    -re "^ +\[0-9\]+ 00d4 08A4A686\[^\n\]*\n"	{ set x [expr $x+1] }
992	    -re "^ +\[0-9\]+ 00d8 08A4C686\[^\n\]*\n"	{ set x [expr $x+1] }
993	    -re "^ +\[0-9\]+ 00dc 08A4E686\[^\n\]*\n"	{ set x [expr $x+1] }
994	    -re "^ +\[0-9\]+ 00e0 08A41686\[^\n\]*\n"	{ set x [expr $x+1] }
995	    -re "^ +\[0-9\]+ 00e4 08A43686\[^\n\]*\n"	{ set x [expr $x+1] }
996	    -re "^ +\[0-9\]+ 00e8 08A45686\[^\n\]*\n"	{ set x [expr $x+1] }
997	    -re "^ +\[0-9\]+ 00ec 08A47686\[^\n\]*\n"	{ set x [expr $x+1] }
998	    -re "^ +\[0-9\]+ 00f0 08A49686\[^\n\]*\n"	{ set x [expr $x+1] }
999	    -re "^ +\[0-9\]+ 00f4 08A4B686\[^\n\]*\n"	{ set x [expr $x+1] }
1000	    -re "^ +\[0-9\]+ 00f8 08A4D686\[^\n\]*\n"	{ set x [expr $x+1] }
1001	    -re "^ +\[0-9\]+ 00fc 08A4F686\[^\n\]*\n"	{ set x [expr $x+1] }
1002	    -re "^ +\[0-9\]+ 0100 08A40A86\[^\n\]*\n"	{ set x [expr $x+1] }
1003	    -re "^ +\[0-9\]+ 0104 08A42A86\[^\n\]*\n"	{ set x [expr $x+1] }
1004	    -re "^ +\[0-9\]+ 0108 08A44A86\[^\n\]*\n"	{ set x [expr $x+1] }
1005	    -re "^ +\[0-9\]+ 010c 08A46A86\[^\n\]*\n"	{ set x [expr $x+1] }
1006	    -re "^ +\[0-9\]+ 0110 08A48A86\[^\n\]*\n"	{ set x [expr $x+1] }
1007	    -re "^ +\[0-9\]+ 0114 08A4AA86\[^\n\]*\n"	{ set x [expr $x+1] }
1008	    -re "^ +\[0-9\]+ 0118 08A4CA86\[^\n\]*\n"	{ set x [expr $x+1] }
1009	    -re "^ +\[0-9\]+ 011c 08A4EA86\[^\n\]*\n"	{ set x [expr $x+1] }
1010	    -re "^ +\[0-9\]+ 0120 08A41A86\[^\n\]*\n"	{ set x [expr $x+1] }
1011	    -re "^ +\[0-9\]+ 0124 08A43A86\[^\n\]*\n"	{ set x [expr $x+1] }
1012	    -re "^ +\[0-9\]+ 0128 08A45A86\[^\n\]*\n"	{ set x [expr $x+1] }
1013	    -re "^ +\[0-9\]+ 012c 08A47A86\[^\n\]*\n"	{ set x [expr $x+1] }
1014	    -re "^ +\[0-9\]+ 0130 08A49A86\[^\n\]*\n"	{ set x [expr $x+1] }
1015	    -re "^ +\[0-9\]+ 0134 08A4BA86\[^\n\]*\n"	{ set x [expr $x+1] }
1016	    -re "^ +\[0-9\]+ 0138 08A4DA86\[^\n\]*\n"	{ set x [expr $x+1] }
1017	    -re "^ +\[0-9\]+ 013c 08A4FA86\[^\n\]*\n"	{ set x [expr $x+1] }
1018	    -re "^ +\[0-9\]+ 0140 08A40E86\[^\n\]*\n"	{ set x [expr $x+1] }
1019	    -re "^ +\[0-9\]+ 0144 08A42E86\[^\n\]*\n"	{ set x [expr $x+1] }
1020	    -re "^ +\[0-9\]+ 0148 08A44E86\[^\n\]*\n"	{ set x [expr $x+1] }
1021	    -re "^ +\[0-9\]+ 014c 08A46E86\[^\n\]*\n"	{ set x [expr $x+1] }
1022	    -re "^ +\[0-9\]+ 0150 08A48E86\[^\n\]*\n"	{ set x [expr $x+1] }
1023	    -re "^ +\[0-9\]+ 0154 08A4AE86\[^\n\]*\n"	{ set x [expr $x+1] }
1024	    -re "^ +\[0-9\]+ 0158 08A4CE86\[^\n\]*\n"	{ set x [expr $x+1] }
1025	    -re "^ +\[0-9\]+ 015c 08A4EE86\[^\n\]*\n"	{ set x [expr $x+1] }
1026	    -re "^ +\[0-9\]+ 0160 08A41E86\[^\n\]*\n"	{ set x [expr $x+1] }
1027	    -re "^ +\[0-9\]+ 0164 08A43E86\[^\n\]*\n"	{ set x [expr $x+1] }
1028	    -re "^ +\[0-9\]+ 0168 08A45E86\[^\n\]*\n"	{ set x [expr $x+1] }
1029	    -re "^ +\[0-9\]+ 016c 08A47E86\[^\n\]*\n"	{ set x [expr $x+1] }
1030	    -re "^ +\[0-9\]+ 0170 08A49E86\[^\n\]*\n"	{ set x [expr $x+1] }
1031	    -re "^ +\[0-9\]+ 0174 08A4BE86\[^\n\]*\n"	{ set x [expr $x+1] }
1032	    -re "^ +\[0-9\]+ 0178 08A4DE86\[^\n\]*\n"	{ set x [expr $x+1] }
1033	    -re "^ +\[0-9\]+ 017c 08A4FE86\[^\n\]*\n"	{ set x [expr $x+1] }
1034	    -re "^ +\[0-9\]+ 0180 08A406C6\[^\n\]*\n"	{ set x [expr $x+1] }
1035	    -re "^ +\[0-9\]+ 0184 08A426C6\[^\n\]*\n"	{ set x [expr $x+1] }
1036	    -re "^ +\[0-9\]+ 0188 08A446C6\[^\n\]*\n"	{ set x [expr $x+1] }
1037	    -re "^ +\[0-9\]+ 018c 08A466C6\[^\n\]*\n"	{ set x [expr $x+1] }
1038	    -re "^ +\[0-9\]+ 0190 08A486C6\[^\n\]*\n"	{ set x [expr $x+1] }
1039	    -re "^ +\[0-9\]+ 0194 08A4A6C6\[^\n\]*\n"	{ set x [expr $x+1] }
1040	    -re "^ +\[0-9\]+ 0198 08A4C6C6\[^\n\]*\n"	{ set x [expr $x+1] }
1041	    -re "^ +\[0-9\]+ 019c 08A4E6C6\[^\n\]*\n"	{ set x [expr $x+1] }
1042	    -re "^ +\[0-9\]+ 01a0 08A416C6\[^\n\]*\n"	{ set x [expr $x+1] }
1043	    -re "^ +\[0-9\]+ 01a4 08A436C6\[^\n\]*\n"	{ set x [expr $x+1] }
1044	    -re "^ +\[0-9\]+ 01a8 08A456C6\[^\n\]*\n"	{ set x [expr $x+1] }
1045	    -re "^ +\[0-9\]+ 01ac 08A476C6\[^\n\]*\n"	{ set x [expr $x+1] }
1046	    -re "^ +\[0-9\]+ 01b0 08A496C6\[^\n\]*\n"	{ set x [expr $x+1] }
1047	    -re "^ +\[0-9\]+ 01b4 08A4B6C6\[^\n\]*\n"	{ set x [expr $x+1] }
1048	    -re "^ +\[0-9\]+ 01b8 08A4D6C6\[^\n\]*\n"	{ set x [expr $x+1] }
1049	    -re "^ +\[0-9\]+ 01bc 08A4F6C6\[^\n\]*\n"	{ set x [expr $x+1] }
1050	    -re "^ +\[0-9\]+ 01c0 08A40AC6\[^\n\]*\n"	{ set x [expr $x+1] }
1051	    -re "^ +\[0-9\]+ 01c4 08A42AC6\[^\n\]*\n"	{ set x [expr $x+1] }
1052	    -re "^ +\[0-9\]+ 01c8 08A44AC6\[^\n\]*\n"	{ set x [expr $x+1] }
1053	    -re "^ +\[0-9\]+ 01cc 08A46AC6\[^\n\]*\n"	{ set x [expr $x+1] }
1054	    -re "^ +\[0-9\]+ 01d0 08A48AC6\[^\n\]*\n"	{ set x [expr $x+1] }
1055	    -re "^ +\[0-9\]+ 01d4 08A4AAC6\[^\n\]*\n"	{ set x [expr $x+1] }
1056	    -re "^ +\[0-9\]+ 01d8 08A4CAC6\[^\n\]*\n"	{ set x [expr $x+1] }
1057	    -re "^ +\[0-9\]+ 01dc 08A4EAC6\[^\n\]*\n"	{ set x [expr $x+1] }
1058	    -re "^ +\[0-9\]+ 01e0 08A41AC6\[^\n\]*\n"	{ set x [expr $x+1] }
1059	    -re "^ +\[0-9\]+ 01e4 08A43AC6\[^\n\]*\n"	{ set x [expr $x+1] }
1060	    -re "^ +\[0-9\]+ 01e8 08A45AC6\[^\n\]*\n"	{ set x [expr $x+1] }
1061	    -re "^ +\[0-9\]+ 01ec 08A47AC6\[^\n\]*\n"	{ set x [expr $x+1] }
1062	    -re "^ +\[0-9\]+ 01f0 08A49AC6\[^\n\]*\n"	{ set x [expr $x+1] }
1063	    -re "^ +\[0-9\]+ 01f4 08A4BAC6\[^\n\]*\n"	{ set x [expr $x+1] }
1064	    -re "^ +\[0-9\]+ 01f8 08A4DAC6\[^\n\]*\n"	{ set x [expr $x+1] }
1065	    -re "^ +\[0-9\]+ 01fc 08A4FAC6\[^\n\]*\n"	{ set x [expr $x+1] }
1066	    -re "^ +\[0-9\]+ 0200 08A40EC6\[^\n\]*\n"	{ set x [expr $x+1] }
1067	    -re "^ +\[0-9\]+ 0204 08A42EC6\[^\n\]*\n"	{ set x [expr $x+1] }
1068	    -re "^ +\[0-9\]+ 0208 08A44EC6\[^\n\]*\n"	{ set x [expr $x+1] }
1069	    -re "^ +\[0-9\]+ 020c 08A46EC6\[^\n\]*\n"	{ set x [expr $x+1] }
1070	    -re "^ +\[0-9\]+ 0210 08A48EC6\[^\n\]*\n"	{ set x [expr $x+1] }
1071	    -re "^ +\[0-9\]+ 0214 08A4AEC6\[^\n\]*\n"	{ set x [expr $x+1] }
1072	    -re "^ +\[0-9\]+ 0218 08A4CEC6\[^\n\]*\n"	{ set x [expr $x+1] }
1073	    -re "^ +\[0-9\]+ 021c 08A4EEC6\[^\n\]*\n"	{ set x [expr $x+1] }
1074	    -re "^ +\[0-9\]+ 0220 08A41EC6\[^\n\]*\n"	{ set x [expr $x+1] }
1075	    -re "^ +\[0-9\]+ 0224 08A43EC6\[^\n\]*\n"	{ set x [expr $x+1] }
1076	    -re "^ +\[0-9\]+ 0228 08A45EC6\[^\n\]*\n"	{ set x [expr $x+1] }
1077	    -re "^ +\[0-9\]+ 022c 08A47EC6\[^\n\]*\n"	{ set x [expr $x+1] }
1078	    -re "^ +\[0-9\]+ 0230 08A49EC6\[^\n\]*\n"	{ set x [expr $x+1] }
1079	    -re "^ +\[0-9\]+ 0234 08A4BEC6\[^\n\]*\n"	{ set x [expr $x+1] }
1080	    -re "^ +\[0-9\]+ 0238 08A4DEC6\[^\n\]*\n"	{ set x [expr $x+1] }
1081	    -re "^ +\[0-9\]+ 023c 08A4FEC6\[^\n\]*\n"	{ set x [expr $x+1] }
1082	    -re "\[^\n\]*\n"				{ }
1083	    timeout				{ perror "timeout\n"; break }
1084	    eof					{ break }
1085	}
1086    }
1087
1088    # This was intended to do any cleanup necessary.  It kinda looks like it
1089    # isn't needed, but just in case, please keep it in for now.
1090    gas_finish
1091
1092    # Did we find what we were looking for?  If not, flunk it.
1093    if [expr $x==144] then { pass $testname } else { fail $testname }
1094}
1095
1096proc do_shladd2 {} {
1097    set testname "shladd2.s: shladd2 tests"
1098    set x 0
1099
1100    gas_start "shladd2.s" "-al"
1101
1102    # Check the assembled instruction against a table built by the HP assembler
1103    # Any differences should be checked by hand -- with the number of problems
1104    # I've seen in the HP assembler I don't completely trust it.
1105    #
1106    # Instead of having a variable for each match string just increment the
1107    # total number of matches seen.  That's simpler when testing large numbers
1108    # of instructions (as these tests to).
1109    while 1 {
1110	expect {
1111	    -re "^ +\[0-9\]+ 0000 08A40666\[^\n\]*\n"	{ set x [expr $x+1] }
1112	    -re "^ +\[0-9\]+ 0004 08A42666\[^\n\]*\n"	{ set x [expr $x+1] }
1113	    -re "^ +\[0-9\]+ 0008 08A44666\[^\n\]*\n"	{ set x [expr $x+1] }
1114	    -re "^ +\[0-9\]+ 000c 08A46666\[^\n\]*\n"	{ set x [expr $x+1] }
1115	    -re "^ +\[0-9\]+ 0010 08A48666\[^\n\]*\n"	{ set x [expr $x+1] }
1116	    -re "^ +\[0-9\]+ 0014 08A4A666\[^\n\]*\n"	{ set x [expr $x+1] }
1117	    -re "^ +\[0-9\]+ 0018 08A4C666\[^\n\]*\n"	{ set x [expr $x+1] }
1118	    -re "^ +\[0-9\]+ 001c 08A4E666\[^\n\]*\n"	{ set x [expr $x+1] }
1119	    -re "^ +\[0-9\]+ 0020 08A41666\[^\n\]*\n"	{ set x [expr $x+1] }
1120	    -re "^ +\[0-9\]+ 0024 08A43666\[^\n\]*\n"	{ set x [expr $x+1] }
1121	    -re "^ +\[0-9\]+ 0028 08A45666\[^\n\]*\n"	{ set x [expr $x+1] }
1122	    -re "^ +\[0-9\]+ 002c 08A47666\[^\n\]*\n"	{ set x [expr $x+1] }
1123	    -re "^ +\[0-9\]+ 0030 08A49666\[^\n\]*\n"	{ set x [expr $x+1] }
1124	    -re "^ +\[0-9\]+ 0034 08A4B666\[^\n\]*\n"	{ set x [expr $x+1] }
1125	    -re "^ +\[0-9\]+ 0038 08A4D666\[^\n\]*\n"	{ set x [expr $x+1] }
1126	    -re "^ +\[0-9\]+ 003c 08A4F666\[^\n\]*\n"	{ set x [expr $x+1] }
1127	    -re "^ +\[0-9\]+ 0040 08A40A66\[^\n\]*\n"	{ set x [expr $x+1] }
1128	    -re "^ +\[0-9\]+ 0044 08A42A66\[^\n\]*\n"	{ set x [expr $x+1] }
1129	    -re "^ +\[0-9\]+ 0048 08A44A66\[^\n\]*\n"	{ set x [expr $x+1] }
1130	    -re "^ +\[0-9\]+ 004c 08A46A66\[^\n\]*\n"	{ set x [expr $x+1] }
1131	    -re "^ +\[0-9\]+ 0050 08A48A66\[^\n\]*\n"	{ set x [expr $x+1] }
1132	    -re "^ +\[0-9\]+ 0054 08A4AA66\[^\n\]*\n"	{ set x [expr $x+1] }
1133	    -re "^ +\[0-9\]+ 0058 08A4CA66\[^\n\]*\n"	{ set x [expr $x+1] }
1134	    -re "^ +\[0-9\]+ 005c 08A4EA66\[^\n\]*\n"	{ set x [expr $x+1] }
1135	    -re "^ +\[0-9\]+ 0060 08A41A66\[^\n\]*\n"	{ set x [expr $x+1] }
1136	    -re "^ +\[0-9\]+ 0064 08A43A66\[^\n\]*\n"	{ set x [expr $x+1] }
1137	    -re "^ +\[0-9\]+ 0068 08A45A66\[^\n\]*\n"	{ set x [expr $x+1] }
1138	    -re "^ +\[0-9\]+ 006c 08A47A66\[^\n\]*\n"	{ set x [expr $x+1] }
1139	    -re "^ +\[0-9\]+ 0070 08A49A66\[^\n\]*\n"	{ set x [expr $x+1] }
1140	    -re "^ +\[0-9\]+ 0074 08A4BA66\[^\n\]*\n"	{ set x [expr $x+1] }
1141	    -re "^ +\[0-9\]+ 0078 08A4DA66\[^\n\]*\n"	{ set x [expr $x+1] }
1142	    -re "^ +\[0-9\]+ 007c 08A4FA66\[^\n\]*\n"	{ set x [expr $x+1] }
1143	    -re "^ +\[0-9\]+ 0080 08A40E66\[^\n\]*\n"	{ set x [expr $x+1] }
1144	    -re "^ +\[0-9\]+ 0084 08A42E66\[^\n\]*\n"	{ set x [expr $x+1] }
1145	    -re "^ +\[0-9\]+ 0088 08A44E66\[^\n\]*\n"	{ set x [expr $x+1] }
1146	    -re "^ +\[0-9\]+ 008c 08A46E66\[^\n\]*\n"	{ set x [expr $x+1] }
1147	    -re "^ +\[0-9\]+ 0090 08A48E66\[^\n\]*\n"	{ set x [expr $x+1] }
1148	    -re "^ +\[0-9\]+ 0094 08A4AE66\[^\n\]*\n"	{ set x [expr $x+1] }
1149	    -re "^ +\[0-9\]+ 0098 08A4CE66\[^\n\]*\n"	{ set x [expr $x+1] }
1150	    -re "^ +\[0-9\]+ 009c 08A4EE66\[^\n\]*\n"	{ set x [expr $x+1] }
1151	    -re "^ +\[0-9\]+ 00a0 08A41E66\[^\n\]*\n"	{ set x [expr $x+1] }
1152	    -re "^ +\[0-9\]+ 00a4 08A43E66\[^\n\]*\n"	{ set x [expr $x+1] }
1153	    -re "^ +\[0-9\]+ 00a8 08A45E66\[^\n\]*\n"	{ set x [expr $x+1] }
1154	    -re "^ +\[0-9\]+ 00ac 08A47E66\[^\n\]*\n"	{ set x [expr $x+1] }
1155	    -re "^ +\[0-9\]+ 00b0 08A49E66\[^\n\]*\n"	{ set x [expr $x+1] }
1156	    -re "^ +\[0-9\]+ 00b4 08A4BE66\[^\n\]*\n"	{ set x [expr $x+1] }
1157	    -re "^ +\[0-9\]+ 00b8 08A4DE66\[^\n\]*\n"	{ set x [expr $x+1] }
1158	    -re "^ +\[0-9\]+ 00bc 08A4FE66\[^\n\]*\n"	{ set x [expr $x+1] }
1159	    -re "^ +\[0-9\]+ 00c0 08A406A6\[^\n\]*\n"	{ set x [expr $x+1] }
1160	    -re "^ +\[0-9\]+ 00c4 08A426A6\[^\n\]*\n"	{ set x [expr $x+1] }
1161	    -re "^ +\[0-9\]+ 00c8 08A446A6\[^\n\]*\n"	{ set x [expr $x+1] }
1162	    -re "^ +\[0-9\]+ 00cc 08A466A6\[^\n\]*\n"	{ set x [expr $x+1] }
1163	    -re "^ +\[0-9\]+ 00d0 08A486A6\[^\n\]*\n"	{ set x [expr $x+1] }
1164	    -re "^ +\[0-9\]+ 00d4 08A4A6A6\[^\n\]*\n"	{ set x [expr $x+1] }
1165	    -re "^ +\[0-9\]+ 00d8 08A4C6A6\[^\n\]*\n"	{ set x [expr $x+1] }
1166	    -re "^ +\[0-9\]+ 00dc 08A4E6A6\[^\n\]*\n"	{ set x [expr $x+1] }
1167	    -re "^ +\[0-9\]+ 00e0 08A416A6\[^\n\]*\n"	{ set x [expr $x+1] }
1168	    -re "^ +\[0-9\]+ 00e4 08A436A6\[^\n\]*\n"	{ set x [expr $x+1] }
1169	    -re "^ +\[0-9\]+ 00e8 08A456A6\[^\n\]*\n"	{ set x [expr $x+1] }
1170	    -re "^ +\[0-9\]+ 00ec 08A476A6\[^\n\]*\n"	{ set x [expr $x+1] }
1171	    -re "^ +\[0-9\]+ 00f0 08A496A6\[^\n\]*\n"	{ set x [expr $x+1] }
1172	    -re "^ +\[0-9\]+ 00f4 08A4B6A6\[^\n\]*\n"	{ set x [expr $x+1] }
1173	    -re "^ +\[0-9\]+ 00f8 08A4D6A6\[^\n\]*\n"	{ set x [expr $x+1] }
1174	    -re "^ +\[0-9\]+ 00fc 08A4F6A6\[^\n\]*\n"	{ set x [expr $x+1] }
1175	    -re "^ +\[0-9\]+ 0100 08A40AA6\[^\n\]*\n"	{ set x [expr $x+1] }
1176	    -re "^ +\[0-9\]+ 0104 08A42AA6\[^\n\]*\n"	{ set x [expr $x+1] }
1177	    -re "^ +\[0-9\]+ 0108 08A44AA6\[^\n\]*\n"	{ set x [expr $x+1] }
1178	    -re "^ +\[0-9\]+ 010c 08A46AA6\[^\n\]*\n"	{ set x [expr $x+1] }
1179	    -re "^ +\[0-9\]+ 0110 08A48AA6\[^\n\]*\n"	{ set x [expr $x+1] }
1180	    -re "^ +\[0-9\]+ 0114 08A4AAA6\[^\n\]*\n"	{ set x [expr $x+1] }
1181	    -re "^ +\[0-9\]+ 0118 08A4CAA6\[^\n\]*\n"	{ set x [expr $x+1] }
1182	    -re "^ +\[0-9\]+ 011c 08A4EAA6\[^\n\]*\n"	{ set x [expr $x+1] }
1183	    -re "^ +\[0-9\]+ 0120 08A41AA6\[^\n\]*\n"	{ set x [expr $x+1] }
1184	    -re "^ +\[0-9\]+ 0124 08A43AA6\[^\n\]*\n"	{ set x [expr $x+1] }
1185	    -re "^ +\[0-9\]+ 0128 08A45AA6\[^\n\]*\n"	{ set x [expr $x+1] }
1186	    -re "^ +\[0-9\]+ 012c 08A47AA6\[^\n\]*\n"	{ set x [expr $x+1] }
1187	    -re "^ +\[0-9\]+ 0130 08A49AA6\[^\n\]*\n"	{ set x [expr $x+1] }
1188	    -re "^ +\[0-9\]+ 0134 08A4BAA6\[^\n\]*\n"	{ set x [expr $x+1] }
1189	    -re "^ +\[0-9\]+ 0138 08A4DAA6\[^\n\]*\n"	{ set x [expr $x+1] }
1190	    -re "^ +\[0-9\]+ 013c 08A4FAA6\[^\n\]*\n"	{ set x [expr $x+1] }
1191	    -re "^ +\[0-9\]+ 0140 08A40EA6\[^\n\]*\n"	{ set x [expr $x+1] }
1192	    -re "^ +\[0-9\]+ 0144 08A42EA6\[^\n\]*\n"	{ set x [expr $x+1] }
1193	    -re "^ +\[0-9\]+ 0148 08A44EA6\[^\n\]*\n"	{ set x [expr $x+1] }
1194	    -re "^ +\[0-9\]+ 014c 08A46EA6\[^\n\]*\n"	{ set x [expr $x+1] }
1195	    -re "^ +\[0-9\]+ 0150 08A48EA6\[^\n\]*\n"	{ set x [expr $x+1] }
1196	    -re "^ +\[0-9\]+ 0154 08A4AEA6\[^\n\]*\n"	{ set x [expr $x+1] }
1197	    -re "^ +\[0-9\]+ 0158 08A4CEA6\[^\n\]*\n"	{ set x [expr $x+1] }
1198	    -re "^ +\[0-9\]+ 015c 08A4EEA6\[^\n\]*\n"	{ set x [expr $x+1] }
1199	    -re "^ +\[0-9\]+ 0160 08A41EA6\[^\n\]*\n"	{ set x [expr $x+1] }
1200	    -re "^ +\[0-9\]+ 0164 08A43EA6\[^\n\]*\n"	{ set x [expr $x+1] }
1201	    -re "^ +\[0-9\]+ 0168 08A45EA6\[^\n\]*\n"	{ set x [expr $x+1] }
1202	    -re "^ +\[0-9\]+ 016c 08A47EA6\[^\n\]*\n"	{ set x [expr $x+1] }
1203	    -re "^ +\[0-9\]+ 0170 08A49EA6\[^\n\]*\n"	{ set x [expr $x+1] }
1204	    -re "^ +\[0-9\]+ 0174 08A4BEA6\[^\n\]*\n"	{ set x [expr $x+1] }
1205	    -re "^ +\[0-9\]+ 0178 08A4DEA6\[^\n\]*\n"	{ set x [expr $x+1] }
1206	    -re "^ +\[0-9\]+ 017c 08A4FEA6\[^\n\]*\n"	{ set x [expr $x+1] }
1207	    -re "^ +\[0-9\]+ 0180 08A406E6\[^\n\]*\n"	{ set x [expr $x+1] }
1208	    -re "^ +\[0-9\]+ 0184 08A426E6\[^\n\]*\n"	{ set x [expr $x+1] }
1209	    -re "^ +\[0-9\]+ 0188 08A446E6\[^\n\]*\n"	{ set x [expr $x+1] }
1210	    -re "^ +\[0-9\]+ 018c 08A466E6\[^\n\]*\n"	{ set x [expr $x+1] }
1211	    -re "^ +\[0-9\]+ 0190 08A486E6\[^\n\]*\n"	{ set x [expr $x+1] }
1212	    -re "^ +\[0-9\]+ 0194 08A4A6E6\[^\n\]*\n"	{ set x [expr $x+1] }
1213	    -re "^ +\[0-9\]+ 0198 08A4C6E6\[^\n\]*\n"	{ set x [expr $x+1] }
1214	    -re "^ +\[0-9\]+ 019c 08A4E6E6\[^\n\]*\n"	{ set x [expr $x+1] }
1215	    -re "^ +\[0-9\]+ 01a0 08A416E6\[^\n\]*\n"	{ set x [expr $x+1] }
1216	    -re "^ +\[0-9\]+ 01a4 08A436E6\[^\n\]*\n"	{ set x [expr $x+1] }
1217	    -re "^ +\[0-9\]+ 01a8 08A456E6\[^\n\]*\n"	{ set x [expr $x+1] }
1218	    -re "^ +\[0-9\]+ 01ac 08A476E6\[^\n\]*\n"	{ set x [expr $x+1] }
1219	    -re "^ +\[0-9\]+ 01b0 08A496E6\[^\n\]*\n"	{ set x [expr $x+1] }
1220	    -re "^ +\[0-9\]+ 01b4 08A4B6E6\[^\n\]*\n"	{ set x [expr $x+1] }
1221	    -re "^ +\[0-9\]+ 01b8 08A4D6E6\[^\n\]*\n"	{ set x [expr $x+1] }
1222	    -re "^ +\[0-9\]+ 01bc 08A4F6E6\[^\n\]*\n"	{ set x [expr $x+1] }
1223	    -re "^ +\[0-9\]+ 01c0 08A40AE6\[^\n\]*\n"	{ set x [expr $x+1] }
1224	    -re "^ +\[0-9\]+ 01c4 08A42AE6\[^\n\]*\n"	{ set x [expr $x+1] }
1225	    -re "^ +\[0-9\]+ 01c8 08A44AE6\[^\n\]*\n"	{ set x [expr $x+1] }
1226	    -re "^ +\[0-9\]+ 01cc 08A46AE6\[^\n\]*\n"	{ set x [expr $x+1] }
1227	    -re "^ +\[0-9\]+ 01d0 08A48AE6\[^\n\]*\n"	{ set x [expr $x+1] }
1228	    -re "^ +\[0-9\]+ 01d4 08A4AAE6\[^\n\]*\n"	{ set x [expr $x+1] }
1229	    -re "^ +\[0-9\]+ 01d8 08A4CAE6\[^\n\]*\n"	{ set x [expr $x+1] }
1230	    -re "^ +\[0-9\]+ 01dc 08A4EAE6\[^\n\]*\n"	{ set x [expr $x+1] }
1231	    -re "^ +\[0-9\]+ 01e0 08A41AE6\[^\n\]*\n"	{ set x [expr $x+1] }
1232	    -re "^ +\[0-9\]+ 01e4 08A43AE6\[^\n\]*\n"	{ set x [expr $x+1] }
1233	    -re "^ +\[0-9\]+ 01e8 08A45AE6\[^\n\]*\n"	{ set x [expr $x+1] }
1234	    -re "^ +\[0-9\]+ 01ec 08A47AE6\[^\n\]*\n"	{ set x [expr $x+1] }
1235	    -re "^ +\[0-9\]+ 01f0 08A49AE6\[^\n\]*\n"	{ set x [expr $x+1] }
1236	    -re "^ +\[0-9\]+ 01f4 08A4BAE6\[^\n\]*\n"	{ set x [expr $x+1] }
1237	    -re "^ +\[0-9\]+ 01f8 08A4DAE6\[^\n\]*\n"	{ set x [expr $x+1] }
1238	    -re "^ +\[0-9\]+ 01fc 08A4FAE6\[^\n\]*\n"	{ set x [expr $x+1] }
1239	    -re "^ +\[0-9\]+ 0200 08A40EE6\[^\n\]*\n"	{ set x [expr $x+1] }
1240	    -re "^ +\[0-9\]+ 0204 08A42EE6\[^\n\]*\n"	{ set x [expr $x+1] }
1241	    -re "^ +\[0-9\]+ 0208 08A44EE6\[^\n\]*\n"	{ set x [expr $x+1] }
1242	    -re "^ +\[0-9\]+ 020c 08A46EE6\[^\n\]*\n"	{ set x [expr $x+1] }
1243	    -re "^ +\[0-9\]+ 0210 08A48EE6\[^\n\]*\n"	{ set x [expr $x+1] }
1244	    -re "^ +\[0-9\]+ 0214 08A4AEE6\[^\n\]*\n"	{ set x [expr $x+1] }
1245	    -re "^ +\[0-9\]+ 0218 08A4CEE6\[^\n\]*\n"	{ set x [expr $x+1] }
1246	    -re "^ +\[0-9\]+ 021c 08A4EEE6\[^\n\]*\n"	{ set x [expr $x+1] }
1247	    -re "^ +\[0-9\]+ 0220 08A41EE6\[^\n\]*\n"	{ set x [expr $x+1] }
1248	    -re "^ +\[0-9\]+ 0224 08A43EE6\[^\n\]*\n"	{ set x [expr $x+1] }
1249	    -re "^ +\[0-9\]+ 0228 08A45EE6\[^\n\]*\n"	{ set x [expr $x+1] }
1250	    -re "^ +\[0-9\]+ 022c 08A47EE6\[^\n\]*\n"	{ set x [expr $x+1] }
1251	    -re "^ +\[0-9\]+ 0230 08A49EE6\[^\n\]*\n"	{ set x [expr $x+1] }
1252	    -re "^ +\[0-9\]+ 0234 08A4BEE6\[^\n\]*\n"	{ set x [expr $x+1] }
1253	    -re "^ +\[0-9\]+ 0238 08A4DEE6\[^\n\]*\n"	{ set x [expr $x+1] }
1254	    -re "^ +\[0-9\]+ 023c 08A4FEE6\[^\n\]*\n"	{ set x [expr $x+1] }
1255	    -re "\[^\n\]*\n"				{ }
1256	    timeout				{ perror "timeout\n"; break }
1257	    eof					{ break }
1258	}
1259    }
1260
1261    # This was intended to do any cleanup necessary.  It kinda looks like it
1262    # isn't needed, but just in case, please keep it in for now.
1263    gas_finish
1264
1265    # Did we find what we were looking for?  If not, flunk it.
1266    if [expr $x==144] then { pass $testname } else { fail $testname }
1267}
1268
1269proc do_sub {} {
1270    set testname "sub.s: sub tests"
1271    set x 0
1272
1273    gas_start "sub.s" "-al"
1274
1275    # Check the assembled instruction against a table built by the HP assembler
1276    # Any differences should be checked by hand -- with the number of problems
1277    # I've seen in the HP assembler I don't completely trust it.
1278    #
1279    # Instead of having a variable for each match string just increment the
1280    # total number of matches seen.  That's simpler when testing large numbers
1281    # of instructions (as these tests to).
1282    while 1 {
1283	expect {
1284	    -re "^ +\[0-9\]+ 0000 08A40406\[^\n\]*\n"	{ set x [expr $x+1] }
1285	    -re "^ +\[0-9\]+ 0004 08A42406\[^\n\]*\n"	{ set x [expr $x+1] }
1286	    -re "^ +\[0-9\]+ 0008 08A44406\[^\n\]*\n"	{ set x [expr $x+1] }
1287	    -re "^ +\[0-9\]+ 000c 08A46406\[^\n\]*\n"	{ set x [expr $x+1] }
1288	    -re "^ +\[0-9\]+ 0010 08A48406\[^\n\]*\n"	{ set x [expr $x+1] }
1289	    -re "^ +\[0-9\]+ 0014 08A4A406\[^\n\]*\n"	{ set x [expr $x+1] }
1290	    -re "^ +\[0-9\]+ 0018 08A4C406\[^\n\]*\n"	{ set x [expr $x+1] }
1291	    -re "^ +\[0-9\]+ 001c 08A4E406\[^\n\]*\n"	{ set x [expr $x+1] }
1292	    -re "^ +\[0-9\]+ 0020 08A41406\[^\n\]*\n"	{ set x [expr $x+1] }
1293	    -re "^ +\[0-9\]+ 0024 08A43406\[^\n\]*\n"	{ set x [expr $x+1] }
1294	    -re "^ +\[0-9\]+ 0028 08A45406\[^\n\]*\n"	{ set x [expr $x+1] }
1295	    -re "^ +\[0-9\]+ 002c 08A47406\[^\n\]*\n"	{ set x [expr $x+1] }
1296	    -re "^ +\[0-9\]+ 0030 08A49406\[^\n\]*\n"	{ set x [expr $x+1] }
1297	    -re "^ +\[0-9\]+ 0034 08A4B406\[^\n\]*\n"	{ set x [expr $x+1] }
1298	    -re "^ +\[0-9\]+ 0038 08A4D406\[^\n\]*\n"	{ set x [expr $x+1] }
1299	    -re "^ +\[0-9\]+ 003c 08A4F406\[^\n\]*\n"	{ set x [expr $x+1] }
1300	    -re "^ +\[0-9\]+ 0040 08A40C06\[^\n\]*\n"	{ set x [expr $x+1] }
1301	    -re "^ +\[0-9\]+ 0044 08A42C06\[^\n\]*\n"	{ set x [expr $x+1] }
1302	    -re "^ +\[0-9\]+ 0048 08A44C06\[^\n\]*\n"	{ set x [expr $x+1] }
1303	    -re "^ +\[0-9\]+ 004c 08A46C06\[^\n\]*\n"	{ set x [expr $x+1] }
1304	    -re "^ +\[0-9\]+ 0050 08A48C06\[^\n\]*\n"	{ set x [expr $x+1] }
1305	    -re "^ +\[0-9\]+ 0054 08A4AC06\[^\n\]*\n"	{ set x [expr $x+1] }
1306	    -re "^ +\[0-9\]+ 0058 08A4CC06\[^\n\]*\n"	{ set x [expr $x+1] }
1307	    -re "^ +\[0-9\]+ 005c 08A4EC06\[^\n\]*\n"	{ set x [expr $x+1] }
1308	    -re "^ +\[0-9\]+ 0060 08A41C06\[^\n\]*\n"	{ set x [expr $x+1] }
1309	    -re "^ +\[0-9\]+ 0064 08A43C06\[^\n\]*\n"	{ set x [expr $x+1] }
1310	    -re "^ +\[0-9\]+ 0068 08A45C06\[^\n\]*\n"	{ set x [expr $x+1] }
1311	    -re "^ +\[0-9\]+ 006c 08A47C06\[^\n\]*\n"	{ set x [expr $x+1] }
1312	    -re "^ +\[0-9\]+ 0070 08A49C06\[^\n\]*\n"	{ set x [expr $x+1] }
1313	    -re "^ +\[0-9\]+ 0074 08A4BC06\[^\n\]*\n"	{ set x [expr $x+1] }
1314	    -re "^ +\[0-9\]+ 0078 08A4DC06\[^\n\]*\n"	{ set x [expr $x+1] }
1315	    -re "^ +\[0-9\]+ 007c 08A4FC06\[^\n\]*\n"	{ set x [expr $x+1] }
1316	    -re "^ +\[0-9\]+ 0080 08A40506\[^\n\]*\n"	{ set x [expr $x+1] }
1317	    -re "^ +\[0-9\]+ 0084 08A42506\[^\n\]*\n"	{ set x [expr $x+1] }
1318	    -re "^ +\[0-9\]+ 0088 08A44506\[^\n\]*\n"	{ set x [expr $x+1] }
1319	    -re "^ +\[0-9\]+ 008c 08A46506\[^\n\]*\n"	{ set x [expr $x+1] }
1320	    -re "^ +\[0-9\]+ 0090 08A48506\[^\n\]*\n"	{ set x [expr $x+1] }
1321	    -re "^ +\[0-9\]+ 0094 08A4A506\[^\n\]*\n"	{ set x [expr $x+1] }
1322	    -re "^ +\[0-9\]+ 0098 08A4C506\[^\n\]*\n"	{ set x [expr $x+1] }
1323	    -re "^ +\[0-9\]+ 009c 08A4E506\[^\n\]*\n"	{ set x [expr $x+1] }
1324	    -re "^ +\[0-9\]+ 00a0 08A41506\[^\n\]*\n"	{ set x [expr $x+1] }
1325	    -re "^ +\[0-9\]+ 00a4 08A43506\[^\n\]*\n"	{ set x [expr $x+1] }
1326	    -re "^ +\[0-9\]+ 00a8 08A45506\[^\n\]*\n"	{ set x [expr $x+1] }
1327	    -re "^ +\[0-9\]+ 00ac 08A47506\[^\n\]*\n"	{ set x [expr $x+1] }
1328	    -re "^ +\[0-9\]+ 00b0 08A49506\[^\n\]*\n"	{ set x [expr $x+1] }
1329	    -re "^ +\[0-9\]+ 00b4 08A4B506\[^\n\]*\n"	{ set x [expr $x+1] }
1330	    -re "^ +\[0-9\]+ 00b8 08A4D506\[^\n\]*\n"	{ set x [expr $x+1] }
1331	    -re "^ +\[0-9\]+ 00bc 08A4F506\[^\n\]*\n"	{ set x [expr $x+1] }
1332	    -re "^ +\[0-9\]+ 00c0 08A40D06\[^\n\]*\n"	{ set x [expr $x+1] }
1333	    -re "^ +\[0-9\]+ 00c4 08A42D06\[^\n\]*\n"	{ set x [expr $x+1] }
1334	    -re "^ +\[0-9\]+ 00c8 08A44D06\[^\n\]*\n"	{ set x [expr $x+1] }
1335	    -re "^ +\[0-9\]+ 00cc 08A46D06\[^\n\]*\n"	{ set x [expr $x+1] }
1336	    -re "^ +\[0-9\]+ 00d0 08A48D06\[^\n\]*\n"	{ set x [expr $x+1] }
1337	    -re "^ +\[0-9\]+ 00d4 08A4AD06\[^\n\]*\n"	{ set x [expr $x+1] }
1338	    -re "^ +\[0-9\]+ 00d8 08A4CD06\[^\n\]*\n"	{ set x [expr $x+1] }
1339	    -re "^ +\[0-9\]+ 00dc 08A4ED06\[^\n\]*\n"	{ set x [expr $x+1] }
1340	    -re "^ +\[0-9\]+ 00e0 08A41D06\[^\n\]*\n"	{ set x [expr $x+1] }
1341	    -re "^ +\[0-9\]+ 00e4 08A43D06\[^\n\]*\n"	{ set x [expr $x+1] }
1342	    -re "^ +\[0-9\]+ 00e8 08A45D06\[^\n\]*\n"	{ set x [expr $x+1] }
1343	    -re "^ +\[0-9\]+ 00ec 08A47D06\[^\n\]*\n"	{ set x [expr $x+1] }
1344	    -re "^ +\[0-9\]+ 00f0 08A49D06\[^\n\]*\n"	{ set x [expr $x+1] }
1345	    -re "^ +\[0-9\]+ 00f4 08A4BD06\[^\n\]*\n"	{ set x [expr $x+1] }
1346	    -re "^ +\[0-9\]+ 00f8 08A4DD06\[^\n\]*\n"	{ set x [expr $x+1] }
1347	    -re "^ +\[0-9\]+ 00fc 08A4FD06\[^\n\]*\n"	{ set x [expr $x+1] }
1348	    -re "^ +\[0-9\]+ 0100 08A404C6\[^\n\]*\n"	{ set x [expr $x+1] }
1349	    -re "^ +\[0-9\]+ 0104 08A424C6\[^\n\]*\n"	{ set x [expr $x+1] }
1350	    -re "^ +\[0-9\]+ 0108 08A444C6\[^\n\]*\n"	{ set x [expr $x+1] }
1351	    -re "^ +\[0-9\]+ 010c 08A464C6\[^\n\]*\n"	{ set x [expr $x+1] }
1352	    -re "^ +\[0-9\]+ 0110 08A484C6\[^\n\]*\n"	{ set x [expr $x+1] }
1353	    -re "^ +\[0-9\]+ 0114 08A4A4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1354	    -re "^ +\[0-9\]+ 0118 08A4C4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1355	    -re "^ +\[0-9\]+ 011c 08A4E4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1356	    -re "^ +\[0-9\]+ 0120 08A414C6\[^\n\]*\n"	{ set x [expr $x+1] }
1357	    -re "^ +\[0-9\]+ 0124 08A434C6\[^\n\]*\n"	{ set x [expr $x+1] }
1358	    -re "^ +\[0-9\]+ 0128 08A454C6\[^\n\]*\n"	{ set x [expr $x+1] }
1359	    -re "^ +\[0-9\]+ 012c 08A474C6\[^\n\]*\n"	{ set x [expr $x+1] }
1360	    -re "^ +\[0-9\]+ 0130 08A494C6\[^\n\]*\n"	{ set x [expr $x+1] }
1361	    -re "^ +\[0-9\]+ 0134 08A4B4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1362	    -re "^ +\[0-9\]+ 0138 08A4D4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1363	    -re "^ +\[0-9\]+ 013c 08A4F4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1364	    -re "^ +\[0-9\]+ 0140 08A40CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1365	    -re "^ +\[0-9\]+ 0144 08A42CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1366	    -re "^ +\[0-9\]+ 0148 08A44CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1367	    -re "^ +\[0-9\]+ 014c 08A46CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1368	    -re "^ +\[0-9\]+ 0150 08A48CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1369	    -re "^ +\[0-9\]+ 0154 08A4ACC6\[^\n\]*\n"	{ set x [expr $x+1] }
1370	    -re "^ +\[0-9\]+ 0158 08A4CCC6\[^\n\]*\n"	{ set x [expr $x+1] }
1371	    -re "^ +\[0-9\]+ 015c 08A4ECC6\[^\n\]*\n"	{ set x [expr $x+1] }
1372	    -re "^ +\[0-9\]+ 0160 08A41CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1373	    -re "^ +\[0-9\]+ 0164 08A43CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1374	    -re "^ +\[0-9\]+ 0168 08A45CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1375	    -re "^ +\[0-9\]+ 016c 08A47CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1376	    -re "^ +\[0-9\]+ 0170 08A49CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1377	    -re "^ +\[0-9\]+ 0174 08A4BCC6\[^\n\]*\n"	{ set x [expr $x+1] }
1378	    -re "^ +\[0-9\]+ 0178 08A4DCC6\[^\n\]*\n"	{ set x [expr $x+1] }
1379	    -re "^ +\[0-9\]+ 017c 08A4FCC6\[^\n\]*\n"	{ set x [expr $x+1] }
1380	    -re "^ +\[0-9\]+ 0180 08A40C06\[^\n\]*\n"	{ set x [expr $x+1] }
1381	    -re "^ +\[0-9\]+ 0184 08A42C06\[^\n\]*\n"	{ set x [expr $x+1] }
1382	    -re "^ +\[0-9\]+ 0188 08A44C06\[^\n\]*\n"	{ set x [expr $x+1] }
1383	    -re "^ +\[0-9\]+ 018c 08A46C06\[^\n\]*\n"	{ set x [expr $x+1] }
1384	    -re "^ +\[0-9\]+ 0190 08A48C06\[^\n\]*\n"	{ set x [expr $x+1] }
1385	    -re "^ +\[0-9\]+ 0194 08A4AC06\[^\n\]*\n"	{ set x [expr $x+1] }
1386	    -re "^ +\[0-9\]+ 0198 08A4CC06\[^\n\]*\n"	{ set x [expr $x+1] }
1387	    -re "^ +\[0-9\]+ 019c 08A4EC06\[^\n\]*\n"	{ set x [expr $x+1] }
1388	    -re "^ +\[0-9\]+ 01a0 08A41C06\[^\n\]*\n"	{ set x [expr $x+1] }
1389	    -re "^ +\[0-9\]+ 01a4 08A43C06\[^\n\]*\n"	{ set x [expr $x+1] }
1390	    -re "^ +\[0-9\]+ 01a8 08A45C06\[^\n\]*\n"	{ set x [expr $x+1] }
1391	    -re "^ +\[0-9\]+ 01ac 08A47C06\[^\n\]*\n"	{ set x [expr $x+1] }
1392	    -re "^ +\[0-9\]+ 01b0 08A49C06\[^\n\]*\n"	{ set x [expr $x+1] }
1393	    -re "^ +\[0-9\]+ 01b4 08A4BC06\[^\n\]*\n"	{ set x [expr $x+1] }
1394	    -re "^ +\[0-9\]+ 01b8 08A4DC06\[^\n\]*\n"	{ set x [expr $x+1] }
1395	    -re "^ +\[0-9\]+ 01bc 08A4FC06\[^\n\]*\n"	{ set x [expr $x+1] }
1396	    -re "^ +\[0-9\]+ 01c0 08A40506\[^\n\]*\n"	{ set x [expr $x+1] }
1397	    -re "^ +\[0-9\]+ 01c4 08A42506\[^\n\]*\n"	{ set x [expr $x+1] }
1398	    -re "^ +\[0-9\]+ 01c8 08A44506\[^\n\]*\n"	{ set x [expr $x+1] }
1399	    -re "^ +\[0-9\]+ 01cc 08A46506\[^\n\]*\n"	{ set x [expr $x+1] }
1400	    -re "^ +\[0-9\]+ 01d0 08A48506\[^\n\]*\n"	{ set x [expr $x+1] }
1401	    -re "^ +\[0-9\]+ 01d4 08A4A506\[^\n\]*\n"	{ set x [expr $x+1] }
1402	    -re "^ +\[0-9\]+ 01d8 08A4C506\[^\n\]*\n"	{ set x [expr $x+1] }
1403	    -re "^ +\[0-9\]+ 01dc 08A4E506\[^\n\]*\n"	{ set x [expr $x+1] }
1404	    -re "^ +\[0-9\]+ 01e0 08A41506\[^\n\]*\n"	{ set x [expr $x+1] }
1405	    -re "^ +\[0-9\]+ 01e4 08A43506\[^\n\]*\n"	{ set x [expr $x+1] }
1406	    -re "^ +\[0-9\]+ 01e8 08A45506\[^\n\]*\n"	{ set x [expr $x+1] }
1407	    -re "^ +\[0-9\]+ 01ec 08A47506\[^\n\]*\n"	{ set x [expr $x+1] }
1408	    -re "^ +\[0-9\]+ 01f0 08A49506\[^\n\]*\n"	{ set x [expr $x+1] }
1409	    -re "^ +\[0-9\]+ 01f4 08A4B506\[^\n\]*\n"	{ set x [expr $x+1] }
1410	    -re "^ +\[0-9\]+ 01f8 08A4D506\[^\n\]*\n"	{ set x [expr $x+1] }
1411	    -re "^ +\[0-9\]+ 01fc 08A4F506\[^\n\]*\n"	{ set x [expr $x+1] }
1412	    -re "^ +\[0-9\]+ 0200 08A40D06\[^\n\]*\n"	{ set x [expr $x+1] }
1413	    -re "^ +\[0-9\]+ 0204 08A42D06\[^\n\]*\n"	{ set x [expr $x+1] }
1414	    -re "^ +\[0-9\]+ 0208 08A44D06\[^\n\]*\n"	{ set x [expr $x+1] }
1415	    -re "^ +\[0-9\]+ 020c 08A46D06\[^\n\]*\n"	{ set x [expr $x+1] }
1416	    -re "^ +\[0-9\]+ 0210 08A48D06\[^\n\]*\n"	{ set x [expr $x+1] }
1417	    -re "^ +\[0-9\]+ 0214 08A4AD06\[^\n\]*\n"	{ set x [expr $x+1] }
1418	    -re "^ +\[0-9\]+ 0218 08A4CD06\[^\n\]*\n"	{ set x [expr $x+1] }
1419	    -re "^ +\[0-9\]+ 021c 08A4ED06\[^\n\]*\n"	{ set x [expr $x+1] }
1420	    -re "^ +\[0-9\]+ 0220 08A41D06\[^\n\]*\n"	{ set x [expr $x+1] }
1421	    -re "^ +\[0-9\]+ 0224 08A43D06\[^\n\]*\n"	{ set x [expr $x+1] }
1422	    -re "^ +\[0-9\]+ 0228 08A45D06\[^\n\]*\n"	{ set x [expr $x+1] }
1423	    -re "^ +\[0-9\]+ 022c 08A47D06\[^\n\]*\n"	{ set x [expr $x+1] }
1424	    -re "^ +\[0-9\]+ 0230 08A49D06\[^\n\]*\n"	{ set x [expr $x+1] }
1425	    -re "^ +\[0-9\]+ 0234 08A4BD06\[^\n\]*\n"	{ set x [expr $x+1] }
1426	    -re "^ +\[0-9\]+ 0238 08A4DD06\[^\n\]*\n"	{ set x [expr $x+1] }
1427	    -re "^ +\[0-9\]+ 023c 08A4FD06\[^\n\]*\n"	{ set x [expr $x+1] }
1428	    -re "^ +\[0-9\]+ 0240 08A404C6\[^\n\]*\n"	{ set x [expr $x+1] }
1429	    -re "^ +\[0-9\]+ 0244 08A424C6\[^\n\]*\n"	{ set x [expr $x+1] }
1430	    -re "^ +\[0-9\]+ 0248 08A444C6\[^\n\]*\n"	{ set x [expr $x+1] }
1431	    -re "^ +\[0-9\]+ 024c 08A464C6\[^\n\]*\n"	{ set x [expr $x+1] }
1432	    -re "^ +\[0-9\]+ 0250 08A484C6\[^\n\]*\n"	{ set x [expr $x+1] }
1433	    -re "^ +\[0-9\]+ 0254 08A4A4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1434	    -re "^ +\[0-9\]+ 0258 08A4C4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1435	    -re "^ +\[0-9\]+ 025c 08A4E4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1436	    -re "^ +\[0-9\]+ 0260 08A414C6\[^\n\]*\n"	{ set x [expr $x+1] }
1437	    -re "^ +\[0-9\]+ 0264 08A434C6\[^\n\]*\n"	{ set x [expr $x+1] }
1438	    -re "^ +\[0-9\]+ 0268 08A454C6\[^\n\]*\n"	{ set x [expr $x+1] }
1439	    -re "^ +\[0-9\]+ 026c 08A474C6\[^\n\]*\n"	{ set x [expr $x+1] }
1440	    -re "^ +\[0-9\]+ 0270 08A494C6\[^\n\]*\n"	{ set x [expr $x+1] }
1441	    -re "^ +\[0-9\]+ 0274 08A4B4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1442	    -re "^ +\[0-9\]+ 0278 08A4D4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1443	    -re "^ +\[0-9\]+ 027c 08A4F4C6\[^\n\]*\n"	{ set x [expr $x+1] }
1444	    -re "^ +\[0-9\]+ 0280 08A40CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1445	    -re "^ +\[0-9\]+ 0284 08A42CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1446	    -re "^ +\[0-9\]+ 0288 08A44CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1447	    -re "^ +\[0-9\]+ 028c 08A46CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1448	    -re "^ +\[0-9\]+ 0290 08A48CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1449	    -re "^ +\[0-9\]+ 0294 08A4ACC6\[^\n\]*\n"	{ set x [expr $x+1] }
1450	    -re "^ +\[0-9\]+ 0298 08A4CCC6\[^\n\]*\n"	{ set x [expr $x+1] }
1451	    -re "^ +\[0-9\]+ 029c 08A4ECC6\[^\n\]*\n"	{ set x [expr $x+1] }
1452	    -re "^ +\[0-9\]+ 02a0 08A41CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1453	    -re "^ +\[0-9\]+ 02a4 08A43CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1454	    -re "^ +\[0-9\]+ 02a8 08A45CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1455	    -re "^ +\[0-9\]+ 02ac 08A47CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1456	    -re "^ +\[0-9\]+ 02b0 08A49CC6\[^\n\]*\n"	{ set x [expr $x+1] }
1457	    -re "^ +\[0-9\]+ 02b4 08A4BCC6\[^\n\]*\n"	{ set x [expr $x+1] }
1458	    -re "^ +\[0-9\]+ 02b8 08A4DCC6\[^\n\]*\n"	{ set x [expr $x+1] }
1459	    -re "^ +\[0-9\]+ 02bc 08A4FCC6\[^\n\]*\n"	{ set x [expr $x+1] }
1460	    -re "\[^\n\]*\n"				{ }
1461	    timeout				{ perror "timeout\n"; break }
1462	    eof					{ break }
1463	}
1464    }
1465
1466    # This was intended to do any cleanup necessary.  It kinda looks like it
1467    # isn't needed, but just in case, please keep it in for now.
1468    gas_finish
1469
1470    # Did we find what we were looking for?  If not, flunk it.
1471    if [expr $x==176] then { pass $testname } else { fail $testname }
1472}
1473
1474proc do_sub2 {} {
1475    set testname "sub2.s: sub2 tests"
1476    set x 0
1477
1478    gas_start "sub2.s" "-al"
1479
1480    # Check the assembled instruction against a table built by the HP assembler
1481    # Any differences should be checked by hand -- with the number of problems
1482    # I've seen in the HP assembler I don't completely trust it.
1483    #
1484    # Instead of having a variable for each match string just increment the
1485    # total number of matches seen.  That's simpler when testing large numbers
1486    # of instructions (as these tests to).
1487    while 1 {
1488	expect {
1489	    -re "^ +\[0-9\]+ 0000 08A40426\[^\n\]*\n"	{ set x [expr $x+1] }
1490	    -re "^ +\[0-9\]+ 0004 08A42426\[^\n\]*\n"	{ set x [expr $x+1] }
1491	    -re "^ +\[0-9\]+ 0008 08A44426\[^\n\]*\n"	{ set x [expr $x+1] }
1492	    -re "^ +\[0-9\]+ 000c 08A46426\[^\n\]*\n"	{ set x [expr $x+1] }
1493	    -re "^ +\[0-9\]+ 0010 08A48426\[^\n\]*\n"	{ set x [expr $x+1] }
1494	    -re "^ +\[0-9\]+ 0014 08A4A426\[^\n\]*\n"	{ set x [expr $x+1] }
1495	    -re "^ +\[0-9\]+ 0018 08A4C426\[^\n\]*\n"	{ set x [expr $x+1] }
1496	    -re "^ +\[0-9\]+ 001c 08A4E426\[^\n\]*\n"	{ set x [expr $x+1] }
1497	    -re "^ +\[0-9\]+ 0020 08A41426\[^\n\]*\n"	{ set x [expr $x+1] }
1498	    -re "^ +\[0-9\]+ 0024 08A43426\[^\n\]*\n"	{ set x [expr $x+1] }
1499	    -re "^ +\[0-9\]+ 0028 08A45426\[^\n\]*\n"	{ set x [expr $x+1] }
1500	    -re "^ +\[0-9\]+ 002c 08A47426\[^\n\]*\n"	{ set x [expr $x+1] }
1501	    -re "^ +\[0-9\]+ 0030 08A49426\[^\n\]*\n"	{ set x [expr $x+1] }
1502	    -re "^ +\[0-9\]+ 0034 08A4B426\[^\n\]*\n"	{ set x [expr $x+1] }
1503	    -re "^ +\[0-9\]+ 0038 08A4D426\[^\n\]*\n"	{ set x [expr $x+1] }
1504	    -re "^ +\[0-9\]+ 003c 08A4F426\[^\n\]*\n"	{ set x [expr $x+1] }
1505	    -re "^ +\[0-9\]+ 0040 08A40C26\[^\n\]*\n"	{ set x [expr $x+1] }
1506	    -re "^ +\[0-9\]+ 0044 08A42C26\[^\n\]*\n"	{ set x [expr $x+1] }
1507	    -re "^ +\[0-9\]+ 0048 08A44C26\[^\n\]*\n"	{ set x [expr $x+1] }
1508	    -re "^ +\[0-9\]+ 004c 08A46C26\[^\n\]*\n"	{ set x [expr $x+1] }
1509	    -re "^ +\[0-9\]+ 0050 08A48C26\[^\n\]*\n"	{ set x [expr $x+1] }
1510	    -re "^ +\[0-9\]+ 0054 08A4AC26\[^\n\]*\n"	{ set x [expr $x+1] }
1511	    -re "^ +\[0-9\]+ 0058 08A4CC26\[^\n\]*\n"	{ set x [expr $x+1] }
1512	    -re "^ +\[0-9\]+ 005c 08A4EC26\[^\n\]*\n"	{ set x [expr $x+1] }
1513	    -re "^ +\[0-9\]+ 0060 08A41C26\[^\n\]*\n"	{ set x [expr $x+1] }
1514	    -re "^ +\[0-9\]+ 0064 08A43C26\[^\n\]*\n"	{ set x [expr $x+1] }
1515	    -re "^ +\[0-9\]+ 0068 08A45C26\[^\n\]*\n"	{ set x [expr $x+1] }
1516	    -re "^ +\[0-9\]+ 006c 08A47C26\[^\n\]*\n"	{ set x [expr $x+1] }
1517	    -re "^ +\[0-9\]+ 0070 08A49C26\[^\n\]*\n"	{ set x [expr $x+1] }
1518	    -re "^ +\[0-9\]+ 0074 08A4BC26\[^\n\]*\n"	{ set x [expr $x+1] }
1519	    -re "^ +\[0-9\]+ 0078 08A4DC26\[^\n\]*\n"	{ set x [expr $x+1] }
1520	    -re "^ +\[0-9\]+ 007c 08A4FC26\[^\n\]*\n"	{ set x [expr $x+1] }
1521	    -re "^ +\[0-9\]+ 0080 08A40526\[^\n\]*\n"	{ set x [expr $x+1] }
1522	    -re "^ +\[0-9\]+ 0084 08A42526\[^\n\]*\n"	{ set x [expr $x+1] }
1523	    -re "^ +\[0-9\]+ 0088 08A44526\[^\n\]*\n"	{ set x [expr $x+1] }
1524	    -re "^ +\[0-9\]+ 008c 08A46526\[^\n\]*\n"	{ set x [expr $x+1] }
1525	    -re "^ +\[0-9\]+ 0090 08A48526\[^\n\]*\n"	{ set x [expr $x+1] }
1526	    -re "^ +\[0-9\]+ 0094 08A4A526\[^\n\]*\n"	{ set x [expr $x+1] }
1527	    -re "^ +\[0-9\]+ 0098 08A4C526\[^\n\]*\n"	{ set x [expr $x+1] }
1528	    -re "^ +\[0-9\]+ 009c 08A4E526\[^\n\]*\n"	{ set x [expr $x+1] }
1529	    -re "^ +\[0-9\]+ 00a0 08A41526\[^\n\]*\n"	{ set x [expr $x+1] }
1530	    -re "^ +\[0-9\]+ 00a4 08A43526\[^\n\]*\n"	{ set x [expr $x+1] }
1531	    -re "^ +\[0-9\]+ 00a8 08A45526\[^\n\]*\n"	{ set x [expr $x+1] }
1532	    -re "^ +\[0-9\]+ 00ac 08A47526\[^\n\]*\n"	{ set x [expr $x+1] }
1533	    -re "^ +\[0-9\]+ 00b0 08A49526\[^\n\]*\n"	{ set x [expr $x+1] }
1534	    -re "^ +\[0-9\]+ 00b4 08A4B526\[^\n\]*\n"	{ set x [expr $x+1] }
1535	    -re "^ +\[0-9\]+ 00b8 08A4D526\[^\n\]*\n"	{ set x [expr $x+1] }
1536	    -re "^ +\[0-9\]+ 00bc 08A4F526\[^\n\]*\n"	{ set x [expr $x+1] }
1537	    -re "^ +\[0-9\]+ 00c0 08A40D26\[^\n\]*\n"	{ set x [expr $x+1] }
1538	    -re "^ +\[0-9\]+ 00c4 08A42D26\[^\n\]*\n"	{ set x [expr $x+1] }
1539	    -re "^ +\[0-9\]+ 00c8 08A44D26\[^\n\]*\n"	{ set x [expr $x+1] }
1540	    -re "^ +\[0-9\]+ 00cc 08A46D26\[^\n\]*\n"	{ set x [expr $x+1] }
1541	    -re "^ +\[0-9\]+ 00d0 08A48D26\[^\n\]*\n"	{ set x [expr $x+1] }
1542	    -re "^ +\[0-9\]+ 00d4 08A4AD26\[^\n\]*\n"	{ set x [expr $x+1] }
1543	    -re "^ +\[0-9\]+ 00d8 08A4CD26\[^\n\]*\n"	{ set x [expr $x+1] }
1544	    -re "^ +\[0-9\]+ 00dc 08A4ED26\[^\n\]*\n"	{ set x [expr $x+1] }
1545	    -re "^ +\[0-9\]+ 00e0 08A41D26\[^\n\]*\n"	{ set x [expr $x+1] }
1546	    -re "^ +\[0-9\]+ 00e4 08A43D26\[^\n\]*\n"	{ set x [expr $x+1] }
1547	    -re "^ +\[0-9\]+ 00e8 08A45D26\[^\n\]*\n"	{ set x [expr $x+1] }
1548	    -re "^ +\[0-9\]+ 00ec 08A47D26\[^\n\]*\n"	{ set x [expr $x+1] }
1549	    -re "^ +\[0-9\]+ 00f0 08A49D26\[^\n\]*\n"	{ set x [expr $x+1] }
1550	    -re "^ +\[0-9\]+ 00f4 08A4BD26\[^\n\]*\n"	{ set x [expr $x+1] }
1551	    -re "^ +\[0-9\]+ 00f8 08A4DD26\[^\n\]*\n"	{ set x [expr $x+1] }
1552	    -re "^ +\[0-9\]+ 00fc 08A4FD26\[^\n\]*\n"	{ set x [expr $x+1] }
1553	    -re "^ +\[0-9\]+ 0100 08A404E6\[^\n\]*\n"	{ set x [expr $x+1] }
1554	    -re "^ +\[0-9\]+ 0104 08A424E6\[^\n\]*\n"	{ set x [expr $x+1] }
1555	    -re "^ +\[0-9\]+ 0108 08A444E6\[^\n\]*\n"	{ set x [expr $x+1] }
1556	    -re "^ +\[0-9\]+ 010c 08A464E6\[^\n\]*\n"	{ set x [expr $x+1] }
1557	    -re "^ +\[0-9\]+ 0110 08A484E6\[^\n\]*\n"	{ set x [expr $x+1] }
1558	    -re "^ +\[0-9\]+ 0114 08A4A4E6\[^\n\]*\n"	{ set x [expr $x+1] }
1559	    -re "^ +\[0-9\]+ 0118 08A4C4E6\[^\n\]*\n"	{ set x [expr $x+1] }
1560	    -re "^ +\[0-9\]+ 011c 08A4E4E6\[^\n\]*\n"	{ set x [expr $x+1] }
1561	    -re "^ +\[0-9\]+ 0120 08A414E6\[^\n\]*\n"	{ set x [expr $x+1] }
1562	    -re "^ +\[0-9\]+ 0124 08A434E6\[^\n\]*\n"	{ set x [expr $x+1] }
1563	    -re "^ +\[0-9\]+ 0128 08A454E6\[^\n\]*\n"	{ set x [expr $x+1] }
1564	    -re "^ +\[0-9\]+ 012c 08A474E6\[^\n\]*\n"	{ set x [expr $x+1] }
1565	    -re "^ +\[0-9\]+ 0130 08A494E6\[^\n\]*\n"	{ set x [expr $x+1] }
1566	    -re "^ +\[0-9\]+ 0134 08A4B4E6\[^\n\]*\n"	{ set x [expr $x+1] }
1567	    -re "^ +\[0-9\]+ 0138 08A4D4E6\[^\n\]*\n"	{ set x [expr $x+1] }
1568	    -re "^ +\[0-9\]+ 013c 08A4F4E6\[^\n\]*\n"	{ set x [expr $x+1] }
1569	    -re "^ +\[0-9\]+ 0140 08A40CE6\[^\n\]*\n"	{ set x [expr $x+1] }
1570	    -re "^ +\[0-9\]+ 0144 08A42CE6\[^\n\]*\n"	{ set x [expr $x+1] }
1571	    -re "^ +\[0-9\]+ 0148 08A44CE6\[^\n\]*\n"	{ set x [expr $x+1] }
1572	    -re "^ +\[0-9\]+ 014c 08A46CE6\[^\n\]*\n"	{ set x [expr $x+1] }
1573	    -re "^ +\[0-9\]+ 0150 08A48CE6\[^\n\]*\n"	{ set x [expr $x+1] }
1574	    -re "^ +\[0-9\]+ 0154 08A4ACE6\[^\n\]*\n"	{ set x [expr $x+1] }
1575	    -re "^ +\[0-9\]+ 0158 08A4CCE6\[^\n\]*\n"	{ set x [expr $x+1] }
1576	    -re "^ +\[0-9\]+ 015c 08A4ECE6\[^\n\]*\n"	{ set x [expr $x+1] }
1577	    -re "^ +\[0-9\]+ 0160 08A41CE6\[^\n\]*\n"	{ set x [expr $x+1] }
1578	    -re "^ +\[0-9\]+ 0164 08A43CE6\[^\n\]*\n"	{ set x [expr $x+1] }
1579	    -re "^ +\[0-9\]+ 0168 08A45CE6\[^\n\]*\n"	{ set x [expr $x+1] }
1580	    -re "^ +\[0-9\]+ 016c 08A47CE6\[^\n\]*\n"	{ set x [expr $x+1] }
1581	    -re "^ +\[0-9\]+ 0170 08A49CE6\[^\n\]*\n"	{ set x [expr $x+1] }
1582	    -re "^ +\[0-9\]+ 0174 08A4BCE6\[^\n\]*\n"	{ set x [expr $x+1] }
1583	    -re "^ +\[0-9\]+ 0178 08A4DCE6\[^\n\]*\n"	{ set x [expr $x+1] }
1584	    -re "^ +\[0-9\]+ 017c 08A4FCE6\[^\n\]*\n"	{ set x [expr $x+1] }
1585	    -re "^ +\[0-9\]+ 0180 08210401\[^\n\]*\n"	{ set x [expr $x+1] }
1586	    -re "^ +\[0-9\]+ 0184 08210521\[^\n\]*\n"	{ set x [expr $x+1] }
1587	    -re "\[^\n\]*\n"				{ }
1588	    timeout				{ perror "timeout\n"; break }
1589	    eof					{ break }
1590	}
1591    }
1592
1593    # This was intended to do any cleanup necessary.  It kinda looks like it
1594    # isn't needed, but just in case, please keep it in for now.
1595    gas_finish
1596
1597    # Did we find what we were looking for?  If not, flunk it.
1598    if [expr $x==98] then { pass $testname } else { fail $testname }
1599}
1600
1601proc do_ds {} {
1602    set testname "ds.s: ds tests"
1603    set x 0
1604
1605    gas_start "ds.s" "-al"
1606
1607    # Check the assembled instruction against a table built by the HP assembler
1608    # Any differences should be checked by hand -- with the number of problems
1609    # I've seen in the HP assembler I don't completely trust it.
1610    #
1611    # Instead of having a variable for each match string just increment the
1612    # total number of matches seen.  That's simpler when testing large numbers
1613    # of instructions (as these tests to).
1614    while 1 {
1615	expect {
1616	    -re "^ +\[0-9\]+ 0000 08A40446\[^\n\]*\n"	{ set x [expr $x+1] }
1617	    -re "^ +\[0-9\]+ 0004 08A42446\[^\n\]*\n"	{ set x [expr $x+1] }
1618	    -re "^ +\[0-9\]+ 0008 08A44446\[^\n\]*\n"	{ set x [expr $x+1] }
1619	    -re "^ +\[0-9\]+ 000c 08A46446\[^\n\]*\n"	{ set x [expr $x+1] }
1620	    -re "^ +\[0-9\]+ 0010 08A48446\[^\n\]*\n"	{ set x [expr $x+1] }
1621	    -re "^ +\[0-9\]+ 0014 08A4A446\[^\n\]*\n"	{ set x [expr $x+1] }
1622	    -re "^ +\[0-9\]+ 0018 08A4C446\[^\n\]*\n"	{ set x [expr $x+1] }
1623	    -re "^ +\[0-9\]+ 001c 08A4E446\[^\n\]*\n"	{ set x [expr $x+1] }
1624	    -re "^ +\[0-9\]+ 0020 08A41446\[^\n\]*\n"	{ set x [expr $x+1] }
1625	    -re "^ +\[0-9\]+ 0024 08A43446\[^\n\]*\n"	{ set x [expr $x+1] }
1626	    -re "^ +\[0-9\]+ 0028 08A45446\[^\n\]*\n"	{ set x [expr $x+1] }
1627	    -re "^ +\[0-9\]+ 002c 08A47446\[^\n\]*\n"	{ set x [expr $x+1] }
1628	    -re "^ +\[0-9\]+ 0030 08A49446\[^\n\]*\n"	{ set x [expr $x+1] }
1629	    -re "^ +\[0-9\]+ 0034 08A4B446\[^\n\]*\n"	{ set x [expr $x+1] }
1630	    -re "^ +\[0-9\]+ 0038 08A4D446\[^\n\]*\n"	{ set x [expr $x+1] }
1631	    -re "^ +\[0-9\]+ 003c 08A4F446\[^\n\]*\n"	{ set x [expr $x+1] }
1632	    -re "\[^\n\]*\n"				{ }
1633	    timeout				{ perror "timeout\n"; break }
1634	    eof					{ break }
1635	}
1636    }
1637
1638    # This was intended to do any cleanup necessary.  It kinda looks like it
1639    # isn't needed, but just in case, please keep it in for now.
1640    gas_finish
1641
1642    # Did we find what we were looking for?  If not, flunk it.
1643    if [expr $x==16] then { pass $testname } else { fail $testname }
1644}
1645
1646proc do_comclr {} {
1647    set testname "comclr.s: comclr tests"
1648    set x 0
1649
1650    gas_start "comclr.s" "-al"
1651
1652    # Check the assembled instruction against a table built by the HP assembler
1653    # Any differences should be checked by hand -- with the number of problems
1654    # I've seen in the HP assembler I don't completely trust it.
1655    #
1656    # Instead of having a variable for each match string just increment the
1657    # total number of matches seen.  That's simpler when testing large numbers
1658    # of instructions (as these tests to).
1659    while 1 {
1660	expect {
1661	    -re "^ +\[0-9\]+ 0000 08A40886\[^\n\]*\n"	{ set x [expr $x+1] }
1662	    -re "^ +\[0-9\]+ 0004 08A42886\[^\n\]*\n"	{ set x [expr $x+1] }
1663	    -re "^ +\[0-9\]+ 0008 08A44886\[^\n\]*\n"	{ set x [expr $x+1] }
1664	    -re "^ +\[0-9\]+ 000c 08A46886\[^\n\]*\n"	{ set x [expr $x+1] }
1665	    -re "^ +\[0-9\]+ 0010 08A48886\[^\n\]*\n"	{ set x [expr $x+1] }
1666	    -re "^ +\[0-9\]+ 0014 08A4A886\[^\n\]*\n"	{ set x [expr $x+1] }
1667	    -re "^ +\[0-9\]+ 0018 08A4C886\[^\n\]*\n"	{ set x [expr $x+1] }
1668	    -re "^ +\[0-9\]+ 001c 08A4E886\[^\n\]*\n"	{ set x [expr $x+1] }
1669	    -re "^ +\[0-9\]+ 0020 08A41886\[^\n\]*\n"	{ set x [expr $x+1] }
1670	    -re "^ +\[0-9\]+ 0024 08A43886\[^\n\]*\n"	{ set x [expr $x+1] }
1671	    -re "^ +\[0-9\]+ 0028 08A45886\[^\n\]*\n"	{ set x [expr $x+1] }
1672	    -re "^ +\[0-9\]+ 002c 08A47886\[^\n\]*\n"	{ set x [expr $x+1] }
1673	    -re "^ +\[0-9\]+ 0030 08A49886\[^\n\]*\n"	{ set x [expr $x+1] }
1674	    -re "^ +\[0-9\]+ 0034 08A4B886\[^\n\]*\n"	{ set x [expr $x+1] }
1675	    -re "^ +\[0-9\]+ 0038 08A4D886\[^\n\]*\n"	{ set x [expr $x+1] }
1676	    -re "^ +\[0-9\]+ 003c 08A4F886\[^\n\]*\n"	{ set x [expr $x+1] }
1677	    -re "^ +\[0-9\]+ 0040 90A600F6\[^\n\]*\n"	{ set x [expr $x+1] }
1678	    -re "^ +\[0-9\]+ 0044 90A620F6\[^\n\]*\n"	{ set x [expr $x+1] }
1679	    -re "^ +\[0-9\]+ 0048 90A640F6\[^\n\]*\n"	{ set x [expr $x+1] }
1680	    -re "^ +\[0-9\]+ 004c 90A660F6\[^\n\]*\n"	{ set x [expr $x+1] }
1681	    -re "^ +\[0-9\]+ 0050 90A680F6\[^\n\]*\n"	{ set x [expr $x+1] }
1682	    -re "^ +\[0-9\]+ 0054 90A6A0F6\[^\n\]*\n"	{ set x [expr $x+1] }
1683	    -re "^ +\[0-9\]+ 0058 90A6C0F6\[^\n\]*\n"	{ set x [expr $x+1] }
1684	    -re "^ +\[0-9\]+ 005c 90A6E0F6\[^\n\]*\n"	{ set x [expr $x+1] }
1685	    -re "^ +\[0-9\]+ 0060 90A610F6\[^\n\]*\n"	{ set x [expr $x+1] }
1686	    -re "^ +\[0-9\]+ 0064 90A630F6\[^\n\]*\n"	{ set x [expr $x+1] }
1687	    -re "^ +\[0-9\]+ 0068 90A650F6\[^\n\]*\n"	{ set x [expr $x+1] }
1688	    -re "^ +\[0-9\]+ 006c 90A670F6\[^\n\]*\n"	{ set x [expr $x+1] }
1689	    -re "^ +\[0-9\]+ 0070 90A690F6\[^\n\]*\n"	{ set x [expr $x+1] }
1690	    -re "^ +\[0-9\]+ 0074 90A6B0F6\[^\n\]*\n"	{ set x [expr $x+1] }
1691	    -re "^ +\[0-9\]+ 0078 90A6D0F6\[^\n\]*\n"	{ set x [expr $x+1] }
1692	    -re "^ +\[0-9\]+ 007c 90A6F0F6\[^\n\]*\n"	{ set x [expr $x+1] }
1693	    -re "\[^\n\]*\n"				{ }
1694	    timeout				{ perror "timeout\n"; break }
1695	    eof					{ break }
1696	}
1697    }
1698
1699    # This was intended to do any cleanup necessary.  It kinda looks like it
1700    # isn't needed, but just in case, please keep it in for now.
1701    gas_finish
1702
1703    # Did we find what we were looking for?  If not, flunk it.
1704    if [expr $x==32] then { pass $testname } else { fail $testname }
1705}
1706
1707proc do_logical {} {
1708    set testname "logical.s: logical tests"
1709    set x 0
1710
1711    gas_start "logical.s" "-al"
1712
1713    # Check the assembled instruction against a table built by the HP assembler
1714    # Any differences should be checked by hand -- with the number of problems
1715    # I've seen in the HP assembler I don't completely trust it.
1716    #
1717    # Instead of having a variable for each match string just increment the
1718    # total number of matches seen.  That's simpler when testing large numbers
1719    # of instructions (as these tests to).
1720    while 1 {
1721	expect {
1722	    -re "^ +\[0-9\]+ 0000 08A40246\[^\n\]*\n"	{ set x [expr $x+1] }
1723	    -re "^ +\[0-9\]+ 0004 08A42246\[^\n\]*\n"	{ set x [expr $x+1] }
1724	    -re "^ +\[0-9\]+ 0008 08A44246\[^\n\]*\n"	{ set x [expr $x+1] }
1725	    -re "^ +\[0-9\]+ 000c 08A46246\[^\n\]*\n"	{ set x [expr $x+1] }
1726	    -re "^ +\[0-9\]+ 0010 08A4E246\[^\n\]*\n"	{ set x [expr $x+1] }
1727	    -re "^ +\[0-9\]+ 0014 08A41246\[^\n\]*\n"	{ set x [expr $x+1] }
1728	    -re "^ +\[0-9\]+ 0018 08A43246\[^\n\]*\n"	{ set x [expr $x+1] }
1729	    -re "^ +\[0-9\]+ 001c 08A45246\[^\n\]*\n"	{ set x [expr $x+1] }
1730	    -re "^ +\[0-9\]+ 0020 08A47246\[^\n\]*\n"	{ set x [expr $x+1] }
1731	    -re "^ +\[0-9\]+ 0024 08A4F246\[^\n\]*\n"	{ set x [expr $x+1] }
1732	    -re "^ +\[0-9\]+ 0028 08A40286\[^\n\]*\n"	{ set x [expr $x+1] }
1733	    -re "^ +\[0-9\]+ 002c 08A42286\[^\n\]*\n"	{ set x [expr $x+1] }
1734	    -re "^ +\[0-9\]+ 0030 08A44286\[^\n\]*\n"	{ set x [expr $x+1] }
1735	    -re "^ +\[0-9\]+ 0034 08A46286\[^\n\]*\n"	{ set x [expr $x+1] }
1736	    -re "^ +\[0-9\]+ 0038 08A4E286\[^\n\]*\n"	{ set x [expr $x+1] }
1737	    -re "^ +\[0-9\]+ 003c 08A41286\[^\n\]*\n"	{ set x [expr $x+1] }
1738	    -re "^ +\[0-9\]+ 0040 08A43286\[^\n\]*\n"	{ set x [expr $x+1] }
1739	    -re "^ +\[0-9\]+ 0044 08A45286\[^\n\]*\n"	{ set x [expr $x+1] }
1740	    -re "^ +\[0-9\]+ 0048 08A47286\[^\n\]*\n"	{ set x [expr $x+1] }
1741	    -re "^ +\[0-9\]+ 004c 08A4F286\[^\n\]*\n"	{ set x [expr $x+1] }
1742	    -re "^ +\[0-9\]+ 0050 08A40206\[^\n\]*\n"	{ set x [expr $x+1] }
1743	    -re "^ +\[0-9\]+ 0054 08A42206\[^\n\]*\n"	{ set x [expr $x+1] }
1744	    -re "^ +\[0-9\]+ 0058 08A44206\[^\n\]*\n"	{ set x [expr $x+1] }
1745	    -re "^ +\[0-9\]+ 005c 08A46206\[^\n\]*\n"	{ set x [expr $x+1] }
1746	    -re "^ +\[0-9\]+ 0060 08A4E206\[^\n\]*\n"	{ set x [expr $x+1] }
1747	    -re "^ +\[0-9\]+ 0064 08A41206\[^\n\]*\n"	{ set x [expr $x+1] }
1748	    -re "^ +\[0-9\]+ 0068 08A43206\[^\n\]*\n"	{ set x [expr $x+1] }
1749	    -re "^ +\[0-9\]+ 006c 08A45206\[^\n\]*\n"	{ set x [expr $x+1] }
1750	    -re "^ +\[0-9\]+ 0070 08A47206\[^\n\]*\n"	{ set x [expr $x+1] }
1751	    -re "^ +\[0-9\]+ 0074 08A4F206\[^\n\]*\n"	{ set x [expr $x+1] }
1752	    -re "^ +\[0-9\]+ 0078 08A40006\[^\n\]*\n"	{ set x [expr $x+1] }
1753	    -re "^ +\[0-9\]+ 007c 08A42006\[^\n\]*\n"	{ set x [expr $x+1] }
1754	    -re "^ +\[0-9\]+ 0080 08A44006\[^\n\]*\n"	{ set x [expr $x+1] }
1755	    -re "^ +\[0-9\]+ 0084 08A46006\[^\n\]*\n"	{ set x [expr $x+1] }
1756	    -re "^ +\[0-9\]+ 0088 08A4E006\[^\n\]*\n"	{ set x [expr $x+1] }
1757	    -re "^ +\[0-9\]+ 008c 08A41006\[^\n\]*\n"	{ set x [expr $x+1] }
1758	    -re "^ +\[0-9\]+ 0090 08A43006\[^\n\]*\n"	{ set x [expr $x+1] }
1759	    -re "^ +\[0-9\]+ 0094 08A45006\[^\n\]*\n"	{ set x [expr $x+1] }
1760	    -re "^ +\[0-9\]+ 0098 08A47006\[^\n\]*\n"	{ set x [expr $x+1] }
1761	    -re "^ +\[0-9\]+ 009c 08A4F006\[^\n\]*\n"	{ set x [expr $x+1] }
1762	    -re "\[^\n\]*\n"				{ }
1763	    timeout				{ perror "timeout\n"; break }
1764	    eof					{ break }
1765	}
1766    }
1767
1768    # This was intended to do any cleanup necessary.  It kinda looks like it
1769    # isn't needed, but just in case, please keep it in for now.
1770    gas_finish
1771
1772    # Did we find what we were looking for?  If not, flunk it.
1773    if [expr $x==40] then { pass $testname } else { fail $testname }
1774}
1775
1776proc do_unit {} {
1777    set testname "unit.s: unit tests"
1778    set x 0
1779
1780    gas_start "unit.s" "-al"
1781
1782    # Check the assembled instruction against a table built by the HP assembler
1783    # Any differences should be checked by hand -- with the number of problems
1784    # I've seen in the HP assembler I don't completely trust it.
1785    #
1786    # Instead of having a variable for each match string just increment the
1787    # total number of matches seen.  That's simpler when testing large numbers
1788    # of instructions (as these tests to).
1789    while 1 {
1790	expect {
1791	    -re "^ +\[0-9\]+ 0000 08A40386\[^\n]*\n"	{ set x [expr $x+1] }
1792	    -re "^ +\[0-9\]+ 0004 08A44386\[^\n]*\n"	{ set x [expr $x+1] }
1793	    -re "^ +\[0-9\]+ 0008 08A46386\[^\n]*\n"	{ set x [expr $x+1] }
1794	    -re "^ +\[0-9\]+ 000c 08A41386\[^\n]*\n"	{ set x [expr $x+1] }
1795	    -re "^ +\[0-9\]+ 0010 08A45386\[^\n]*\n"	{ set x [expr $x+1] }
1796	    -re "^ +\[0-9\]+ 0014 08A47386\[^\n]*\n"	{ set x [expr $x+1] }
1797	    -re "^ +\[0-9\]+ 0018 08A40986\[^\n]*\n"	{ set x [expr $x+1] }
1798	    -re "^ +\[0-9\]+ 001c 08A44986\[^\n]*\n"	{ set x [expr $x+1] }
1799	    -re "^ +\[0-9\]+ 0020 08A46986\[^\n]*\n"	{ set x [expr $x+1] }
1800	    -re "^ +\[0-9\]+ 0024 08A48986\[^\n]*\n"	{ set x [expr $x+1] }
1801	    -re "^ +\[0-9\]+ 0028 08A4C986\[^\n]*\n"	{ set x [expr $x+1] }
1802	    -re "^ +\[0-9\]+ 002c 08A4E986\[^\n]*\n"	{ set x [expr $x+1] }
1803	    -re "^ +\[0-9\]+ 0030 08A41986\[^\n]*\n"	{ set x [expr $x+1] }
1804	    -re "^ +\[0-9\]+ 0034 08A45986\[^\n]*\n"	{ set x [expr $x+1] }
1805	    -re "^ +\[0-9\]+ 0038 08A47986\[^\n]*\n"	{ set x [expr $x+1] }
1806	    -re "^ +\[0-9\]+ 003c 08A49986\[^\n]*\n"	{ set x [expr $x+1] }
1807	    -re "^ +\[0-9\]+ 0040 08A4D986\[^\n]*\n"	{ set x [expr $x+1] }
1808	    -re "^ +\[0-9\]+ 0044 08A4F986\[^\n]*\n"	{ set x [expr $x+1] }
1809	    -re "^ +\[0-9\]+ 0048 08A409C6\[^\n]*\n"	{ set x [expr $x+1] }
1810	    -re "^ +\[0-9\]+ 004c 08A449C6\[^\n]*\n"	{ set x [expr $x+1] }
1811	    -re "^ +\[0-9\]+ 0050 08A469C6\[^\n]*\n"	{ set x [expr $x+1] }
1812	    -re "^ +\[0-9\]+ 0054 08A489C6\[^\n]*\n"	{ set x [expr $x+1] }
1813	    -re "^ +\[0-9\]+ 0058 08A4C9C6\[^\n]*\n"	{ set x [expr $x+1] }
1814	    -re "^ +\[0-9\]+ 005c 08A4E9C6\[^\n]*\n"	{ set x [expr $x+1] }
1815	    -re "^ +\[0-9\]+ 0060 08A419C6\[^\n]*\n"	{ set x [expr $x+1] }
1816	    -re "^ +\[0-9\]+ 0064 08A459C6\[^\n]*\n"	{ set x [expr $x+1] }
1817	    -re "^ +\[0-9\]+ 0068 08A479C6\[^\n]*\n"	{ set x [expr $x+1] }
1818	    -re "^ +\[0-9\]+ 006c 08A499C6\[^\n]*\n"	{ set x [expr $x+1] }
1819	    -re "^ +\[0-9\]+ 0070 08A4D9C6\[^\n]*\n"	{ set x [expr $x+1] }
1820	    -re "^ +\[0-9\]+ 0074 08A4F9C6\[^\n]*\n"	{ set x [expr $x+1] }
1821	    -re "^ +\[0-9\]+ 0078 08A409C6\[^\n]*\n"	{ set x [expr $x+1] }
1822	    -re "^ +\[0-9\]+ 007c 08A449C6\[^\n]*\n"	{ set x [expr $x+1] }
1823	    -re "^ +\[0-9\]+ 0080 08A469C6\[^\n]*\n"	{ set x [expr $x+1] }
1824	    -re "^ +\[0-9\]+ 0084 08A489C6\[^\n]*\n"	{ set x [expr $x+1] }
1825	    -re "^ +\[0-9\]+ 0088 08A4C9C6\[^\n]*\n"	{ set x [expr $x+1] }
1826	    -re "^ +\[0-9\]+ 008c 08A4E9C6\[^\n]*\n"	{ set x [expr $x+1] }
1827	    -re "^ +\[0-9\]+ 0090 08A419C6\[^\n]*\n"	{ set x [expr $x+1] }
1828	    -re "^ +\[0-9\]+ 0094 08A459C6\[^\n]*\n"	{ set x [expr $x+1] }
1829	    -re "^ +\[0-9\]+ 0098 08A479C6\[^\n]*\n"	{ set x [expr $x+1] }
1830	    -re "^ +\[0-9\]+ 009c 08A499C6\[^\n]*\n"	{ set x [expr $x+1] }
1831	    -re "^ +\[0-9\]+ 00a0 08A4D9C6\[^\n]*\n"	{ set x [expr $x+1] }
1832	    -re "^ +\[0-9\]+ 00a4 08A4F9C6\[^\n]*\n"	{ set x [expr $x+1] }
1833	    -re "\[^\n\]*\n"				{ }
1834	    timeout				{ perror "timeout\n"; break }
1835	    eof					{ break }
1836	}
1837    }
1838
1839    # This was intended to do any cleanup necessary.  It kinda looks like it
1840    # isn't needed, but just in case, please keep it in for now.
1841    gas_finish
1842
1843    # Did we find what we were looking for?  If not, flunk it.
1844    if [expr $x==42] then { pass $testname } else { fail $testname }
1845}
1846
1847proc do_unit2 {} {
1848    set testname "unit2.s: unit2 tests"
1849    set x 0
1850
1851    gas_start "unit2.s" "-al"
1852
1853    # Check the assembled instruction against a table built by the HP assembler
1854    # Any differences should be checked by hand -- with the number of problems
1855    # I've seen in the HP assembler I don't completely trust it.
1856    #
1857    # Instead of having a variable for each match string just increment the
1858    # total number of matches seen.  That's simpler when testing large numbers
1859    # of instructions (as these tests to).
1860    while 1 {
1861	expect {
1862	    -re "^ +\[0-9\]+ 0000 08A403A6\[^\n]*\n"	{ set x [expr $x+1] }
1863	    -re "^ +\[0-9\]+ 0004 08A443A6\[^\n]*\n"	{ set x [expr $x+1] }
1864	    -re "^ +\[0-9\]+ 0008 08A463A6\[^\n]*\n"	{ set x [expr $x+1] }
1865	    -re "^ +\[0-9\]+ 000c 08A413A6\[^\n]*\n"	{ set x [expr $x+1] }
1866	    -re "^ +\[0-9\]+ 0010 08A453A6\[^\n]*\n"	{ set x [expr $x+1] }
1867	    -re "^ +\[0-9\]+ 0014 08A473A6\[^\n]*\n"	{ set x [expr $x+1] }
1868	    -re "^ +\[0-9\]+ 0018 08A409A6\[^\n]*\n"	{ set x [expr $x+1] }
1869	    -re "^ +\[0-9\]+ 001c 08A449A6\[^\n]*\n"	{ set x [expr $x+1] }
1870	    -re "^ +\[0-9\]+ 0020 08A469A6\[^\n]*\n"	{ set x [expr $x+1] }
1871	    -re "^ +\[0-9\]+ 0024 08A489A6\[^\n]*\n"	{ set x [expr $x+1] }
1872	    -re "^ +\[0-9\]+ 0028 08A4C9A6\[^\n]*\n"	{ set x [expr $x+1] }
1873	    -re "^ +\[0-9\]+ 002c 08A4E9A6\[^\n]*\n"	{ set x [expr $x+1] }
1874	    -re "^ +\[0-9\]+ 0030 08A419A6\[^\n]*\n"	{ set x [expr $x+1] }
1875	    -re "^ +\[0-9\]+ 0034 08A459A6\[^\n]*\n"	{ set x [expr $x+1] }
1876	    -re "^ +\[0-9\]+ 0038 08A479A6\[^\n]*\n"	{ set x [expr $x+1] }
1877	    -re "^ +\[0-9\]+ 003c 08A499A6\[^\n]*\n"	{ set x [expr $x+1] }
1878	    -re "^ +\[0-9\]+ 0040 08A4D9A6\[^\n]*\n"	{ set x [expr $x+1] }
1879	    -re "^ +\[0-9\]+ 0044 08A4F9A6\[^\n]*\n"	{ set x [expr $x+1] }
1880	    -re "^ +\[0-9\]+ 0048 08A409E6\[^\n]*\n"	{ set x [expr $x+1] }
1881	    -re "^ +\[0-9\]+ 004c 08A449E6\[^\n]*\n"	{ set x [expr $x+1] }
1882	    -re "^ +\[0-9\]+ 0050 08A469E6\[^\n]*\n"	{ set x [expr $x+1] }
1883	    -re "^ +\[0-9\]+ 0054 08A489E6\[^\n]*\n"	{ set x [expr $x+1] }
1884	    -re "^ +\[0-9\]+ 0058 08A4C9E6\[^\n]*\n"	{ set x [expr $x+1] }
1885	    -re "^ +\[0-9\]+ 005c 08A4E9E6\[^\n]*\n"	{ set x [expr $x+1] }
1886	    -re "^ +\[0-9\]+ 0060 08A419E6\[^\n]*\n"	{ set x [expr $x+1] }
1887	    -re "^ +\[0-9\]+ 0064 08A459E6\[^\n]*\n"	{ set x [expr $x+1] }
1888	    -re "^ +\[0-9\]+ 0068 08A479E6\[^\n]*\n"	{ set x [expr $x+1] }
1889	    -re "^ +\[0-9\]+ 006c 08A499E6\[^\n]*\n"	{ set x [expr $x+1] }
1890	    -re "^ +\[0-9\]+ 0070 08A4D9E6\[^\n]*\n"	{ set x [expr $x+1] }
1891	    -re "^ +\[0-9\]+ 0074 08A4F9E6\[^\n]*\n"	{ set x [expr $x+1] }
1892	    -re "\[^\n\]*\n"				{ }
1893	    timeout				{ perror "timeout\n"; break }
1894	    eof					{ break }
1895	}
1896    }
1897
1898    # This was intended to do any cleanup necessary.  It kinda looks like it
1899    # isn't needed, but just in case, please keep it in for now.
1900    gas_finish
1901
1902    # Did we find what we were looking for?  If not, flunk it.
1903    if [expr $x==30] then { pass $testname } else { fail $testname }
1904}
1905
1906proc do_dcor {} {
1907    set testname "dcor.s: dcor tests"
1908    set x 0
1909
1910    gas_start "dcor.s" "-al"
1911
1912    # Check the assembled instruction against a table built by the HP assembler
1913    # Any differences should be checked by hand -- with the number of problems
1914    # I've seen in the HP assembler I don't completely trust it.
1915    #
1916    # Instead of having a variable for each match string just increment the
1917    # total number of matches seen.  That's simpler when testing large numbers
1918    # of instructions (as these tests to).
1919    while 1 {
1920	expect {
1921	    -re "^ +\[0-9\]+ 0000 08800B85\[^\n]*\n"	{ set x [expr $x+1] }
1922	    -re "^ +\[0-9\]+ 0004 08804B85\[^\n]*\n"	{ set x [expr $x+1] }
1923	    -re "^ +\[0-9\]+ 0008 08806B85\[^\n]*\n"	{ set x [expr $x+1] }
1924	    -re "^ +\[0-9\]+ 000c 08808B85\[^\n]*\n"	{ set x [expr $x+1] }
1925	    -re "^ +\[0-9\]+ 0010 0880CB85\[^\n]*\n"	{ set x [expr $x+1] }
1926	    -re "^ +\[0-9\]+ 0014 0880EB85\[^\n]*\n"	{ set x [expr $x+1] }
1927	    -re "^ +\[0-9\]+ 0018 08801B85\[^\n]*\n"	{ set x [expr $x+1] }
1928	    -re "^ +\[0-9\]+ 001c 08805B85\[^\n]*\n"	{ set x [expr $x+1] }
1929	    -re "^ +\[0-9\]+ 0020 08807B85\[^\n]*\n"	{ set x [expr $x+1] }
1930	    -re "^ +\[0-9\]+ 0024 08809B85\[^\n]*\n"	{ set x [expr $x+1] }
1931	    -re "^ +\[0-9\]+ 0028 0880DB85\[^\n]*\n"	{ set x [expr $x+1] }
1932	    -re "^ +\[0-9\]+ 002c 0880FB85\[^\n]*\n"	{ set x [expr $x+1] }
1933	    -re "^ +\[0-9\]+ 0030 08800BC5\[^\n]*\n"	{ set x [expr $x+1] }
1934	    -re "^ +\[0-9\]+ 0034 08804BC5\[^\n]*\n"	{ set x [expr $x+1] }
1935	    -re "^ +\[0-9\]+ 0038 08806BC5\[^\n]*\n"	{ set x [expr $x+1] }
1936	    -re "^ +\[0-9\]+ 003c 08808BC5\[^\n]*\n"	{ set x [expr $x+1] }
1937	    -re "^ +\[0-9\]+ 0040 0880CBC5\[^\n]*\n"	{ set x [expr $x+1] }
1938	    -re "^ +\[0-9\]+ 0044 0880EBC5\[^\n]*\n"	{ set x [expr $x+1] }
1939	    -re "^ +\[0-9\]+ 0048 08801BC5\[^\n]*\n"	{ set x [expr $x+1] }
1940	    -re "^ +\[0-9\]+ 004c 08805BC5\[^\n]*\n"	{ set x [expr $x+1] }
1941	    -re "^ +\[0-9\]+ 0050 08807BC5\[^\n]*\n"	{ set x [expr $x+1] }
1942	    -re "^ +\[0-9\]+ 0054 08809BC5\[^\n]*\n"	{ set x [expr $x+1] }
1943	    -re "^ +\[0-9\]+ 0058 0880DBC5\[^\n]*\n"	{ set x [expr $x+1] }
1944	    -re "^ +\[0-9\]+ 005c 0880FBC5\[^\n]*\n"	{ set x [expr $x+1] }
1945	    -re "^ +\[0-9\]+ 0060 08800BC5\[^\n]*\n"	{ set x [expr $x+1] }
1946	    -re "^ +\[0-9\]+ 0064 08804BC5\[^\n]*\n"	{ set x [expr $x+1] }
1947	    -re "^ +\[0-9\]+ 0068 08806BC5\[^\n]*\n"	{ set x [expr $x+1] }
1948	    -re "^ +\[0-9\]+ 006c 08808BC5\[^\n]*\n"	{ set x [expr $x+1] }
1949	    -re "^ +\[0-9\]+ 0070 0880CBC5\[^\n]*\n"	{ set x [expr $x+1] }
1950	    -re "^ +\[0-9\]+ 0074 0880EBC5\[^\n]*\n"	{ set x [expr $x+1] }
1951	    -re "^ +\[0-9\]+ 0078 08801BC5\[^\n]*\n"	{ set x [expr $x+1] }
1952	    -re "^ +\[0-9\]+ 007c 08805BC5\[^\n]*\n"	{ set x [expr $x+1] }
1953	    -re "^ +\[0-9\]+ 0080 08807BC5\[^\n]*\n"	{ set x [expr $x+1] }
1954	    -re "^ +\[0-9\]+ 0084 08809BC5\[^\n]*\n"	{ set x [expr $x+1] }
1955	    -re "^ +\[0-9\]+ 0088 0880DBC5\[^\n]*\n"	{ set x [expr $x+1] }
1956	    -re "^ +\[0-9\]+ 008c 0880FBC5\[^\n]*\n"	{ set x [expr $x+1] }
1957	    -re "\[^\n\]*\n"				{ }
1958	    timeout				{ perror "timeout\n"; break }
1959	    eof					{ break }
1960	}
1961    }
1962
1963    # This was intended to do any cleanup necessary.  It kinda looks like it
1964    # isn't needed, but just in case, please keep it in for now.
1965    gas_finish
1966
1967    # Did we find what we were looking for?  If not, flunk it.
1968    if [expr $x==36] then { pass $testname } else { fail $testname }
1969}
1970
1971proc do_dcor2 {} {
1972    set testname "dcor2.s: dcor2 tests"
1973    set x 0
1974
1975    gas_start "dcor2.s" "-al"
1976
1977    # Check the assembled instruction against a table built by the HP assembler
1978    # Any differences should be checked by hand -- with the number of problems
1979    # I've seen in the HP assembler I don't completely trust it.
1980    #
1981    # Instead of having a variable for each match string just increment the
1982    # total number of matches seen.  That's simpler when testing large numbers
1983    # of instructions (as these tests to).
1984    while 1 {
1985	expect {
1986	    -re "^ +\[0-9\]+ 0000 08800BA5\[^\n]*\n"	{ set x [expr $x+1] }
1987	    -re "^ +\[0-9\]+ 0004 08804BA5\[^\n]*\n"	{ set x [expr $x+1] }
1988	    -re "^ +\[0-9\]+ 0008 08806BA5\[^\n]*\n"	{ set x [expr $x+1] }
1989	    -re "^ +\[0-9\]+ 000c 08808BA5\[^\n]*\n"	{ set x [expr $x+1] }
1990	    -re "^ +\[0-9\]+ 0010 0880CBA5\[^\n]*\n"	{ set x [expr $x+1] }
1991	    -re "^ +\[0-9\]+ 0014 0880EBA5\[^\n]*\n"	{ set x [expr $x+1] }
1992	    -re "^ +\[0-9\]+ 0018 08801BA5\[^\n]*\n"	{ set x [expr $x+1] }
1993	    -re "^ +\[0-9\]+ 001c 08805BA5\[^\n]*\n"	{ set x [expr $x+1] }
1994	    -re "^ +\[0-9\]+ 0020 08807BA5\[^\n]*\n"	{ set x [expr $x+1] }
1995	    -re "^ +\[0-9\]+ 0024 08809BA5\[^\n]*\n"	{ set x [expr $x+1] }
1996	    -re "^ +\[0-9\]+ 0028 0880DBA5\[^\n]*\n"	{ set x [expr $x+1] }
1997	    -re "^ +\[0-9\]+ 002c 0880FBA5\[^\n]*\n"	{ set x [expr $x+1] }
1998	    -re "^ +\[0-9\]+ 0030 08800BE5\[^\n]*\n"	{ set x [expr $x+1] }
1999	    -re "^ +\[0-9\]+ 0034 08804BE5\[^\n]*\n"	{ set x [expr $x+1] }
2000	    -re "^ +\[0-9\]+ 0038 08806BE5\[^\n]*\n"	{ set x [expr $x+1] }
2001	    -re "^ +\[0-9\]+ 003c 08808BE5\[^\n]*\n"	{ set x [expr $x+1] }
2002	    -re "^ +\[0-9\]+ 0040 0880CBE5\[^\n]*\n"	{ set x [expr $x+1] }
2003	    -re "^ +\[0-9\]+ 0044 0880EBE5\[^\n]*\n"	{ set x [expr $x+1] }
2004	    -re "^ +\[0-9\]+ 0048 08801BE5\[^\n]*\n"	{ set x [expr $x+1] }
2005	    -re "^ +\[0-9\]+ 004c 08805BE5\[^\n]*\n"	{ set x [expr $x+1] }
2006	    -re "^ +\[0-9\]+ 0050 08807BE5\[^\n]*\n"	{ set x [expr $x+1] }
2007	    -re "^ +\[0-9\]+ 0054 08809BE5\[^\n]*\n"	{ set x [expr $x+1] }
2008	    -re "^ +\[0-9\]+ 0058 0880DBE5\[^\n]*\n"	{ set x [expr $x+1] }
2009	    -re "^ +\[0-9\]+ 005c 0880FBE5\[^\n]*\n"	{ set x [expr $x+1] }
2010	    -re "\[^\n\]*\n"				{ }
2011	    timeout				{ perror "timeout\n"; break }
2012	    eof					{ break }
2013	}
2014    }
2015
2016    # This was intended to do any cleanup necessary.  It kinda looks like it
2017    # isn't needed, but just in case, please keep it in for now.
2018    gas_finish
2019
2020    # Did we find what we were looking for?  If not, flunk it.
2021    if [expr $x==24] then { pass $testname } else { fail $testname }
2022}
2023
2024proc do_addi {} {
2025    set testname "addi.s: addi tests"
2026    set x 0
2027
2028    gas_start "addi.s" "-al"
2029
2030    # Check the assembled instruction against a table built by the HP assembler
2031    # Any differences should be checked by hand -- with the number of problems
2032    # I've seen in the HP assembler I don't completely trust it.
2033    #
2034    # Instead of having a variable for each match string just increment the
2035    # total number of matches seen.  That's simpler when testing large numbers
2036    # of instructions (as these tests to).
2037    while 1 {
2038	expect {
2039	    -re "^ +\[0-9\]+ 0000 B4A600F6\[^\n\]*\n"	{ set x [expr $x+1] }
2040	    -re "^ +\[0-9\]+ 0004 B4A620F6\[^\n\]*\n"	{ set x [expr $x+1] }
2041	    -re "^ +\[0-9\]+ 0008 B4A640F6\[^\n\]*\n"	{ set x [expr $x+1] }
2042	    -re "^ +\[0-9\]+ 000c B4A660F6\[^\n\]*\n"	{ set x [expr $x+1] }
2043	    -re "^ +\[0-9\]+ 0010 B4A680F6\[^\n\]*\n"	{ set x [expr $x+1] }
2044	    -re "^ +\[0-9\]+ 0014 B4A6A0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2045	    -re "^ +\[0-9\]+ 0018 B4A6C0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2046	    -re "^ +\[0-9\]+ 001c B4A6E0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2047	    -re "^ +\[0-9\]+ 0020 B4A610F6\[^\n\]*\n"	{ set x [expr $x+1] }
2048	    -re "^ +\[0-9\]+ 0024 B4A630F6\[^\n\]*\n"	{ set x [expr $x+1] }
2049	    -re "^ +\[0-9\]+ 0028 B4A650F6\[^\n\]*\n"	{ set x [expr $x+1] }
2050	    -re "^ +\[0-9\]+ 002c B4A670F6\[^\n\]*\n"	{ set x [expr $x+1] }
2051	    -re "^ +\[0-9\]+ 0030 B4A690F6\[^\n\]*\n"	{ set x [expr $x+1] }
2052	    -re "^ +\[0-9\]+ 0034 B4A6B0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2053	    -re "^ +\[0-9\]+ 0038 B4A6D0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2054	    -re "^ +\[0-9\]+ 003c B4A6F0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2055	    -re "^ +\[0-9\]+ 0040 B4A608F6\[^\n\]*\n"	{ set x [expr $x+1] }
2056	    -re "^ +\[0-9\]+ 0044 B4A628F6\[^\n\]*\n"	{ set x [expr $x+1] }
2057	    -re "^ +\[0-9\]+ 0048 B4A648F6\[^\n\]*\n"	{ set x [expr $x+1] }
2058	    -re "^ +\[0-9\]+ 004c B4A668F6\[^\n\]*\n"	{ set x [expr $x+1] }
2059	    -re "^ +\[0-9\]+ 0050 B4A688F6\[^\n\]*\n"	{ set x [expr $x+1] }
2060	    -re "^ +\[0-9\]+ 0054 B4A6A8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2061	    -re "^ +\[0-9\]+ 0058 B4A6C8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2062	    -re "^ +\[0-9\]+ 005c B4A6E8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2063	    -re "^ +\[0-9\]+ 0060 B4A618F6\[^\n\]*\n"	{ set x [expr $x+1] }
2064	    -re "^ +\[0-9\]+ 0064 B4A638F6\[^\n\]*\n"	{ set x [expr $x+1] }
2065	    -re "^ +\[0-9\]+ 0068 B4A658F6\[^\n\]*\n"	{ set x [expr $x+1] }
2066	    -re "^ +\[0-9\]+ 006c B4A678F6\[^\n\]*\n"	{ set x [expr $x+1] }
2067	    -re "^ +\[0-9\]+ 0070 B4A698F6\[^\n\]*\n"	{ set x [expr $x+1] }
2068	    -re "^ +\[0-9\]+ 0074 B4A6B8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2069	    -re "^ +\[0-9\]+ 0078 B4A6D8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2070	    -re "^ +\[0-9\]+ 007c B4A6F8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2071	    -re "^ +\[0-9\]+ 0080 B0A600F6\[^\n\]*\n"	{ set x [expr $x+1] }
2072	    -re "^ +\[0-9\]+ 0084 B0A620F6\[^\n\]*\n"	{ set x [expr $x+1] }
2073	    -re "^ +\[0-9\]+ 0088 B0A640F6\[^\n\]*\n"	{ set x [expr $x+1] }
2074	    -re "^ +\[0-9\]+ 008c B0A660F6\[^\n\]*\n"	{ set x [expr $x+1] }
2075	    -re "^ +\[0-9\]+ 0090 B0A680F6\[^\n\]*\n"	{ set x [expr $x+1] }
2076	    -re "^ +\[0-9\]+ 0094 B0A6A0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2077	    -re "^ +\[0-9\]+ 0098 B0A6C0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2078	    -re "^ +\[0-9\]+ 009c B0A6E0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2079	    -re "^ +\[0-9\]+ 00a0 B0A610F6\[^\n\]*\n"	{ set x [expr $x+1] }
2080	    -re "^ +\[0-9\]+ 00a4 B0A630F6\[^\n\]*\n"	{ set x [expr $x+1] }
2081	    -re "^ +\[0-9\]+ 00a8 B0A650F6\[^\n\]*\n"	{ set x [expr $x+1] }
2082	    -re "^ +\[0-9\]+ 00ac B0A670F6\[^\n\]*\n"	{ set x [expr $x+1] }
2083	    -re "^ +\[0-9\]+ 00b0 B0A690F6\[^\n\]*\n"	{ set x [expr $x+1] }
2084	    -re "^ +\[0-9\]+ 00b4 B0A6B0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2085	    -re "^ +\[0-9\]+ 00b8 B0A6D0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2086	    -re "^ +\[0-9\]+ 00bc B0A6F0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2087	    -re "^ +\[0-9\]+ 00c0 B0A608F6\[^\n\]*\n"	{ set x [expr $x+1] }
2088	    -re "^ +\[0-9\]+ 00c4 B0A628F6\[^\n\]*\n"	{ set x [expr $x+1] }
2089	    -re "^ +\[0-9\]+ 00c8 B0A648F6\[^\n\]*\n"	{ set x [expr $x+1] }
2090	    -re "^ +\[0-9\]+ 00cc B0A668F6\[^\n\]*\n"	{ set x [expr $x+1] }
2091	    -re "^ +\[0-9\]+ 00d0 B0A688F6\[^\n\]*\n"	{ set x [expr $x+1] }
2092	    -re "^ +\[0-9\]+ 00d4 B0A6A8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2093	    -re "^ +\[0-9\]+ 00d8 B0A6C8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2094	    -re "^ +\[0-9\]+ 00dc B0A6E8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2095	    -re "^ +\[0-9\]+ 00e0 B0A618F6\[^\n\]*\n"	{ set x [expr $x+1] }
2096	    -re "^ +\[0-9\]+ 00e4 B0A638F6\[^\n\]*\n"	{ set x [expr $x+1] }
2097	    -re "^ +\[0-9\]+ 00e8 B0A658F6\[^\n\]*\n"	{ set x [expr $x+1] }
2098	    -re "^ +\[0-9\]+ 00ec B0A678F6\[^\n\]*\n"	{ set x [expr $x+1] }
2099	    -re "^ +\[0-9\]+ 00f0 B0A698F6\[^\n\]*\n"	{ set x [expr $x+1] }
2100	    -re "^ +\[0-9\]+ 00f4 B0A6B8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2101	    -re "^ +\[0-9\]+ 00f8 B0A6D8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2102	    -re "^ +\[0-9\]+ 00fc B0A6F8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2103	    -re "^ +\[0-9\]+ 0100 B4A608F6\[^\n\]*\n"	{ set x [expr $x+1] }
2104	    -re "^ +\[0-9\]+ 0104 B4A628F6\[^\n\]*\n"	{ set x [expr $x+1] }
2105	    -re "^ +\[0-9\]+ 0108 B4A648F6\[^\n\]*\n"	{ set x [expr $x+1] }
2106	    -re "^ +\[0-9\]+ 010c B4A668F6\[^\n\]*\n"	{ set x [expr $x+1] }
2107	    -re "^ +\[0-9\]+ 0110 B4A688F6\[^\n\]*\n"	{ set x [expr $x+1] }
2108	    -re "^ +\[0-9\]+ 0114 B4A6A8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2109	    -re "^ +\[0-9\]+ 0118 B4A6C8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2110	    -re "^ +\[0-9\]+ 011c B4A6E8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2111	    -re "^ +\[0-9\]+ 0120 B4A618F6\[^\n\]*\n"	{ set x [expr $x+1] }
2112	    -re "^ +\[0-9\]+ 0124 B4A638F6\[^\n\]*\n"	{ set x [expr $x+1] }
2113	    -re "^ +\[0-9\]+ 0128 B4A658F6\[^\n\]*\n"	{ set x [expr $x+1] }
2114	    -re "^ +\[0-9\]+ 012c B4A678F6\[^\n\]*\n"	{ set x [expr $x+1] }
2115	    -re "^ +\[0-9\]+ 0130 B4A698F6\[^\n\]*\n"	{ set x [expr $x+1] }
2116	    -re "^ +\[0-9\]+ 0134 B4A6B8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2117	    -re "^ +\[0-9\]+ 0138 B4A6D8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2118	    -re "^ +\[0-9\]+ 013c B4A6F8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2119	    -re "^ +\[0-9\]+ 0140 B0A600F6\[^\n\]*\n"	{ set x [expr $x+1] }
2120	    -re "^ +\[0-9\]+ 0144 B0A620F6\[^\n\]*\n"	{ set x [expr $x+1] }
2121	    -re "^ +\[0-9\]+ 0148 B0A640F6\[^\n\]*\n"	{ set x [expr $x+1] }
2122	    -re "^ +\[0-9\]+ 014c B0A660F6\[^\n\]*\n"	{ set x [expr $x+1] }
2123	    -re "^ +\[0-9\]+ 0150 B0A680F6\[^\n\]*\n"	{ set x [expr $x+1] }
2124	    -re "^ +\[0-9\]+ 0154 B0A6A0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2125	    -re "^ +\[0-9\]+ 0158 B0A6C0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2126	    -re "^ +\[0-9\]+ 015c B0A6E0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2127	    -re "^ +\[0-9\]+ 0160 B0A610F6\[^\n\]*\n"	{ set x [expr $x+1] }
2128	    -re "^ +\[0-9\]+ 0164 B0A630F6\[^\n\]*\n"	{ set x [expr $x+1] }
2129	    -re "^ +\[0-9\]+ 0168 B0A650F6\[^\n\]*\n"	{ set x [expr $x+1] }
2130	    -re "^ +\[0-9\]+ 016c B0A670F6\[^\n\]*\n"	{ set x [expr $x+1] }
2131	    -re "^ +\[0-9\]+ 0170 B0A690F6\[^\n\]*\n"	{ set x [expr $x+1] }
2132	    -re "^ +\[0-9\]+ 0174 B0A6B0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2133	    -re "^ +\[0-9\]+ 0178 B0A6D0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2134	    -re "^ +\[0-9\]+ 017c B0A6F0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2135	    -re "^ +\[0-9\]+ 0180 B0A608F6\[^\n\]*\n"	{ set x [expr $x+1] }
2136	    -re "^ +\[0-9\]+ 0184 B0A628F6\[^\n\]*\n"	{ set x [expr $x+1] }
2137	    -re "^ +\[0-9\]+ 0188 B0A648F6\[^\n\]*\n"	{ set x [expr $x+1] }
2138	    -re "^ +\[0-9\]+ 018c B0A668F6\[^\n\]*\n"	{ set x [expr $x+1] }
2139	    -re "^ +\[0-9\]+ 0190 B0A688F6\[^\n\]*\n"	{ set x [expr $x+1] }
2140	    -re "^ +\[0-9\]+ 0194 B0A6A8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2141	    -re "^ +\[0-9\]+ 0198 B0A6C8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2142	    -re "^ +\[0-9\]+ 019c B0A6E8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2143	    -re "^ +\[0-9\]+ 01a0 B0A618F6\[^\n\]*\n"	{ set x [expr $x+1] }
2144	    -re "^ +\[0-9\]+ 01a4 B0A638F6\[^\n\]*\n"	{ set x [expr $x+1] }
2145	    -re "^ +\[0-9\]+ 01a8 B0A658F6\[^\n\]*\n"	{ set x [expr $x+1] }
2146	    -re "^ +\[0-9\]+ 01ac B0A678F6\[^\n\]*\n"	{ set x [expr $x+1] }
2147	    -re "^ +\[0-9\]+ 01b0 B0A698F6\[^\n\]*\n"	{ set x [expr $x+1] }
2148	    -re "^ +\[0-9\]+ 01b4 B0A6B8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2149	    -re "^ +\[0-9\]+ 01b8 B0A6D8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2150	    -re "^ +\[0-9\]+ 01bc B0A6F8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2151	    -re "\[^\n\]*\n"				{ }
2152	    timeout				{ perror "timeout\n"; break }
2153	    eof					{ break }
2154	}
2155    }
2156
2157    # This was intended to do any cleanup necessary.  It kinda looks like it
2158    # isn't needed, but just in case, please keep it in for now.
2159    gas_finish
2160
2161    # Did we find what we were looking for?  If not, flunk it.
2162    if [expr $x==112] then { pass $testname } else { fail $testname }
2163}
2164
2165proc do_subi {} {
2166    set testname "subi.s: subi tests"
2167    set x 0
2168
2169    gas_start "subi.s" "-al"
2170
2171    # Check the assembled instruction against a table built by the HP assembler
2172    # Any differences should be checked by hand -- with the number of problems
2173    # I've seen in the HP assembler I don't completely trust it.
2174    #
2175    # Instead of having a variable for each match string just increment the
2176    # total number of matches seen.  That's simpler when testing large numbers
2177    # of instructions (as these tests to).
2178    while 1 {
2179	expect {
2180	    -re "^ +\[0-9\]+ 0000 94A600F6\[^\n\]*\n"	{ set x [expr $x+1] }
2181	    -re "^ +\[0-9\]+ 0004 94A620F6\[^\n\]*\n"	{ set x [expr $x+1] }
2182	    -re "^ +\[0-9\]+ 0008 94A640F6\[^\n\]*\n"	{ set x [expr $x+1] }
2183	    -re "^ +\[0-9\]+ 000c 94A660F6\[^\n\]*\n"	{ set x [expr $x+1] }
2184	    -re "^ +\[0-9\]+ 0010 94A680F6\[^\n\]*\n"	{ set x [expr $x+1] }
2185	    -re "^ +\[0-9\]+ 0014 94A6A0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2186	    -re "^ +\[0-9\]+ 0018 94A6C0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2187	    -re "^ +\[0-9\]+ 001c 94A6E0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2188	    -re "^ +\[0-9\]+ 0020 94A610F6\[^\n\]*\n"	{ set x [expr $x+1] }
2189	    -re "^ +\[0-9\]+ 0024 94A630F6\[^\n\]*\n"	{ set x [expr $x+1] }
2190	    -re "^ +\[0-9\]+ 0028 94A650F6\[^\n\]*\n"	{ set x [expr $x+1] }
2191	    -re "^ +\[0-9\]+ 002c 94A670F6\[^\n\]*\n"	{ set x [expr $x+1] }
2192	    -re "^ +\[0-9\]+ 0030 94A690F6\[^\n\]*\n"	{ set x [expr $x+1] }
2193	    -re "^ +\[0-9\]+ 0034 94A6B0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2194	    -re "^ +\[0-9\]+ 0038 94A6D0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2195	    -re "^ +\[0-9\]+ 003c 94A6F0F6\[^\n\]*\n"	{ set x [expr $x+1] }
2196	    -re "^ +\[0-9\]+ 0040 94A608F6\[^\n\]*\n"	{ set x [expr $x+1] }
2197	    -re "^ +\[0-9\]+ 0044 94A628F6\[^\n\]*\n"	{ set x [expr $x+1] }
2198	    -re "^ +\[0-9\]+ 0048 94A648F6\[^\n\]*\n"	{ set x [expr $x+1] }
2199	    -re "^ +\[0-9\]+ 004c 94A668F6\[^\n\]*\n"	{ set x [expr $x+1] }
2200	    -re "^ +\[0-9\]+ 0050 94A688F6\[^\n\]*\n"	{ set x [expr $x+1] }
2201	    -re "^ +\[0-9\]+ 0054 94A6A8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2202	    -re "^ +\[0-9\]+ 0058 94A6C8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2203	    -re "^ +\[0-9\]+ 005c 94A6E8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2204	    -re "^ +\[0-9\]+ 0060 94A618F6\[^\n\]*\n"	{ set x [expr $x+1] }
2205	    -re "^ +\[0-9\]+ 0064 94A638F6\[^\n\]*\n"	{ set x [expr $x+1] }
2206	    -re "^ +\[0-9\]+ 0068 94A658F6\[^\n\]*\n"	{ set x [expr $x+1] }
2207	    -re "^ +\[0-9\]+ 006c 94A678F6\[^\n\]*\n"	{ set x [expr $x+1] }
2208	    -re "^ +\[0-9\]+ 0070 94A698F6\[^\n\]*\n"	{ set x [expr $x+1] }
2209	    -re "^ +\[0-9\]+ 0074 94A6B8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2210	    -re "^ +\[0-9\]+ 0078 94A6D8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2211	    -re "^ +\[0-9\]+ 007c 94A6F8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2212	    -re "^ +\[0-9\]+ 0080 94A608F6\[^\n\]*\n"	{ set x [expr $x+1] }
2213	    -re "^ +\[0-9\]+ 0084 94A628F6\[^\n\]*\n"	{ set x [expr $x+1] }
2214	    -re "^ +\[0-9\]+ 0088 94A648F6\[^\n\]*\n"	{ set x [expr $x+1] }
2215	    -re "^ +\[0-9\]+ 008c 94A668F6\[^\n\]*\n"	{ set x [expr $x+1] }
2216	    -re "^ +\[0-9\]+ 0090 94A688F6\[^\n\]*\n"	{ set x [expr $x+1] }
2217	    -re "^ +\[0-9\]+ 0094 94A6A8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2218	    -re "^ +\[0-9\]+ 0098 94A6C8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2219	    -re "^ +\[0-9\]+ 009c 94A6E8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2220	    -re "^ +\[0-9\]+ 00a0 94A618F6\[^\n\]*\n"	{ set x [expr $x+1] }
2221	    -re "^ +\[0-9\]+ 00a4 94A638F6\[^\n\]*\n"	{ set x [expr $x+1] }
2222	    -re "^ +\[0-9\]+ 00a8 94A658F6\[^\n\]*\n"	{ set x [expr $x+1] }
2223	    -re "^ +\[0-9\]+ 00ac 94A678F6\[^\n\]*\n"	{ set x [expr $x+1] }
2224	    -re "^ +\[0-9\]+ 00b0 94A698F6\[^\n\]*\n"	{ set x [expr $x+1] }
2225	    -re "^ +\[0-9\]+ 00b4 94A6B8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2226	    -re "^ +\[0-9\]+ 00b8 94A6D8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2227	    -re "^ +\[0-9\]+ 00bc 94A6F8F6\[^\n\]*\n"	{ set x [expr $x+1] }
2228	    -re "\[^\n\]*\n"				{ }
2229	    timeout				{ perror "timeout\n"; break }
2230	    eof					{ break }
2231	}
2232    }
2233
2234    # This was intended to do any cleanup necessary.  It kinda looks like it
2235    # isn't needed, but just in case, please keep it in for now.
2236    gas_finish
2237
2238    # Did we find what we were looking for?  If not, flunk it.
2239    if [expr $x==48] then { pass $testname } else { fail $testname }
2240}
2241
2242proc do_shift {} {
2243    set testname "shift.s: shift tests"
2244    set x 0
2245
2246    gas_start "shift.s" "-al"
2247
2248    # Check the assembled instruction against a table built by the HP assembler
2249    # Any differences should be checked by hand -- with the number of problems
2250    # I've seen in the HP assembler I don't completely trust it.
2251    #
2252    # Instead of having a variable for each match string just increment the
2253    # total number of matches seen.  That's simpler when testing large numbers
2254    # of instructions (as these tests to).
2255    while 1 {
2256	expect {
2257	    -re "^ +\[0-9\]+ 0000 D0A40006\[^\n]*\n"	{ set x [expr $x+1] }
2258	    -re "^ +\[0-9\]+ 0004 D0A42006\[^\n]*\n"	{ set x [expr $x+1] }
2259	    -re "^ +\[0-9\]+ 0008 D0A44006\[^\n]*\n"	{ set x [expr $x+1] }
2260	    -re "^ +\[0-9\]+ 000c D0A46006\[^\n]*\n"	{ set x [expr $x+1] }
2261	    -re "^ +\[0-9\]+ 0010 D0A48006\[^\n]*\n"	{ set x [expr $x+1] }
2262	    -re "^ +\[0-9\]+ 0014 D0A4A006\[^\n]*\n"	{ set x [expr $x+1] }
2263	    -re "^ +\[0-9\]+ 0018 D0A4C006\[^\n]*\n"	{ set x [expr $x+1] }
2264	    -re "^ +\[0-9\]+ 001c D0A4E006\[^\n]*\n"	{ set x [expr $x+1] }
2265	    -re "^ +\[0-9\]+ 0020 D0A40B46\[^\n]*\n"	{ set x [expr $x+1] }
2266	    -re "^ +\[0-9\]+ 0024 D0A42B46\[^\n]*\n"	{ set x [expr $x+1] }
2267	    -re "^ +\[0-9\]+ 0028 D0A44B46\[^\n]*\n"	{ set x [expr $x+1] }
2268	    -re "^ +\[0-9\]+ 002c D0A46B46\[^\n]*\n"	{ set x [expr $x+1] }
2269	    -re "^ +\[0-9\]+ 0030 D0A48B46\[^\n]*\n"	{ set x [expr $x+1] }
2270	    -re "^ +\[0-9\]+ 0034 D0A4AB46\[^\n]*\n"	{ set x [expr $x+1] }
2271	    -re "^ +\[0-9\]+ 0038 D0A4CB46\[^\n]*\n"	{ set x [expr $x+1] }
2272	    -re "^ +\[0-9\]+ 003c D0A4EB46\[^\n]*\n"	{ set x [expr $x+1] }
2273	    -re "\[^\n\]*\n"				{ }
2274	    timeout				{ perror "timeout\n"; break }
2275	    eof					{ break }
2276	}
2277    }
2278
2279    # This was intended to do any cleanup necessary.  It kinda looks like it
2280    # isn't needed, but just in case, please keep it in for now.
2281    gas_finish
2282
2283    # Did we find what we were looking for?  If not, flunk it.
2284    if [expr $x==16] then { pass $testname } else { fail $testname }
2285}
2286
2287proc do_shift2 {} {
2288    set testname "shift2.s: shift tests"
2289    set x 0
2290
2291    gas_start "shift2.s" "-al"
2292
2293    # Check the assembled instruction against a table built by the HP assembler
2294    # Any differences should be checked by hand -- with the number of problems
2295    # I've seen in the HP assembler I don't completely trust it.
2296    #
2297    # Instead of having a variable for each match string just increment the
2298    # total number of matches seen.  That's simpler when testing large numbers
2299    # of instructions (as these tests to).
2300    while 1 {
2301	expect {
2302	    -re "^ +\[0-9\]+ 0000 D0A40006\[^\n]*\n"	{ set x [expr $x+1] }
2303	    -re "^ +\[0-9\]+ 0004 D0A42006\[^\n]*\n"	{ set x [expr $x+1] }
2304	    -re "^ +\[0-9\]+ 0008 D0A44006\[^\n]*\n"	{ set x [expr $x+1] }
2305	    -re "^ +\[0-9\]+ 000c D0A46006\[^\n]*\n"	{ set x [expr $x+1] }
2306	    -re "^ +\[0-9\]+ 0010 D0A48006\[^\n]*\n"	{ set x [expr $x+1] }
2307	    -re "^ +\[0-9\]+ 0014 D0A4A006\[^\n]*\n"	{ set x [expr $x+1] }
2308	    -re "^ +\[0-9\]+ 0018 D0A4C006\[^\n]*\n"	{ set x [expr $x+1] }
2309	    -re "^ +\[0-9\]+ 001c D0A4E006\[^\n]*\n"	{ set x [expr $x+1] }
2310	    -re "^ +\[0-9\]+ 0020 D0A40B46\[^\n]*\n"	{ set x [expr $x+1] }
2311	    -re "^ +\[0-9\]+ 0024 D0A42B46\[^\n]*\n"	{ set x [expr $x+1] }
2312	    -re "^ +\[0-9\]+ 0028 D0A44B46\[^\n]*\n"	{ set x [expr $x+1] }
2313	    -re "^ +\[0-9\]+ 002c D0A46B46\[^\n]*\n"	{ set x [expr $x+1] }
2314	    -re "^ +\[0-9\]+ 0030 D0A48B46\[^\n]*\n"	{ set x [expr $x+1] }
2315	    -re "^ +\[0-9\]+ 0034 D0A4AB46\[^\n]*\n"	{ set x [expr $x+1] }
2316	    -re "^ +\[0-9\]+ 0038 D0A4CB46\[^\n]*\n"	{ set x [expr $x+1] }
2317	    -re "^ +\[0-9\]+ 003c D0A4EB46\[^\n]*\n"	{ set x [expr $x+1] }
2318	    -re "\[^\n\]*\n"				{ }
2319	    timeout				{ perror "timeout\n"; break }
2320	    eof					{ break }
2321	}
2322    }
2323
2324    # This was intended to do any cleanup necessary.  It kinda looks like it
2325    # isn't needed, but just in case, please keep it in for now.
2326    gas_finish
2327
2328    # Did we find what we were looking for?  If not, flunk it.
2329    if [expr $x==16] then { pass $testname } else { fail $testname }
2330}
2331
2332proc do_shift3 {} {
2333    set testname "shift3.s: shift3 tests"
2334    set x 0
2335
2336    gas_start "shift3.s" "-al"
2337
2338    # Check the assembled instruction against a table built by the HP assembler
2339    # Any differences should be checked by hand -- with the number of problems
2340    # I've seen in the HP assembler I don't completely trust it.
2341    #
2342    # Instead of having a variable for each match string just increment the
2343    # total number of matches seen.  That's simpler when testing large numbers
2344    # of instructions (as these tests to).
2345    while 1 {
2346	expect {
2347	    -re "^ +\[0-9\]+ 0000 D0A40206\[^\n]*\n"	{ set x [expr $x+1] }
2348	    -re "^ +\[0-9\]+ 0004 D0A42206\[^\n]*\n"	{ set x [expr $x+1] }
2349	    -re "^ +\[0-9\]+ 0008 D0A44206\[^\n]*\n"	{ set x [expr $x+1] }
2350	    -re "^ +\[0-9\]+ 000c D0A46206\[^\n]*\n"	{ set x [expr $x+1] }
2351	    -re "^ +\[0-9\]+ 0010 D0A48206\[^\n]*\n"	{ set x [expr $x+1] }
2352	    -re "^ +\[0-9\]+ 0014 D0A4A206\[^\n]*\n"	{ set x [expr $x+1] }
2353	    -re "^ +\[0-9\]+ 0018 D0A4C206\[^\n]*\n"	{ set x [expr $x+1] }
2354	    -re "^ +\[0-9\]+ 001c D0A4E206\[^\n]*\n"	{ set x [expr $x+1] }
2355	    -re "^ +\[0-9\]+ 0020 D0A40F46\[^\n]*\n"	{ set x [expr $x+1] }
2356	    -re "^ +\[0-9\]+ 0024 D0A42F46\[^\n]*\n"	{ set x [expr $x+1] }
2357	    -re "^ +\[0-9\]+ 0028 D0A44F46\[^\n]*\n"	{ set x [expr $x+1] }
2358	    -re "^ +\[0-9\]+ 002c D0A46F46\[^\n]*\n"	{ set x [expr $x+1] }
2359	    -re "^ +\[0-9\]+ 0030 D0A48F46\[^\n]*\n"	{ set x [expr $x+1] }
2360	    -re "^ +\[0-9\]+ 0034 D0A4AF46\[^\n]*\n"	{ set x [expr $x+1] }
2361	    -re "^ +\[0-9\]+ 0038 D0A4CF46\[^\n]*\n"	{ set x [expr $x+1] }
2362	    -re "^ +\[0-9\]+ 003c D0A4EF46\[^\n]*\n"	{ set x [expr $x+1] }
2363	    -re "\[^\n\]*\n"				{ }
2364	    timeout				{ perror "timeout\n"; break }
2365	    eof					{ break }
2366	}
2367    }
2368
2369    # This was intended to do any cleanup necessary.  It kinda looks like it
2370    # isn't needed, but just in case, please keep it in for now.
2371    gas_finish
2372
2373    # Did we find what we were looking for?  If not, flunk it.
2374    if [expr $x==16] then { pass $testname } else { fail $testname }
2375}
2376
2377proc do_extract {} {
2378    set testname "extract.s: extract tests"
2379    set x 0
2380
2381    gas_start "extract.s" "-al"
2382
2383    # Check the assembled instruction against a table built by the HP assembler
2384    # Any differences should be checked by hand -- with the number of problems
2385    # I've seen in the HP assembler I don't completely trust it.
2386    #
2387    # Instead of having a variable for each match string just increment the
2388    # total number of matches seen.  That's simpler when testing large numbers
2389    # of instructions (as these tests to).
2390    while 1 {
2391	expect {
2392	    -re "^ +\[0-9\]+ 0000 D08618B6\[^\n]*\n"	{ set x [expr $x+1] }
2393	    -re "^ +\[0-9\]+ 0004 D08638B6\[^\n]*\n"	{ set x [expr $x+1] }
2394	    -re "^ +\[0-9\]+ 0008 D08658B6\[^\n]*\n"	{ set x [expr $x+1] }
2395	    -re "^ +\[0-9\]+ 000c D08678B6\[^\n]*\n"	{ set x [expr $x+1] }
2396	    -re "^ +\[0-9\]+ 0010 D08698B6\[^\n]*\n"	{ set x [expr $x+1] }
2397	    -re "^ +\[0-9\]+ 0014 D086B8B6\[^\n]*\n"	{ set x [expr $x+1] }
2398	    -re "^ +\[0-9\]+ 0018 D086D8B6\[^\n]*\n"	{ set x [expr $x+1] }
2399	    -re "^ +\[0-9\]+ 001c D086F8B6\[^\n]*\n"	{ set x [expr $x+1] }
2400	    -re "^ +\[0-9\]+ 0020 D0861CB6\[^\n]*\n"	{ set x [expr $x+1] }
2401	    -re "^ +\[0-9\]+ 0024 D0863CB6\[^\n]*\n"	{ set x [expr $x+1] }
2402	    -re "^ +\[0-9\]+ 0028 D0865CB6\[^\n]*\n"	{ set x [expr $x+1] }
2403	    -re "^ +\[0-9\]+ 002c D0867CB6\[^\n]*\n"	{ set x [expr $x+1] }
2404	    -re "^ +\[0-9\]+ 0030 D0869CB6\[^\n]*\n"	{ set x [expr $x+1] }
2405	    -re "^ +\[0-9\]+ 0034 D086BCB6\[^\n]*\n"	{ set x [expr $x+1] }
2406	    -re "^ +\[0-9\]+ 0038 D086DCB6\[^\n]*\n"	{ set x [expr $x+1] }
2407	    -re "^ +\[0-9\]+ 003c D086FCB6\[^\n]*\n"	{ set x [expr $x+1] }
2408	    -re "^ +\[0-9\]+ 0040 D086101B\[^\n]*\n"	{ set x [expr $x+1] }
2409	    -re "^ +\[0-9\]+ 0044 D086301B\[^\n]*\n"	{ set x [expr $x+1] }
2410	    -re "^ +\[0-9\]+ 0048 D086501B\[^\n]*\n"	{ set x [expr $x+1] }
2411	    -re "^ +\[0-9\]+ 004c D086701B\[^\n]*\n"	{ set x [expr $x+1] }
2412	    -re "^ +\[0-9\]+ 0050 D086901B\[^\n]*\n"	{ set x [expr $x+1] }
2413	    -re "^ +\[0-9\]+ 0054 D086B01B\[^\n]*\n"	{ set x [expr $x+1] }
2414	    -re "^ +\[0-9\]+ 0058 D086D01B\[^\n]*\n"	{ set x [expr $x+1] }
2415	    -re "^ +\[0-9\]+ 005c D086F01B\[^\n]*\n"	{ set x [expr $x+1] }
2416	    -re "^ +\[0-9\]+ 0060 D086141B\[^\n]*\n"	{ set x [expr $x+1] }
2417	    -re "^ +\[0-9\]+ 0064 D086341B\[^\n]*\n"	{ set x [expr $x+1] }
2418	    -re "^ +\[0-9\]+ 0068 D086541B\[^\n]*\n"	{ set x [expr $x+1] }
2419	    -re "^ +\[0-9\]+ 006c D086741B\[^\n]*\n"	{ set x [expr $x+1] }
2420	    -re "^ +\[0-9\]+ 0070 D086941B\[^\n]*\n"	{ set x [expr $x+1] }
2421	    -re "^ +\[0-9\]+ 0074 D086B41B\[^\n]*\n"	{ set x [expr $x+1] }
2422	    -re "^ +\[0-9\]+ 0078 D086D41B\[^\n]*\n"	{ set x [expr $x+1] }
2423	    -re "^ +\[0-9\]+ 007c D086F41B\[^\n]*\n"	{ set x [expr $x+1] }
2424	    -re "\[^\n\]*\n"				{ }
2425	    timeout				{ perror "timeout\n"; break }
2426	    eof					{ break }
2427	}
2428    }
2429
2430    # This was intended to do any cleanup necessary.  It kinda looks like it
2431    # isn't needed, but just in case, please keep it in for now.
2432    gas_finish
2433
2434    # Did we find what we were looking for?  If not, flunk it.
2435    if [expr $x==32] then { pass $testname } else { fail $testname }
2436}
2437
2438proc do_extract2 {} {
2439    set testname "extract2.s: extract2 tests"
2440    set x 0
2441
2442    gas_start "extract2.s" "-al"
2443
2444    # Check the assembled instruction against a table built by the HP assembler
2445    # Any differences should be checked by hand -- with the number of problems
2446    # I've seen in the HP assembler I don't completely trust it.
2447    #
2448    # Instead of having a variable for each match string just increment the
2449    # total number of matches seen.  That's simpler when testing large numbers
2450    # of instructions (as these tests to).
2451    while 1 {
2452	expect {
2453	    -re "^ +\[0-9\]+ 0000 D08618B6\[^\n]*\n"	{ set x [expr $x+1] }
2454	    -re "^ +\[0-9\]+ 0004 D08638B6\[^\n]*\n"	{ set x [expr $x+1] }
2455	    -re "^ +\[0-9\]+ 0008 D08658B6\[^\n]*\n"	{ set x [expr $x+1] }
2456	    -re "^ +\[0-9\]+ 000c D08678B6\[^\n]*\n"	{ set x [expr $x+1] }
2457	    -re "^ +\[0-9\]+ 0010 D08698B6\[^\n]*\n"	{ set x [expr $x+1] }
2458	    -re "^ +\[0-9\]+ 0014 D086B8B6\[^\n]*\n"	{ set x [expr $x+1] }
2459	    -re "^ +\[0-9\]+ 0018 D086D8B6\[^\n]*\n"	{ set x [expr $x+1] }
2460	    -re "^ +\[0-9\]+ 001c D086F8B6\[^\n]*\n"	{ set x [expr $x+1] }
2461	    -re "^ +\[0-9\]+ 0020 D0861CB6\[^\n]*\n"	{ set x [expr $x+1] }
2462	    -re "^ +\[0-9\]+ 0024 D0863CB6\[^\n]*\n"	{ set x [expr $x+1] }
2463	    -re "^ +\[0-9\]+ 0028 D0865CB6\[^\n]*\n"	{ set x [expr $x+1] }
2464	    -re "^ +\[0-9\]+ 002c D0867CB6\[^\n]*\n"	{ set x [expr $x+1] }
2465	    -re "^ +\[0-9\]+ 0030 D0869CB6\[^\n]*\n"	{ set x [expr $x+1] }
2466	    -re "^ +\[0-9\]+ 0034 D086BCB6\[^\n]*\n"	{ set x [expr $x+1] }
2467	    -re "^ +\[0-9\]+ 0038 D086DCB6\[^\n]*\n"	{ set x [expr $x+1] }
2468	    -re "^ +\[0-9\]+ 003c D086FCB6\[^\n]*\n"	{ set x [expr $x+1] }
2469	    -re "^ +\[0-9\]+ 0040 D086101B\[^\n]*\n"	{ set x [expr $x+1] }
2470	    -re "^ +\[0-9\]+ 0044 D086301B\[^\n]*\n"	{ set x [expr $x+1] }
2471	    -re "^ +\[0-9\]+ 0048 D086501B\[^\n]*\n"	{ set x [expr $x+1] }
2472	    -re "^ +\[0-9\]+ 004c D086701B\[^\n]*\n"	{ set x [expr $x+1] }
2473	    -re "^ +\[0-9\]+ 0050 D086901B\[^\n]*\n"	{ set x [expr $x+1] }
2474	    -re "^ +\[0-9\]+ 0054 D086B01B\[^\n]*\n"	{ set x [expr $x+1] }
2475	    -re "^ +\[0-9\]+ 0058 D086D01B\[^\n]*\n"	{ set x [expr $x+1] }
2476	    -re "^ +\[0-9\]+ 005c D086F01B\[^\n]*\n"	{ set x [expr $x+1] }
2477	    -re "^ +\[0-9\]+ 0060 D086141B\[^\n]*\n"	{ set x [expr $x+1] }
2478	    -re "^ +\[0-9\]+ 0064 D086341B\[^\n]*\n"	{ set x [expr $x+1] }
2479	    -re "^ +\[0-9\]+ 0068 D086541B\[^\n]*\n"	{ set x [expr $x+1] }
2480	    -re "^ +\[0-9\]+ 006c D086741B\[^\n]*\n"	{ set x [expr $x+1] }
2481	    -re "^ +\[0-9\]+ 0070 D086941B\[^\n]*\n"	{ set x [expr $x+1] }
2482	    -re "^ +\[0-9\]+ 0074 D086B41B\[^\n]*\n"	{ set x [expr $x+1] }
2483	    -re "^ +\[0-9\]+ 0078 D086D41B\[^\n]*\n"	{ set x [expr $x+1] }
2484	    -re "^ +\[0-9\]+ 007c D086F41B\[^\n]*\n"	{ set x [expr $x+1] }
2485	    -re "\[^\n\]*\n"				{ }
2486	    timeout				{ perror "timeout\n"; break }
2487	    eof					{ break }
2488	}
2489    }
2490
2491    # This was intended to do any cleanup necessary.  It kinda looks like it
2492    # isn't needed, but just in case, please keep it in for now.
2493    gas_finish
2494
2495    # Did we find what we were looking for?  If not, flunk it.
2496    if [expr $x==32] then { pass $testname } else { fail $testname }
2497}
2498
2499proc do_extract3 {} {
2500    set testname "extract3.s: extract3 tests"
2501    set x 0
2502
2503    gas_start "extract3.s" "-al"
2504
2505    # Check the assembled instruction against a table built by the HP assembler
2506    # Any differences should be checked by hand -- with the number of problems
2507    # I've seen in the HP assembler I don't completely trust it.
2508    #
2509    # Instead of having a variable for each match string just increment the
2510    # total number of matches seen.  That's simpler when testing large numbers
2511    # of instructions (as these tests to).
2512    while 1 {
2513	expect {
2514	    -re "^ +\[0-9\]+ 0000 D886015B\[^\n]*\n"	{ set x [expr $x+1] }
2515	    -re "^ +\[0-9\]+ 0004 D886215B\[^\n]*\n"	{ set x [expr $x+1] }
2516	    -re "^ +\[0-9\]+ 0008 D886415B\[^\n]*\n"	{ set x [expr $x+1] }
2517	    -re "^ +\[0-9\]+ 000c D886615B\[^\n]*\n"	{ set x [expr $x+1] }
2518	    -re "^ +\[0-9\]+ 0010 D886815B\[^\n]*\n"	{ set x [expr $x+1] }
2519	    -re "^ +\[0-9\]+ 0014 D886A15B\[^\n]*\n"	{ set x [expr $x+1] }
2520	    -re "^ +\[0-9\]+ 0018 D886C15B\[^\n]*\n"	{ set x [expr $x+1] }
2521	    -re "^ +\[0-9\]+ 001c D886E15B\[^\n]*\n"	{ set x [expr $x+1] }
2522	    -re "^ +\[0-9\]+ 0020 D886055B\[^\n]*\n"	{ set x [expr $x+1] }
2523	    -re "^ +\[0-9\]+ 0024 D886255B\[^\n]*\n"	{ set x [expr $x+1] }
2524	    -re "^ +\[0-9\]+ 0028 D886455B\[^\n]*\n"	{ set x [expr $x+1] }
2525	    -re "^ +\[0-9\]+ 002c D886655B\[^\n]*\n"	{ set x [expr $x+1] }
2526	    -re "^ +\[0-9\]+ 0030 D886855B\[^\n]*\n"	{ set x [expr $x+1] }
2527	    -re "^ +\[0-9\]+ 0034 D886A55B\[^\n]*\n"	{ set x [expr $x+1] }
2528	    -re "^ +\[0-9\]+ 0038 D886C55B\[^\n]*\n"	{ set x [expr $x+1] }
2529	    -re "^ +\[0-9\]+ 003c D886E55B\[^\n]*\n"	{ set x [expr $x+1] }
2530	    -re "^ +\[0-9\]+ 0040 D086121B\[^\n]*\n"	{ set x [expr $x+1] }
2531	    -re "^ +\[0-9\]+ 0044 D086321B\[^\n]*\n"	{ set x [expr $x+1] }
2532	    -re "^ +\[0-9\]+ 0048 D086521B\[^\n]*\n"	{ set x [expr $x+1] }
2533	    -re "^ +\[0-9\]+ 004c D086721B\[^\n]*\n"	{ set x [expr $x+1] }
2534	    -re "^ +\[0-9\]+ 0050 D086921B\[^\n]*\n"	{ set x [expr $x+1] }
2535	    -re "^ +\[0-9\]+ 0054 D086B21B\[^\n]*\n"	{ set x [expr $x+1] }
2536	    -re "^ +\[0-9\]+ 0058 D086D21B\[^\n]*\n"	{ set x [expr $x+1] }
2537	    -re "^ +\[0-9\]+ 005c D086F21B\[^\n]*\n"	{ set x [expr $x+1] }
2538	    -re "^ +\[0-9\]+ 0060 D086161B\[^\n]*\n"	{ set x [expr $x+1] }
2539	    -re "^ +\[0-9\]+ 0064 D086361B\[^\n]*\n"	{ set x [expr $x+1] }
2540	    -re "^ +\[0-9\]+ 0068 D086561B\[^\n]*\n"	{ set x [expr $x+1] }
2541	    -re "^ +\[0-9\]+ 006c D086761B\[^\n]*\n"	{ set x [expr $x+1] }
2542	    -re "^ +\[0-9\]+ 0070 D086961B\[^\n]*\n"	{ set x [expr $x+1] }
2543	    -re "^ +\[0-9\]+ 0074 D086B61B\[^\n]*\n"	{ set x [expr $x+1] }
2544	    -re "^ +\[0-9\]+ 0078 D086D61B\[^\n]*\n"	{ set x [expr $x+1] }
2545	    -re "^ +\[0-9\]+ 007c D086F61B\[^\n]*\n"	{ set x [expr $x+1] }
2546	    -re "\[^\n\]*\n"				{ }
2547	    timeout				{ perror "timeout\n"; break }
2548	    eof					{ break }
2549	}
2550    }
2551
2552    # This was intended to do any cleanup necessary.  It kinda looks like it
2553    # isn't needed, but just in case, please keep it in for now.
2554    gas_finish
2555
2556    # Did we find what we were looking for?  If not, flunk it.
2557    if [expr $x==32] then { pass $testname } else { fail $testname }
2558}
2559
2560proc do_deposit {} {
2561    set testname "deposit.s: deposit tests"
2562    set x 0
2563
2564    gas_start "deposit.s" "-al"
2565
2566    # Check the assembled instruction against a table built by the HP assembler
2567    # Any differences should be checked by hand -- with the number of problems
2568    # I've seen in the HP assembler I don't completely trust it.
2569    #
2570    # Instead of having a variable for each match string just increment the
2571    # total number of matches seen.  That's simpler when testing large numbers
2572    # of instructions (as these tests to).
2573    while 1 {
2574	expect {
2575	    -re "^ +\[0-9\]+ 0000 D4C40B56\[^\n]*\n"	{ set x [expr $x+1] }
2576	    -re "^ +\[0-9\]+ 0004 D4C42B56\[^\n]*\n"	{ set x [expr $x+1] }
2577	    -re "^ +\[0-9\]+ 0008 D4C44B56\[^\n]*\n"	{ set x [expr $x+1] }
2578	    -re "^ +\[0-9\]+ 000c D4C46B56\[^\n]*\n"	{ set x [expr $x+1] }
2579	    -re "^ +\[0-9\]+ 0010 D4C48B56\[^\n]*\n"	{ set x [expr $x+1] }
2580	    -re "^ +\[0-9\]+ 0014 D4C4AB56\[^\n]*\n"	{ set x [expr $x+1] }
2581	    -re "^ +\[0-9\]+ 0018 D4C4CB56\[^\n]*\n"	{ set x [expr $x+1] }
2582	    -re "^ +\[0-9\]+ 001c D4C4EB56\[^\n]*\n"	{ set x [expr $x+1] }
2583	    -re "^ +\[0-9\]+ 0020 D4C40F56\[^\n]*\n"	{ set x [expr $x+1] }
2584	    -re "^ +\[0-9\]+ 0024 D4C42F56\[^\n]*\n"	{ set x [expr $x+1] }
2585	    -re "^ +\[0-9\]+ 0028 D4C44F56\[^\n]*\n"	{ set x [expr $x+1] }
2586	    -re "^ +\[0-9\]+ 002c D4C46F56\[^\n]*\n"	{ set x [expr $x+1] }
2587	    -re "^ +\[0-9\]+ 0030 D4C48F56\[^\n]*\n"	{ set x [expr $x+1] }
2588	    -re "^ +\[0-9\]+ 0034 D4C4AF56\[^\n]*\n"	{ set x [expr $x+1] }
2589	    -re "^ +\[0-9\]+ 0038 D4C4CF56\[^\n]*\n"	{ set x [expr $x+1] }
2590	    -re "^ +\[0-9\]+ 003c D4C4EF56\[^\n]*\n"	{ set x [expr $x+1] }
2591	    -re "^ +\[0-9\]+ 0040 D4C4001B\[^\n]*\n"	{ set x [expr $x+1] }
2592	    -re "^ +\[0-9\]+ 0044 D4C4201B\[^\n]*\n"	{ set x [expr $x+1] }
2593	    -re "^ +\[0-9\]+ 0048 D4C4401B\[^\n]*\n"	{ set x [expr $x+1] }
2594	    -re "^ +\[0-9\]+ 004c D4C4601B\[^\n]*\n"	{ set x [expr $x+1] }
2595	    -re "^ +\[0-9\]+ 0050 D4C4801B\[^\n]*\n"	{ set x [expr $x+1] }
2596	    -re "^ +\[0-9\]+ 0054 D4C4A01B\[^\n]*\n"	{ set x [expr $x+1] }
2597	    -re "^ +\[0-9\]+ 0058 D4C4C01B\[^\n]*\n"	{ set x [expr $x+1] }
2598	    -re "^ +\[0-9\]+ 005c D4C4E01B\[^\n]*\n"	{ set x [expr $x+1] }
2599	    -re "^ +\[0-9\]+ 0060 D4C4041B\[^\n]*\n"	{ set x [expr $x+1] }
2600	    -re "^ +\[0-9\]+ 0064 D4C4241B\[^\n]*\n"	{ set x [expr $x+1] }
2601	    -re "^ +\[0-9\]+ 0068 D4C4441B\[^\n]*\n"	{ set x [expr $x+1] }
2602	    -re "^ +\[0-9\]+ 006c D4C4641B\[^\n]*\n"	{ set x [expr $x+1] }
2603	    -re "^ +\[0-9\]+ 0070 D4C4841B\[^\n]*\n"	{ set x [expr $x+1] }
2604	    -re "^ +\[0-9\]+ 0074 D4C4A41B\[^\n]*\n"	{ set x [expr $x+1] }
2605	    -re "^ +\[0-9\]+ 0078 D4C4C41B\[^\n]*\n"	{ set x [expr $x+1] }
2606	    -re "^ +\[0-9\]+ 007c D4C4E41B\[^\n]*\n"	{ set x [expr $x+1] }
2607	    -re "^ +\[0-9\]+ 0080 D4DF141B\[^\n]*\n"	{ set x [expr $x+1] }
2608	    -re "^ +\[0-9\]+ 0084 D4DF341B\[^\n]*\n"	{ set x [expr $x+1] }
2609	    -re "^ +\[0-9\]+ 0088 D4DF541B\[^\n]*\n"	{ set x [expr $x+1] }
2610	    -re "^ +\[0-9\]+ 008c D4DF741B\[^\n]*\n"	{ set x [expr $x+1] }
2611	    -re "^ +\[0-9\]+ 0090 D4DF941B\[^\n]*\n"	{ set x [expr $x+1] }
2612	    -re "^ +\[0-9\]+ 0094 D4DFB41B\[^\n]*\n"	{ set x [expr $x+1] }
2613	    -re "^ +\[0-9\]+ 0098 D4DFD41B\[^\n]*\n"	{ set x [expr $x+1] }
2614	    -re "^ +\[0-9\]+ 009c D4DFF41B\[^\n]*\n"	{ set x [expr $x+1] }
2615	    -re "^ +\[0-9\]+ 00a0 D4DF101B\[^\n]*\n"	{ set x [expr $x+1] }
2616	    -re "^ +\[0-9\]+ 00a4 D4DF301B\[^\n]*\n"	{ set x [expr $x+1] }
2617	    -re "^ +\[0-9\]+ 00a8 D4DF501B\[^\n]*\n"	{ set x [expr $x+1] }
2618	    -re "^ +\[0-9\]+ 00ac D4DF701B\[^\n]*\n"	{ set x [expr $x+1] }
2619	    -re "^ +\[0-9\]+ 00b0 D4DF901B\[^\n]*\n"	{ set x [expr $x+1] }
2620	    -re "^ +\[0-9\]+ 00b4 D4DFB01B\[^\n]*\n"	{ set x [expr $x+1] }
2621	    -re "^ +\[0-9\]+ 00b8 D4DFD01B\[^\n]*\n"	{ set x [expr $x+1] }
2622	    -re "^ +\[0-9\]+ 00bc D4DFF01B\[^\n]*\n"	{ set x [expr $x+1] }
2623	    -re "^ +\[0-9\]+ 00c0 D4DF1F76\[^\n]*\n"	{ set x [expr $x+1] }
2624	    -re "^ +\[0-9\]+ 00c4 D4DF3F76\[^\n]*\n"	{ set x [expr $x+1] }
2625	    -re "^ +\[0-9\]+ 00c8 D4DF5F76\[^\n]*\n"	{ set x [expr $x+1] }
2626	    -re "^ +\[0-9\]+ 00cc D4DF7F76\[^\n]*\n"	{ set x [expr $x+1] }
2627	    -re "^ +\[0-9\]+ 00d0 D4DF9F76\[^\n]*\n"	{ set x [expr $x+1] }
2628	    -re "^ +\[0-9\]+ 00d4 D4DFBF76\[^\n]*\n"	{ set x [expr $x+1] }
2629	    -re "^ +\[0-9\]+ 00d8 D4DFDF76\[^\n]*\n"	{ set x [expr $x+1] }
2630	    -re "^ +\[0-9\]+ 00dc D4DFFF76\[^\n]*\n"	{ set x [expr $x+1] }
2631	    -re "^ +\[0-9\]+ 00e0 D4DF1B76\[^\n]*\n"	{ set x [expr $x+1] }
2632	    -re "^ +\[0-9\]+ 00e4 D4DF3B76\[^\n]*\n"	{ set x [expr $x+1] }
2633	    -re "^ +\[0-9\]+ 00e8 D4DF5B76\[^\n]*\n"	{ set x [expr $x+1] }
2634	    -re "^ +\[0-9\]+ 00ec D4DF7B76\[^\n]*\n"	{ set x [expr $x+1] }
2635	    -re "^ +\[0-9\]+ 00f0 D4DF9B76\[^\n]*\n"	{ set x [expr $x+1] }
2636	    -re "^ +\[0-9\]+ 00f4 D4DFBB76\[^\n]*\n"	{ set x [expr $x+1] }
2637	    -re "^ +\[0-9\]+ 00f8 D4DFDB76\[^\n]*\n"	{ set x [expr $x+1] }
2638	    -re "^ +\[0-9\]+ 00fc D4DFFB76\[^\n]*\n"	{ set x [expr $x+1] }
2639	    -re "\[^\n\]*\n"				{ }
2640	    timeout				{ perror "timeout\n"; break }
2641	    eof					{ break }
2642	}
2643    }
2644
2645    # This was intended to do any cleanup necessary.  It kinda looks like it
2646    # isn't needed, but just in case, please keep it in for now.
2647    gas_finish
2648
2649    # Did we find what we were looking for?  If not, flunk it.
2650    if [expr $x==64] then { pass $testname } else { fail $testname }
2651}
2652
2653proc do_deposit2 {} {
2654    set testname "deposit2.s: deposit2 tests"
2655    set x 0
2656
2657    gas_start "deposit2.s" "-al"
2658
2659    # Check the assembled instruction against a table built by the HP assembler
2660    # Any differences should be checked by hand -- with the number of problems
2661    # I've seen in the HP assembler I don't completely trust it.
2662    #
2663    # Instead of having a variable for each match string just increment the
2664    # total number of matches seen.  That's simpler when testing large numbers
2665    # of instructions (as these tests to).
2666    while 1 {
2667	expect {
2668	    -re "^ +\[0-9\]+ 0000 D4C40B56\[^\n]*\n"	{ set x [expr $x+1] }
2669	    -re "^ +\[0-9\]+ 0004 D4C42B56\[^\n]*\n"	{ set x [expr $x+1] }
2670	    -re "^ +\[0-9\]+ 0008 D4C44B56\[^\n]*\n"	{ set x [expr $x+1] }
2671	    -re "^ +\[0-9\]+ 000c D4C46B56\[^\n]*\n"	{ set x [expr $x+1] }
2672	    -re "^ +\[0-9\]+ 0010 D4C48B56\[^\n]*\n"	{ set x [expr $x+1] }
2673	    -re "^ +\[0-9\]+ 0014 D4C4AB56\[^\n]*\n"	{ set x [expr $x+1] }
2674	    -re "^ +\[0-9\]+ 0018 D4C4CB56\[^\n]*\n"	{ set x [expr $x+1] }
2675	    -re "^ +\[0-9\]+ 001c D4C4EB56\[^\n]*\n"	{ set x [expr $x+1] }
2676	    -re "^ +\[0-9\]+ 0020 D4C40F56\[^\n]*\n"	{ set x [expr $x+1] }
2677	    -re "^ +\[0-9\]+ 0024 D4C42F56\[^\n]*\n"	{ set x [expr $x+1] }
2678	    -re "^ +\[0-9\]+ 0028 D4C44F56\[^\n]*\n"	{ set x [expr $x+1] }
2679	    -re "^ +\[0-9\]+ 002c D4C46F56\[^\n]*\n"	{ set x [expr $x+1] }
2680	    -re "^ +\[0-9\]+ 0030 D4C48F56\[^\n]*\n"	{ set x [expr $x+1] }
2681	    -re "^ +\[0-9\]+ 0034 D4C4AF56\[^\n]*\n"	{ set x [expr $x+1] }
2682	    -re "^ +\[0-9\]+ 0038 D4C4CF56\[^\n]*\n"	{ set x [expr $x+1] }
2683	    -re "^ +\[0-9\]+ 003c D4C4EF56\[^\n]*\n"	{ set x [expr $x+1] }
2684	    -re "^ +\[0-9\]+ 0040 D4C4001B\[^\n]*\n"	{ set x [expr $x+1] }
2685	    -re "^ +\[0-9\]+ 0044 D4C4201B\[^\n]*\n"	{ set x [expr $x+1] }
2686	    -re "^ +\[0-9\]+ 0048 D4C4401B\[^\n]*\n"	{ set x [expr $x+1] }
2687	    -re "^ +\[0-9\]+ 004c D4C4601B\[^\n]*\n"	{ set x [expr $x+1] }
2688	    -re "^ +\[0-9\]+ 0050 D4C4801B\[^\n]*\n"	{ set x [expr $x+1] }
2689	    -re "^ +\[0-9\]+ 0054 D4C4A01B\[^\n]*\n"	{ set x [expr $x+1] }
2690	    -re "^ +\[0-9\]+ 0058 D4C4C01B\[^\n]*\n"	{ set x [expr $x+1] }
2691	    -re "^ +\[0-9\]+ 005c D4C4E01B\[^\n]*\n"	{ set x [expr $x+1] }
2692	    -re "^ +\[0-9\]+ 0060 D4C4041B\[^\n]*\n"	{ set x [expr $x+1] }
2693	    -re "^ +\[0-9\]+ 0064 D4C4241B\[^\n]*\n"	{ set x [expr $x+1] }
2694	    -re "^ +\[0-9\]+ 0068 D4C4441B\[^\n]*\n"	{ set x [expr $x+1] }
2695	    -re "^ +\[0-9\]+ 006c D4C4641B\[^\n]*\n"	{ set x [expr $x+1] }
2696	    -re "^ +\[0-9\]+ 0070 D4C4841B\[^\n]*\n"	{ set x [expr $x+1] }
2697	    -re "^ +\[0-9\]+ 0074 D4C4A41B\[^\n]*\n"	{ set x [expr $x+1] }
2698	    -re "^ +\[0-9\]+ 0078 D4C4C41B\[^\n]*\n"	{ set x [expr $x+1] }
2699	    -re "^ +\[0-9\]+ 007c D4C4E41B\[^\n]*\n"	{ set x [expr $x+1] }
2700	    -re "^ +\[0-9\]+ 0080 D4DF141B\[^\n]*\n"	{ set x [expr $x+1] }
2701	    -re "^ +\[0-9\]+ 0084 D4DF341B\[^\n]*\n"	{ set x [expr $x+1] }
2702	    -re "^ +\[0-9\]+ 0088 D4DF541B\[^\n]*\n"	{ set x [expr $x+1] }
2703	    -re "^ +\[0-9\]+ 008c D4DF741B\[^\n]*\n"	{ set x [expr $x+1] }
2704	    -re "^ +\[0-9\]+ 0090 D4DF941B\[^\n]*\n"	{ set x [expr $x+1] }
2705	    -re "^ +\[0-9\]+ 0094 D4DFB41B\[^\n]*\n"	{ set x [expr $x+1] }
2706	    -re "^ +\[0-9\]+ 0098 D4DFD41B\[^\n]*\n"	{ set x [expr $x+1] }
2707	    -re "^ +\[0-9\]+ 009c D4DFF41B\[^\n]*\n"	{ set x [expr $x+1] }
2708	    -re "^ +\[0-9\]+ 00a0 D4DF101B\[^\n]*\n"	{ set x [expr $x+1] }
2709	    -re "^ +\[0-9\]+ 00a4 D4DF301B\[^\n]*\n"	{ set x [expr $x+1] }
2710	    -re "^ +\[0-9\]+ 00a8 D4DF501B\[^\n]*\n"	{ set x [expr $x+1] }
2711	    -re "^ +\[0-9\]+ 00ac D4DF701B\[^\n]*\n"	{ set x [expr $x+1] }
2712	    -re "^ +\[0-9\]+ 00b0 D4DF901B\[^\n]*\n"	{ set x [expr $x+1] }
2713	    -re "^ +\[0-9\]+ 00b4 D4DFB01B\[^\n]*\n"	{ set x [expr $x+1] }
2714	    -re "^ +\[0-9\]+ 00b8 D4DFD01B\[^\n]*\n"	{ set x [expr $x+1] }
2715	    -re "^ +\[0-9\]+ 00bc D4DFF01B\[^\n]*\n"	{ set x [expr $x+1] }
2716	    -re "^ +\[0-9\]+ 00c0 D4DF1F76\[^\n]*\n"	{ set x [expr $x+1] }
2717	    -re "^ +\[0-9\]+ 00c4 D4DF3F76\[^\n]*\n"	{ set x [expr $x+1] }
2718	    -re "^ +\[0-9\]+ 00c8 D4DF5F76\[^\n]*\n"	{ set x [expr $x+1] }
2719	    -re "^ +\[0-9\]+ 00cc D4DF7F76\[^\n]*\n"	{ set x [expr $x+1] }
2720	    -re "^ +\[0-9\]+ 00d0 D4DF9F76\[^\n]*\n"	{ set x [expr $x+1] }
2721	    -re "^ +\[0-9\]+ 00d4 D4DFBF76\[^\n]*\n"	{ set x [expr $x+1] }
2722	    -re "^ +\[0-9\]+ 00d8 D4DFDF76\[^\n]*\n"	{ set x [expr $x+1] }
2723	    -re "^ +\[0-9\]+ 00dc D4DFFF76\[^\n]*\n"	{ set x [expr $x+1] }
2724	    -re "^ +\[0-9\]+ 00e0 D4DF1B76\[^\n]*\n"	{ set x [expr $x+1] }
2725	    -re "^ +\[0-9\]+ 00e4 D4DF3B76\[^\n]*\n"	{ set x [expr $x+1] }
2726	    -re "^ +\[0-9\]+ 00e8 D4DF5B76\[^\n]*\n"	{ set x [expr $x+1] }
2727	    -re "^ +\[0-9\]+ 00ec D4DF7B76\[^\n]*\n"	{ set x [expr $x+1] }
2728	    -re "^ +\[0-9\]+ 00f0 D4DF9B76\[^\n]*\n"	{ set x [expr $x+1] }
2729	    -re "^ +\[0-9\]+ 00f4 D4DFBB76\[^\n]*\n"	{ set x [expr $x+1] }
2730	    -re "^ +\[0-9\]+ 00f8 D4DFDB76\[^\n]*\n"	{ set x [expr $x+1] }
2731	    -re "^ +\[0-9\]+ 00fc D4DFFB76\[^\n]*\n"	{ set x [expr $x+1] }
2732	    -re "\[^\n\]*\n"				{ }
2733	    timeout				{ perror "timeout\n"; break }
2734	    eof					{ break }
2735	}
2736    }
2737
2738    # This was intended to do any cleanup necessary.  It kinda looks like it
2739    # isn't needed, but just in case, please keep it in for now.
2740    gas_finish
2741
2742    # Did we find what we were looking for?  If not, flunk it.
2743    if [expr $x==64] then { pass $testname } else { fail $testname }
2744}
2745
2746proc do_deposit3 {} {
2747    set testname "deposit3.s: deposit3 tests"
2748    set x 0
2749
2750    gas_start "deposit3.s" "-al"
2751
2752    # Check the assembled instruction against a table built by the HP assembler
2753    # Any differences should be checked by hand -- with the number of problems
2754    # I've seen in the HP assembler I don't completely trust it.
2755    #
2756    # Instead of having a variable for each match string just increment the
2757    # total number of matches seen.  That's simpler when testing large numbers
2758    # of instructions (as these tests to).
2759    while 1 {
2760	expect {
2761	    -re "^ +\[0-9\]+ 0000 F0C40ABB\[^\n\]*\n"	{ set x [expr $x+1] }
2762	    -re "^ +\[0-9\]+ 0004 F0C42ABB\[^\n\]*\n"	{ set x [expr $x+1] }
2763	    -re "^ +\[0-9\]+ 0008 F0C44ABB\[^\n\]*\n"	{ set x [expr $x+1] }
2764	    -re "^ +\[0-9\]+ 000c F0C46ABB\[^\n\]*\n"	{ set x [expr $x+1] }
2765	    -re "^ +\[0-9\]+ 0010 F0C48ABB\[^\n\]*\n"	{ set x [expr $x+1] }
2766	    -re "^ +\[0-9\]+ 0014 F0C4AABB\[^\n\]*\n"	{ set x [expr $x+1] }
2767	    -re "^ +\[0-9\]+ 0018 F0C4CABB\[^\n\]*\n"	{ set x [expr $x+1] }
2768	    -re "^ +\[0-9\]+ 001c F0C4EABB\[^\n\]*\n"	{ set x [expr $x+1] }
2769	    -re "^ +\[0-9\]+ 0020 F0C40EBB\[^\n\]*\n"	{ set x [expr $x+1] }
2770	    -re "^ +\[0-9\]+ 0024 F0C42EBB\[^\n\]*\n"	{ set x [expr $x+1] }
2771	    -re "^ +\[0-9\]+ 0028 F0C44EBB\[^\n\]*\n"	{ set x [expr $x+1] }
2772	    -re "^ +\[0-9\]+ 002c F0C46EBB\[^\n\]*\n"	{ set x [expr $x+1] }
2773	    -re "^ +\[0-9\]+ 0030 F0C48EBB\[^\n\]*\n"	{ set x [expr $x+1] }
2774	    -re "^ +\[0-9\]+ 0034 F0C4AEBB\[^\n\]*\n"	{ set x [expr $x+1] }
2775	    -re "^ +\[0-9\]+ 0038 F0C4CEBB\[^\n\]*\n"	{ set x [expr $x+1] }
2776	    -re "^ +\[0-9\]+ 003c F0C4EEBB\[^\n\]*\n"	{ set x [expr $x+1] }
2777	    -re "^ +\[0-9\]+ 0040 D4C4021B\[^\n\]*\n"	{ set x [expr $x+1] }
2778	    -re "^ +\[0-9\]+ 0044 D4C4221B\[^\n\]*\n"	{ set x [expr $x+1] }
2779	    -re "^ +\[0-9\]+ 0048 D4C4421B\[^\n\]*\n"	{ set x [expr $x+1] }
2780	    -re "^ +\[0-9\]+ 004c D4C4621B\[^\n\]*\n"	{ set x [expr $x+1] }
2781	    -re "^ +\[0-9\]+ 0050 D4C4821B\[^\n\]*\n"	{ set x [expr $x+1] }
2782	    -re "^ +\[0-9\]+ 0054 D4C4A21B\[^\n\]*\n"	{ set x [expr $x+1] }
2783	    -re "^ +\[0-9\]+ 0058 D4C4C21B\[^\n\]*\n"	{ set x [expr $x+1] }
2784	    -re "^ +\[0-9\]+ 005c D4C4E21B\[^\n\]*\n"	{ set x [expr $x+1] }
2785	    -re "^ +\[0-9\]+ 0060 D4C4061B\[^\n\]*\n"	{ set x [expr $x+1] }
2786	    -re "^ +\[0-9\]+ 0064 D4C4261B\[^\n\]*\n"	{ set x [expr $x+1] }
2787	    -re "^ +\[0-9\]+ 0068 D4C4461B\[^\n\]*\n"	{ set x [expr $x+1] }
2788	    -re "^ +\[0-9\]+ 006c D4C4661B\[^\n\]*\n"	{ set x [expr $x+1] }
2789	    -re "^ +\[0-9\]+ 0070 D4C4861B\[^\n\]*\n"	{ set x [expr $x+1] }
2790	    -re "^ +\[0-9\]+ 0074 D4C4A61B\[^\n\]*\n"	{ set x [expr $x+1] }
2791	    -re "^ +\[0-9\]+ 0078 D4C4C61B\[^\n\]*\n"	{ set x [expr $x+1] }
2792	    -re "^ +\[0-9\]+ 007c D4C4E61B\[^\n\]*\n"	{ set x [expr $x+1] }
2793	    -re "^ +\[0-9\]+ 0080 D4DF161B\[^\n\]*\n"	{ set x [expr $x+1] }
2794	    -re "^ +\[0-9\]+ 0084 D4DF361B\[^\n\]*\n"	{ set x [expr $x+1] }
2795	    -re "^ +\[0-9\]+ 0088 D4DF561B\[^\n\]*\n"	{ set x [expr $x+1] }
2796	    -re "^ +\[0-9\]+ 008c D4DF761B\[^\n\]*\n"	{ set x [expr $x+1] }
2797	    -re "^ +\[0-9\]+ 0090 D4DF961B\[^\n\]*\n"	{ set x [expr $x+1] }
2798	    -re "^ +\[0-9\]+ 0094 D4DFB61B\[^\n\]*\n"	{ set x [expr $x+1] }
2799	    -re "^ +\[0-9\]+ 0098 D4DFD61B\[^\n\]*\n"	{ set x [expr $x+1] }
2800	    -re "^ +\[0-9\]+ 009c D4DFF61B\[^\n\]*\n"	{ set x [expr $x+1] }
2801	    -re "^ +\[0-9\]+ 00a0 D4DF121B\[^\n\]*\n"	{ set x [expr $x+1] }
2802	    -re "^ +\[0-9\]+ 00a4 D4DF321B\[^\n\]*\n"	{ set x [expr $x+1] }
2803	    -re "^ +\[0-9\]+ 00a8 D4DF521B\[^\n\]*\n"	{ set x [expr $x+1] }
2804	    -re "^ +\[0-9\]+ 00ac D4DF721B\[^\n\]*\n"	{ set x [expr $x+1] }
2805	    -re "^ +\[0-9\]+ 00b0 D4DF921B\[^\n\]*\n"	{ set x [expr $x+1] }
2806	    -re "^ +\[0-9\]+ 00b4 D4DFB21B\[^\n\]*\n"	{ set x [expr $x+1] }
2807	    -re "^ +\[0-9\]+ 00b8 D4DFD21B\[^\n\]*\n"	{ set x [expr $x+1] }
2808	    -re "^ +\[0-9\]+ 00bc D4DFF21B\[^\n\]*\n"	{ set x [expr $x+1] }
2809	    -re "^ +\[0-9\]+ 00c0 F4DF0EBC\[^\n\]*\n"	{ set x [expr $x+1] }
2810	    -re "^ +\[0-9\]+ 00c4 F4DF2EBC\[^\n\]*\n"	{ set x [expr $x+1] }
2811	    -re "^ +\[0-9\]+ 00c8 F4DF4EBC\[^\n\]*\n"	{ set x [expr $x+1] }
2812	    -re "^ +\[0-9\]+ 00cc F4DF6EBC\[^\n\]*\n"	{ set x [expr $x+1] }
2813	    -re "^ +\[0-9\]+ 00d0 F4DF8EBC\[^\n\]*\n"	{ set x [expr $x+1] }
2814	    -re "^ +\[0-9\]+ 00d4 F4DFAEBC\[^\n\]*\n"	{ set x [expr $x+1] }
2815	    -re "^ +\[0-9\]+ 00d8 F4DFCEBC\[^\n\]*\n"	{ set x [expr $x+1] }
2816	    -re "^ +\[0-9\]+ 00dc F4DFEEBC\[^\n\]*\n"	{ set x [expr $x+1] }
2817	    -re "^ +\[0-9\]+ 00e0 F4DF0ABC\[^\n\]*\n"	{ set x [expr $x+1] }
2818	    -re "^ +\[0-9\]+ 00e4 F4DF2ABC\[^\n\]*\n"	{ set x [expr $x+1] }
2819	    -re "^ +\[0-9\]+ 00e8 F4DF4ABC\[^\n\]*\n"	{ set x [expr $x+1] }
2820	    -re "^ +\[0-9\]+ 00ec F4DF6ABC\[^\n\]*\n"	{ set x [expr $x+1] }
2821	    -re "^ +\[0-9\]+ 00f0 F4DF8ABC\[^\n\]*\n"	{ set x [expr $x+1] }
2822	    -re "^ +\[0-9\]+ 00f4 F4DFAABC\[^\n\]*\n"	{ set x [expr $x+1] }
2823	    -re "^ +\[0-9\]+ 00f8 F4DFCABC\[^\n\]*\n"	{ set x [expr $x+1] }
2824	    -re "^ +\[0-9\]+ 00fc F4DFEABC\[^\n\]*\n"	{ set x [expr $x+1] }
2825	    -re "\[^\n\]*\n"				{ }
2826	    timeout				{ perror "timeout\n"; break }
2827	    eof					{ break }
2828	}
2829    }
2830
2831    # This was intended to do any cleanup necessary.  It kinda looks like it
2832    # isn't needed, but just in case, please keep it in for now.
2833    gas_finish
2834
2835    # Did we find what we were looking for?  If not, flunk it.
2836    if [expr $x==64] then { pass $testname } else { fail $testname }
2837}
2838
2839proc do_system {} {
2840    set testname "system.s: system tests"
2841    set x 0
2842
2843    gas_start "system.s" "-al"
2844
2845    # Check the assembled instruction against a table built by the HP assembler
2846    # Any differences should be checked by hand -- with the number of problems
2847    # I've seen in the HP assembler I don't completely trust it.
2848    #
2849    # Instead of having a variable for each match string just increment the
2850    # total number of matches seen.  That's simpler when testing large numbers
2851    # of instructions (as these tests to).
2852    while 1 {
2853	expect {
2854	    -re "^ +\[0-9\]+ 0000 00018005\[^\n]*\n"	{ set x [expr $x+1] }
2855	    -re "^ +\[0-9\]+ 0004 00000C00\[^\n]*\n"	{ set x [expr $x+1] }
2856	    -re "^ +\[0-9\]+ 0008 00000CA0\[^\n]*\n"	{ set x [expr $x+1] }
2857	    -re "^ +\[0-9\]+ 000c 00050D64\[^\n]*\n"	{ set x [expr $x+1] }
2858	    -re "^ +\[0-9\]+ 0010 00050E64\[^\n]*\n"	{ set x [expr $x+1] }
2859	    -re "^ +\[0-9\]+ 0014 00041860\[^\n]*\n"	{ set x [expr $x+1] }
2860	    -re "^ +\[0-9\]+ 0018 00A010A4\[^\n]*\n"	{ set x [expr $x+1] }
2861	    -re "^ +\[0-9\]+ 001c 00041820\[^\n]*\n"	{ set x [expr $x+1] }
2862	    -re "^ +\[0-9\]+ 0020 01441840\[^\n]*\n"	{ set x [expr $x+1] }
2863	    -re "^ +\[0-9\]+ 0024 000004A4\[^\n]*\n"	{ set x [expr $x+1] }
2864	    -re "^ +\[0-9\]+ 0028 014008A4\[^\n]*\n"	{ set x [expr $x+1] }
2865	    -re "^ +\[0-9\]+ 002c 00000400\[^\n]*\n"	{ set x [expr $x+1] }
2866	    -re "^ +\[0-9\]+ 0030 00100400\[^\n]*\n"	{ set x [expr $x+1] }
2867	    -re "^ +\[0-9\]+ 0034 140004D2\[^\n]*\n"	{ set x [expr $x+1] }
2868	    -re "^ +\[0-9\]+ 0038 04A61187\[^\n]*\n"	{ set x [expr $x+1] }
2869	    -re "^ +\[0-9\]+ 003c 04A13187\[^\n]*\n"	{ set x [expr $x+1] }
2870	    -re "^ +\[0-9\]+ 0040 04A611C7\[^\n]*\n"	{ set x [expr $x+1] }
2871	    -re "^ +\[0-9\]+ 0044 04A131C7\[^\n]*\n"	{ set x [expr $x+1] }
2872	    -re "^ +\[0-9\]+ 0048 04A41346\[^\n]*\n"	{ set x [expr $x+1] }
2873	    -re "^ +\[0-9\]+ 004c 04A41366\[^\n]*\n"	{ set x [expr $x+1] }
2874	    -re "^ +\[0-9\]+ 0050 04A41306\[^\n]*\n"	{ set x [expr $x+1] }
2875	    -re "^ +\[0-9\]+ 0054 04A41040\[^\n]*\n"	{ set x [expr $x+1] }
2876	    -re "^ +\[0-9\]+ 0058 04A42040\[^\n]*\n"	{ set x [expr $x+1] }
2877	    -re "^ +\[0-9\]+ 005c 04A41000\[^\n]*\n"	{ set x [expr $x+1] }
2878	    -re "^ +\[0-9\]+ 0060 04A42000\[^\n]*\n"	{ set x [expr $x+1] }
2879	    -re "\[^\n\]*\n"				{ }
2880	    timeout				{ perror "timeout\n"; break }
2881	    eof					{ break }
2882	}
2883    }
2884
2885    # This was intended to do any cleanup necessary.  It kinda looks like it
2886    # isn't needed, but just in case, please keep it in for now.
2887    gas_finish
2888
2889    # Did we find what we were looking for?  If not, flunk it.
2890    if [expr $x==25] then { pass $testname } else { fail $testname }
2891}
2892
2893proc do_system2 {} {
2894    set testname "system2.s: system2 tests"
2895    set x 0
2896
2897    gas_start "system2.s" "-al"
2898
2899    # Check the assembled instruction against a table built by the HP assembler
2900    # Any differences should be checked by hand -- with the number of problems
2901    # I've seen in the HP assembler I don't completely trust it.
2902    #
2903    # Instead of having a variable for each match string just increment the
2904    # total number of matches seen.  That's simpler when testing large numbers
2905    # of instructions (as these tests to).
2906    while 1 {
2907	expect {
2908	    -re "^ +\[0-9\]+ 0000 00000C00\[^\n]*\n"	{ set x [expr $x+1] }
2909	    -re "^ +\[0-9\]+ 0004 00000CA0\[^\n]*\n"	{ set x [expr $x+1] }
2910	    -re "^ +\[0-9\]+ 0008 039B0D64\[^\n]*\n"	{ set x [expr $x+1] }
2911	    -re "^ +\[0-9\]+ 000c 039B0E64\[^\n]*\n"	{ set x [expr $x+1] }
2912	    -re "^ +\[0-9\]+ 0010 016048A4\[^\n]*\n"	{ set x [expr $x+1] }
2913	    -re "^ +\[0-9\]+ 0014 04A61187\[^\n]*\n"	{ set x [expr $x+1] }
2914	    -re "^ +\[0-9\]+ 0018 04A13187\[^\n]*\n"	{ set x [expr $x+1] }
2915	    -re "^ +\[0-9\]+ 001c 04A611C7\[^\n]*\n"	{ set x [expr $x+1] }
2916	    -re "^ +\[0-9\]+ 0020 04A131C7\[^\n]*\n"	{ set x [expr $x+1] }
2917	    -re "\[^\n\]*\n"				{ }
2918	    timeout				{ perror "timeout\n"; break }
2919	    eof					{ break }
2920	}
2921    }
2922
2923    # This was intended to do any cleanup necessary.  It kinda looks like it
2924    # isn't needed, but just in case, please keep it in for now.
2925    gas_finish
2926
2927    # Did we find what we were looking for?  If not, flunk it.
2928    if [expr $x==9] then { pass $testname } else { fail $testname }
2929}
2930
2931proc do_purge {} {
2932    set testname "purge.s: purge tests"
2933    set x 0
2934
2935    gas_start "purge.s" "-al"
2936
2937    # Check the assembled instruction against a table built by the HP assembler
2938    # Any differences should be checked by hand -- with the number of problems
2939    # I've seen in the HP assembler I don't completely trust it.
2940    #
2941    # Instead of having a variable for each match string just increment the
2942    # total number of matches seen.  That's simpler when testing large numbers
2943    # of instructions (as these tests to).
2944    while 1 {
2945	expect {
2946	    -re "^ +\[0-9\]+ 0000 04A41200\[^\n]*\n"	{ set x [expr $x+1] }
2947	    -re "^ +\[0-9\]+ 0004 04A41220\[^\n]*\n"	{ set x [expr $x+1] }
2948	    -re "^ +\[0-9\]+ 0008 04A42200\[^\n]*\n"	{ set x [expr $x+1] }
2949	    -re "^ +\[0-9\]+ 000c 04A42220\[^\n]*\n"	{ set x [expr $x+1] }
2950	    -re "^ +\[0-9\]+ 0010 04A41240\[^\n]*\n"	{ set x [expr $x+1] }
2951	    -re "^ +\[0-9\]+ 0014 04A41260\[^\n]*\n"	{ set x [expr $x+1] }
2952	    -re "^ +\[0-9\]+ 0018 04A42240\[^\n]*\n"	{ set x [expr $x+1] }
2953	    -re "^ +\[0-9\]+ 001c 04A42260\[^\n]*\n"	{ set x [expr $x+1] }
2954	    -re "^ +\[0-9\]+ 0020 04A41380\[^\n]*\n"	{ set x [expr $x+1] }
2955	    -re "^ +\[0-9\]+ 0024 04A413A0\[^\n]*\n"	{ set x [expr $x+1] }
2956	    -re "^ +\[0-9\]+ 0028 04A41280\[^\n]*\n"	{ set x [expr $x+1] }
2957	    -re "^ +\[0-9\]+ 002c 04A412A0\[^\n]*\n"	{ set x [expr $x+1] }
2958	    -re "^ +\[0-9\]+ 0030 04A42280\[^\n]*\n"	{ set x [expr $x+1] }
2959	    -re "^ +\[0-9\]+ 0034 04A422A0\[^\n]*\n"	{ set x [expr $x+1] }
2960	    -re "^ +\[0-9\]+ 0038 04A412C0\[^\n]*\n"	{ set x [expr $x+1] }
2961	    -re "^ +\[0-9\]+ 003c 04A412E0\[^\n]*\n"	{ set x [expr $x+1] }
2962	    -re "^ +\[0-9\]+ 0040 04A422C0\[^\n]*\n"	{ set x [expr $x+1] }
2963	    -re "^ +\[0-9\]+ 0044 04A422E0\[^\n]*\n"	{ set x [expr $x+1] }
2964
2965	    -re "\[^\n\]*\n"				{ }
2966	    timeout				{ perror "timeout\n"; break }
2967	    eof					{ break }
2968	}
2969    }
2970
2971    # This was intended to do any cleanup necessary.  It kinda looks like it
2972    # isn't needed, but just in case, please keep it in for now.
2973    gas_finish
2974
2975    # Did we find what we were looking for?  If not, flunk it.
2976    if [expr $x==18] then { pass $testname } else { fail $testname }
2977}
2978
2979proc do_purge2 {} {
2980    set testname "purge2.s: purge2 tests"
2981    set x 0
2982
2983    gas_start "purge2.s" "-al"
2984
2985    # Check the assembled instruction against a table built by the HP assembler
2986    # Any differences should be checked by hand -- with the number of problems
2987    # I've seen in the HP assembler I don't completely trust it.
2988    #
2989    # Instead of having a variable for each match string just increment the
2990    # total number of matches seen.  That's simpler when testing large numbers
2991    # of instructions (as these tests to).
2992    while 1 {
2993	expect {
2994	    -re "^ +\[0-9\]+ 0000 04A41600\[^\n]*\n"	{ set x [expr $x+1] }
2995	    -re "^ +\[0-9\]+ 0004 04A41620\[^\n]*\n"	{ set x [expr $x+1] }
2996	    -re "^ +\[0-9\]+ 0008 04A42600\[^\n]*\n"	{ set x [expr $x+1] }
2997	    -re "^ +\[0-9\]+ 000c 04A42620\[^\n]*\n"	{ set x [expr $x+1] }
2998
2999	    -re "\[^\n\]*\n"				{ }
3000	    timeout				{ perror "timeout\n"; break }
3001	    eof					{ break }
3002	}
3003    }
3004
3005    # This was intended to do any cleanup necessary.  It kinda looks like it
3006    # isn't needed, but just in case, please keep it in for now.
3007    gas_finish
3008
3009    # Did we find what we were looking for?  If not, flunk it.
3010    if [expr $x==4] then { pass $testname } else { fail $testname }
3011}
3012
3013proc do_fp_misc {} {
3014    set testname "fp_misc.s: fp_misc tests"
3015    set x 0
3016
3017    gas_start "fp_misc.s" "-al"
3018
3019    # Check the assembled instruction against a table built by the HP assembler
3020    # Any differences should be checked by hand -- with the number of problems
3021    # I've seen in the HP assembler I don't completely trust it.
3022    #
3023    # Instead of having a variable for each match string just increment the
3024    # total number of matches seen.  That's simpler when testing large numbers
3025    # of instructions (as these tests to).
3026    while 1 {
3027	expect {
3028	    -re "^ +\[0-9\]+ 0000 30002420\[^\n\]*\n"	{ set x [expr $x+1] }
3029	    -re "\[^\n\]*\n"				{ }
3030	    timeout				{ perror "timeout\n"; break }
3031	    eof					{ break }
3032	}
3033    }
3034
3035    # This was intended to do any cleanup necessary.  It kinda looks like it
3036    # isn't needed, but just in case, please keep it in for now.
3037    gas_finish
3038
3039    # Did we find what we were looking for?  If not, flunk it.
3040    if [expr $x==1] then { pass $testname } else { fail $testname }
3041}
3042
3043proc do_fmem {} {
3044    set testname "fmem.s: fmem tests"
3045    set x 0
3046
3047    gas_start "fmem.s" "-al"
3048
3049    # Check the assembled instruction against a table built by the HP assembler
3050    # Any differences should be checked by hand -- with the number of problems
3051    # I've seen in the HP assembler I don't completely trust it.
3052    #
3053    # Instead of having a variable for each match string just increment the
3054    # total number of matches seen.  That's simpler when testing large numbers
3055    # of instructions (as these tests to).
3056    while 1 {
3057	expect {
3058	    -re "^ +\[0-9\]+ 0000 24A40006\[^\n\]*\n"	{ set x [expr $x+1] }
3059	    -re "^ +\[0-9\]+ 0004 24A42006\[^\n\]*\n"	{ set x [expr $x+1] }
3060	    -re "^ +\[0-9\]+ 0008 24A40026\[^\n\]*\n"	{ set x [expr $x+1] }
3061	    -re "^ +\[0-9\]+ 000c 24A42026\[^\n\]*\n"	{ set x [expr $x+1] }
3062	    -re "^ +\[0-9\]+ 0010 2CA40006\[^\n\]*\n"	{ set x [expr $x+1] }
3063	    -re "^ +\[0-9\]+ 0014 2CA42006\[^\n\]*\n"	{ set x [expr $x+1] }
3064	    -re "^ +\[0-9\]+ 0018 2CA40026\[^\n\]*\n"	{ set x [expr $x+1] }
3065	    -re "^ +\[0-9\]+ 001c 2CA42026\[^\n\]*\n"	{ set x [expr $x+1] }
3066	    -re "^ +\[0-9\]+ 0020 24A40206\[^\n\]*\n"	{ set x [expr $x+1] }
3067	    -re "^ +\[0-9\]+ 0024 24A42206\[^\n\]*\n"	{ set x [expr $x+1] }
3068	    -re "^ +\[0-9\]+ 0028 24A40226\[^\n\]*\n"	{ set x [expr $x+1] }
3069	    -re "^ +\[0-9\]+ 002c 24A42226\[^\n\]*\n"	{ set x [expr $x+1] }
3070	    -re "^ +\[0-9\]+ 0030 2CA40206\[^\n\]*\n"	{ set x [expr $x+1] }
3071	    -re "^ +\[0-9\]+ 0034 2CA42206\[^\n\]*\n"	{ set x [expr $x+1] }
3072	    -re "^ +\[0-9\]+ 0038 2CA40226\[^\n\]*\n"	{ set x [expr $x+1] }
3073	    -re "^ +\[0-9\]+ 003c 2CA42226\[^\n\]*\n"	{ set x [expr $x+1] }
3074	    -re "^ +\[0-9\]+ 0040 3CA40206\[^\n\]*\n"	{ set x [expr $x+1] }
3075	    -re "^ +\[0-9\]+ 0044 3CA42206\[^\n\]*\n"	{ set x [expr $x+1] }
3076	    -re "^ +\[0-9\]+ 0048 3CA40226\[^\n\]*\n"	{ set x [expr $x+1] }
3077	    -re "^ +\[0-9\]+ 004c 3CA42226\[^\n\]*\n"	{ set x [expr $x+1] }
3078	    -re "^ +\[0-9\]+ 0050 24A01006\[^\n\]*\n"	{ set x [expr $x+1] }
3079	    -re "^ +\[0-9\]+ 0054 24A03026\[^\n\]*\n"	{ set x [expr $x+1] }
3080	    -re "^ +\[0-9\]+ 0058 24A01026\[^\n\]*\n"	{ set x [expr $x+1] }
3081	    -re "^ +\[0-9\]+ 005c 2CA01006\[^\n\]*\n"	{ set x [expr $x+1] }
3082	    -re "^ +\[0-9\]+ 0060 2CA03026\[^\n\]*\n"	{ set x [expr $x+1] }
3083	    -re "^ +\[0-9\]+ 0064 2CA01026\[^\n\]*\n"	{ set x [expr $x+1] }
3084	    -re "^ +\[0-9\]+ 0068 24A01206\[^\n\]*\n"	{ set x [expr $x+1] }
3085	    -re "^ +\[0-9\]+ 006c 24A03226\[^\n\]*\n"	{ set x [expr $x+1] }
3086	    -re "^ +\[0-9\]+ 0070 24A01226\[^\n\]*\n"	{ set x [expr $x+1] }
3087	    -re "^ +\[0-9\]+ 0074 2CA01206\[^\n\]*\n"	{ set x [expr $x+1] }
3088	    -re "^ +\[0-9\]+ 0078 2CA03226\[^\n\]*\n"	{ set x [expr $x+1] }
3089	    -re "^ +\[0-9\]+ 007c 2CA01226\[^\n\]*\n"	{ set x [expr $x+1] }
3090	    -re "^ +\[0-9\]+ 0080 3CA01206\[^\n\]*\n"	{ set x [expr $x+1] }
3091	    -re "^ +\[0-9\]+ 0084 3CA03226\[^\n\]*\n"	{ set x [expr $x+1] }
3092	    -re "^ +\[0-9\]+ 0088 3CA01226\[^\n\]*\n"	{ set x [expr $x+1] }
3093	    -re "\[^\n\]*\n"				{ }
3094	    timeout				{ perror "timeout\n"; break }
3095	    eof					{ break }
3096	}
3097    }
3098
3099    # This was intended to do any cleanup necessary.  It kinda looks like it
3100    # isn't needed, but just in case, please keep it in for now.
3101    gas_finish
3102
3103    # Did we find what we were looking for?  If not, flunk it.
3104    if [expr $x==35] then { pass $testname } else { fail $testname }
3105}
3106
3107proc do_fp_comp {} {
3108    set testname "fp_comp.s: fp_comp tests"
3109    set x 0
3110
3111    gas_start "fp_comp.s" "-al"
3112
3113    # Check the assembled instruction against a table built by the HP assembler
3114    # Any differences should be checked by hand -- with the number of problems
3115    # I've seen in the HP assembler I don't completely trust it.
3116    #
3117    # Instead of having a variable for each match string just increment the
3118    # total number of matches seen.  That's simpler when testing large numbers
3119    # of instructions (as these tests to).
3120    while 1 {
3121	expect {
3122	    -re "^ +\[0-9\]+ 0000 30A0400A\[^\n\]*\n"	{ set x [expr $x+1] }
3123	    -re "^ +\[0-9\]+ 0004 30A0480A\[^\n\]*\n"	{ set x [expr $x+1] }
3124	    -re "^ +\[0-9\]+ 0008 30A0580A\[^\n\]*\n"	{ set x [expr $x+1] }
3125	    -re "^ +\[0-9\]+ 000c 32804018\[^\n\]*\n"	{ set x [expr $x+1] }
3126	    -re "^ +\[0-9\]+ 0010 32804818\[^\n\]*\n"	{ set x [expr $x+1] }
3127	    -re "^ +\[0-9\]+ 0014 30A0600A\[^\n\]*\n"	{ set x [expr $x+1] }
3128	    -re "^ +\[0-9\]+ 0018 30A0680A\[^\n\]*\n"	{ set x [expr $x+1] }
3129	    -re "^ +\[0-9\]+ 001c 30A0780A\[^\n\]*\n"	{ set x [expr $x+1] }
3130	    -re "^ +\[0-9\]+ 0020 32806018\[^\n\]*\n"	{ set x [expr $x+1] }
3131	    -re "^ +\[0-9\]+ 0024 32806818\[^\n\]*\n"	{ set x [expr $x+1] }
3132	    -re "^ +\[0-9\]+ 0028 30A0800A\[^\n\]*\n"	{ set x [expr $x+1] }
3133	    -re "^ +\[0-9\]+ 002c 30A0880A\[^\n\]*\n"	{ set x [expr $x+1] }
3134	    -re "^ +\[0-9\]+ 0030 30A0980A\[^\n\]*\n"	{ set x [expr $x+1] }
3135	    -re "^ +\[0-9\]+ 0034 32808018\[^\n\]*\n"	{ set x [expr $x+1] }
3136	    -re "^ +\[0-9\]+ 0038 32808818\[^\n\]*\n"	{ set x [expr $x+1] }
3137	    -re "^ +\[0-9\]+ 003c 30A0A00A\[^\n\]*\n"	{ set x [expr $x+1] }
3138	    -re "^ +\[0-9\]+ 0040 30A0A80A\[^\n\]*\n"	{ set x [expr $x+1] }
3139	    -re "^ +\[0-9\]+ 0044 30A0B80A\[^\n\]*\n"	{ set x [expr $x+1] }
3140	    -re "^ +\[0-9\]+ 0048 3280A018\[^\n\]*\n"	{ set x [expr $x+1] }
3141	    -re "^ +\[0-9\]+ 004c 3280A818\[^\n\]*\n"	{ set x [expr $x+1] }
3142	    -re "^ +\[0-9\]+ 0050 3088060C\[^\n\]*\n"	{ set x [expr $x+1] }
3143	    -re "^ +\[0-9\]+ 0054 30880E0C\[^\n\]*\n"	{ set x [expr $x+1] }
3144	    -re "^ +\[0-9\]+ 0058 30881E0C\[^\n\]*\n"	{ set x [expr $x+1] }
3145	    -re "^ +\[0-9\]+ 005c 3298061C\[^\n\]*\n"	{ set x [expr $x+1] }
3146	    -re "^ +\[0-9\]+ 0060 32980E1C\[^\n\]*\n"	{ set x [expr $x+1] }
3147	    -re "^ +\[0-9\]+ 0064 32981E1C\[^\n\]*\n"	{ set x [expr $x+1] }
3148	    -re "^ +\[0-9\]+ 0068 3088260C\[^\n\]*\n"	{ set x [expr $x+1] }
3149	    -re "^ +\[0-9\]+ 006c 30882E0C\[^\n\]*\n"	{ set x [expr $x+1] }
3150	    -re "^ +\[0-9\]+ 0070 30883E0C\[^\n\]*\n"	{ set x [expr $x+1] }
3151	    -re "^ +\[0-9\]+ 0074 3298261C\[^\n\]*\n"	{ set x [expr $x+1] }
3152	    -re "^ +\[0-9\]+ 0078 32982E1C\[^\n\]*\n"	{ set x [expr $x+1] }
3153	    -re "^ +\[0-9\]+ 007c 32983E1C\[^\n\]*\n"	{ set x [expr $x+1] }
3154	    -re "^ +\[0-9\]+ 0080 3088460C\[^\n\]*\n"	{ set x [expr $x+1] }
3155	    -re "^ +\[0-9\]+ 0084 30884E0C\[^\n\]*\n"	{ set x [expr $x+1] }
3156	    -re "^ +\[0-9\]+ 0088 30885E0C\[^\n\]*\n"	{ set x [expr $x+1] }
3157	    -re "^ +\[0-9\]+ 008c 3298461C\[^\n\]*\n"	{ set x [expr $x+1] }
3158	    -re "^ +\[0-9\]+ 0090 32984E1C\[^\n\]*\n"	{ set x [expr $x+1] }
3159	    -re "^ +\[0-9\]+ 0094 32985E1C\[^\n\]*\n"	{ set x [expr $x+1] }
3160	    -re "^ +\[0-9\]+ 0098 3088660C\[^\n\]*\n"	{ set x [expr $x+1] }
3161	    -re "^ +\[0-9\]+ 009c 30886E0C\[^\n\]*\n"	{ set x [expr $x+1] }
3162	    -re "^ +\[0-9\]+ 00a0 30887E0C\[^\n\]*\n"	{ set x [expr $x+1] }
3163	    -re "^ +\[0-9\]+ 00a4 3298661C\[^\n\]*\n"	{ set x [expr $x+1] }
3164	    -re "^ +\[0-9\]+ 00a8 32986E1C\[^\n\]*\n"	{ set x [expr $x+1] }
3165	    -re "^ +\[0-9\]+ 00ac 32987E1C\[^\n\]*\n"	{ set x [expr $x+1] }
3166	    -re "^ +\[0-9\]+ 00b0 3088860C\[^\n\]*\n"	{ set x [expr $x+1] }
3167	    -re "^ +\[0-9\]+ 00b4 30888E0C\[^\n\]*\n"	{ set x [expr $x+1] }
3168	    -re "^ +\[0-9\]+ 00b8 30889E0C\[^\n\]*\n"	{ set x [expr $x+1] }
3169	    -re "^ +\[0-9\]+ 00bc 3298861C\[^\n\]*\n"	{ set x [expr $x+1] }
3170	    -re "^ +\[0-9\]+ 00c0 32988E1C\[^\n\]*\n"	{ set x [expr $x+1] }
3171	    -re "^ +\[0-9\]+ 00c4 32989E1C\[^\n\]*\n"	{ set x [expr $x+1] }
3172	    -re "^ +\[0-9\]+ 00c8 180120E2\[^\n\]*\n"	{ set x [expr $x+1] }
3173	    -re "^ +\[0-9\]+ 00cc 1A11A4D2\[^\n\]*\n"	{ set x [expr $x+1] }
3174	    -re "^ +\[0-9\]+ 00d0 980120E2\[^\n\]*\n"	{ set x [expr $x+1] }
3175	    -re "^ +\[0-9\]+ 00d4 9A11A4D2\[^\n\]*\n"	{ set x [expr $x+1] }
3176	    -re "^ +\[0-9\]+ 00d8 38854706\[^\n\]*\n"	{ set x [expr $x+1] }
3177	    -re "\[^\n\]*\n"				{ }
3178	    timeout				{ perror "timeout\n"; break }
3179	    eof					{ break }
3180	}
3181    }
3182
3183    # This was intended to do any cleanup necessary.  It kinda looks like it
3184    # isn't needed, but just in case, please keep it in for now.
3185    gas_finish
3186
3187    # Did we find what we were looking for?  If not, flunk it.
3188    if [expr $x==55] then { pass $testname } else { fail $testname }
3189}
3190
3191proc do_fp_comp2 {} {
3192    set testname "fp_comp2.s: fp_comp2 tests"
3193    set x 0
3194
3195    gas_start "fp_comp2.s" "-al"
3196
3197    # Check the assembled instruction against a table built by the HP assembler
3198    # Any differences should be checked by hand -- with the number of problems
3199    # I've seen in the HP assembler I don't completely trust it.
3200    #
3201    # Instead of having a variable for each match string just increment the
3202    # total number of matches seen.  That's simpler when testing large numbers
3203    # of instructions (as these tests to).
3204    while 1 {
3205	expect {
3206	    -re "^ +\[0-9\]+ 0000 B8AA638E\[^\n\]*\n"	{ set x [expr $x+1] }
3207	    -re "^ +\[0-9\]+ 0004 B8AA6A0E\[^\n\]*\n"	{ set x [expr $x+1] }
3208	    -re "^ +\[0-9\]+ 0008 BA5B2595\[^\n\]*\n"	{ set x [expr $x+1] }
3209	    -re "^ +\[0-9\]+ 000c BA5B2C15\[^\n\]*\n"	{ set x [expr $x+1] }
3210	    -re "^ +\[0-9\]+ 0010 B8AA63AE\[^\n\]*\n"	{ set x [expr $x+1] }
3211	    -re "^ +\[0-9\]+ 0014 B8AA6A2E\[^\n\]*\n"	{ set x [expr $x+1] }
3212	    -re "^ +\[0-9\]+ 0018 BA5B25B5\[^\n\]*\n"	{ set x [expr $x+1] }
3213	    -re "^ +\[0-9\]+ 001c BA5B2C35\[^\n\]*\n"	{ set x [expr $x+1] }
3214	    -re "^ +\[0-9\]+ 0020 38A0C04A\[^\n\]*\n"	{ set x [expr $x+1] }
3215	    -re "^ +\[0-9\]+ 0024 30A0C80A\[^\n\]*\n"	{ set x [expr $x+1] }
3216	    -re "^ +\[0-9\]+ 0028 30A0D80A\[^\n\]*\n"	{ set x [expr $x+1] }
3217	    -re "^ +\[0-9\]+ 002c 3A80C098\[^\n\]*\n"	{ set x [expr $x+1] }
3218	    -re "^ +\[0-9\]+ 0030 3280C818\[^\n\]*\n"	{ set x [expr $x+1] }
3219	    -re "^ +\[0-9\]+ 0034 38A0E04A\[^\n\]*\n"	{ set x [expr $x+1] }
3220	    -re "^ +\[0-9\]+ 0038 30A0E80A\[^\n\]*\n"	{ set x [expr $x+1] }
3221	    -re "^ +\[0-9\]+ 003c 30A0F80A\[^\n\]*\n"	{ set x [expr $x+1] }
3222	    -re "^ +\[0-9\]+ 0040 3A80E098\[^\n\]*\n"	{ set x [expr $x+1] }
3223	    -re "^ +\[0-9\]+ 0044 3280E818\[^\n\]*\n"	{ set x [expr $x+1] }
3224	    -re "\[^\n\]*\n"				{ }
3225	    timeout				{ perror "timeout\n"; break }
3226	    eof					{ break }
3227	}
3228    }
3229
3230    # This was intended to do any cleanup necessary.  It kinda looks like it
3231    # isn't needed, but just in case, please keep it in for now.
3232    gas_finish
3233
3234    # Did we find what we were looking for?  If not, flunk it.
3235    if [expr $x==18] then { pass $testname } else { fail $testname }
3236}
3237
3238proc do_fp_conv {} {
3239    set testname "fp_conv.s: fp_conv tests"
3240    set x 0
3241
3242    gas_start "fp_conv.s" "-al"
3243
3244    # Check the assembled instruction against a table built by the HP assembler
3245    # Any differences should be checked by hand -- with the number of problems
3246    # I've seen in the HP assembler I don't completely trust it.
3247    #
3248    # Instead of having a variable for each match string just increment the
3249    # total number of matches seen.  That's simpler when testing large numbers
3250    # of instructions (as these tests to).
3251    while 1 {
3252	expect {
3253	    -re "^ +\[0-9\]+ 0000 30A0020A\[^\n\]*\n"	{ set x [expr $x+1] }
3254	    -re "^ +\[0-9\]+ 0004 30A0220A\[^\n\]*\n"	{ set x [expr $x+1] }
3255	    -re "^ +\[0-9\]+ 0008 30A0620A\[^\n\]*\n"	{ set x [expr $x+1] }
3256	    -re "^ +\[0-9\]+ 000c 30A00A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3257	    -re "^ +\[0-9\]+ 0010 30A02A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3258	    -re "^ +\[0-9\]+ 0014 30A06A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3259	    -re "^ +\[0-9\]+ 0018 30A01A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3260	    -re "^ +\[0-9\]+ 001c 30A03A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3261	    -re "^ +\[0-9\]+ 0020 30A07A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3262	    -re "^ +\[0-9\]+ 0024 32800218\[^\n\]*\n"	{ set x [expr $x+1] }
3263	    -re "^ +\[0-9\]+ 0028 32802218\[^\n\]*\n"	{ set x [expr $x+1] }
3264	    -re "^ +\[0-9\]+ 002c 32806218\[^\n\]*\n"	{ set x [expr $x+1] }
3265	    -re "^ +\[0-9\]+ 0030 32800A18\[^\n\]*\n"	{ set x [expr $x+1] }
3266	    -re "^ +\[0-9\]+ 0034 32802A18\[^\n\]*\n"	{ set x [expr $x+1] }
3267	    -re "^ +\[0-9\]+ 0038 32806A18\[^\n\]*\n"	{ set x [expr $x+1] }
3268	    -re "^ +\[0-9\]+ 003c 32801A18\[^\n\]*\n"	{ set x [expr $x+1] }
3269	    -re "^ +\[0-9\]+ 0040 32803A18\[^\n\]*\n"	{ set x [expr $x+1] }
3270	    -re "^ +\[0-9\]+ 0044 32807A18\[^\n\]*\n"	{ set x [expr $x+1] }
3271	    -re "^ +\[0-9\]+ 0048 30A0820A\[^\n\]*\n"	{ set x [expr $x+1] }
3272	    -re "^ +\[0-9\]+ 004c 30A0A20A\[^\n\]*\n"	{ set x [expr $x+1] }
3273	    -re "^ +\[0-9\]+ 0050 30A0E20A\[^\n\]*\n"	{ set x [expr $x+1] }
3274	    -re "^ +\[0-9\]+ 0054 30A08A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3275	    -re "^ +\[0-9\]+ 0058 30A0AA0A\[^\n\]*\n"	{ set x [expr $x+1] }
3276	    -re "^ +\[0-9\]+ 005c 30A0EA0A\[^\n\]*\n"	{ set x [expr $x+1] }
3277	    -re "^ +\[0-9\]+ 0060 30A09A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3278	    -re "^ +\[0-9\]+ 0064 30A0BA0A\[^\n\]*\n"	{ set x [expr $x+1] }
3279	    -re "^ +\[0-9\]+ 0068 30A0FA0A\[^\n\]*\n"	{ set x [expr $x+1] }
3280	    -re "^ +\[0-9\]+ 006c 32808218\[^\n\]*\n"	{ set x [expr $x+1] }
3281	    -re "^ +\[0-9\]+ 0070 3280A218\[^\n\]*\n"	{ set x [expr $x+1] }
3282	    -re "^ +\[0-9\]+ 0074 3280E218\[^\n\]*\n"	{ set x [expr $x+1] }
3283	    -re "^ +\[0-9\]+ 0078 32808A18\[^\n\]*\n"	{ set x [expr $x+1] }
3284	    -re "^ +\[0-9\]+ 007c 3280AA18\[^\n\]*\n"	{ set x [expr $x+1] }
3285	    -re "^ +\[0-9\]+ 0080 3280EA18\[^\n\]*\n"	{ set x [expr $x+1] }
3286	    -re "^ +\[0-9\]+ 0084 32809A18\[^\n\]*\n"	{ set x [expr $x+1] }
3287	    -re "^ +\[0-9\]+ 0088 3280BA18\[^\n\]*\n"	{ set x [expr $x+1] }
3288	    -re "^ +\[0-9\]+ 008c 3280FA18\[^\n\]*\n"	{ set x [expr $x+1] }
3289	    -re "^ +\[0-9\]+ 0090 30A1020A\[^\n\]*\n"	{ set x [expr $x+1] }
3290	    -re "^ +\[0-9\]+ 0094 30A1220A\[^\n\]*\n"	{ set x [expr $x+1] }
3291	    -re "^ +\[0-9\]+ 0098 30A1620A\[^\n\]*\n"	{ set x [expr $x+1] }
3292	    -re "^ +\[0-9\]+ 009c 30A10A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3293	    -re "^ +\[0-9\]+ 00a0 30A12A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3294	    -re "^ +\[0-9\]+ 00a4 30A16A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3295	    -re "^ +\[0-9\]+ 00a8 30A11A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3296	    -re "^ +\[0-9\]+ 00ac 30A13A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3297	    -re "^ +\[0-9\]+ 00b0 30A17A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3298	    -re "^ +\[0-9\]+ 00b4 32810218\[^\n\]*\n"	{ set x [expr $x+1] }
3299	    -re "^ +\[0-9\]+ 00b8 32812218\[^\n\]*\n"	{ set x [expr $x+1] }
3300	    -re "^ +\[0-9\]+ 00bc 32816218\[^\n\]*\n"	{ set x [expr $x+1] }
3301	    -re "^ +\[0-9\]+ 00c0 32810A18\[^\n\]*\n"	{ set x [expr $x+1] }
3302	    -re "^ +\[0-9\]+ 00c4 32812A18\[^\n\]*\n"	{ set x [expr $x+1] }
3303	    -re "^ +\[0-9\]+ 00c8 32816A18\[^\n\]*\n"	{ set x [expr $x+1] }
3304	    -re "^ +\[0-9\]+ 00cc 32811A18\[^\n\]*\n"	{ set x [expr $x+1] }
3305	    -re "^ +\[0-9\]+ 00d0 32813A18\[^\n\]*\n"	{ set x [expr $x+1] }
3306	    -re "^ +\[0-9\]+ 00d4 32817A18\[^\n\]*\n"	{ set x [expr $x+1] }
3307	    -re "^ +\[0-9\]+ 00d8 30A1820A\[^\n\]*\n"	{ set x [expr $x+1] }
3308	    -re "^ +\[0-9\]+ 00dc 30A1A20A\[^\n\]*\n"	{ set x [expr $x+1] }
3309	    -re "^ +\[0-9\]+ 00e0 30A1E20A\[^\n\]*\n"	{ set x [expr $x+1] }
3310	    -re "^ +\[0-9\]+ 00e4 30A18A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3311	    -re "^ +\[0-9\]+ 00e8 30A1AA0A\[^\n\]*\n"	{ set x [expr $x+1] }
3312	    -re "^ +\[0-9\]+ 00ec 30A1EA0A\[^\n\]*\n"	{ set x [expr $x+1] }
3313	    -re "^ +\[0-9\]+ 00f0 30A19A0A\[^\n\]*\n"	{ set x [expr $x+1] }
3314	    -re "^ +\[0-9\]+ 00f4 30A1BA0A\[^\n\]*\n"	{ set x [expr $x+1] }
3315	    -re "^ +\[0-9\]+ 00f8 30A1FA0A\[^\n\]*\n"	{ set x [expr $x+1] }
3316	    -re "^ +\[0-9\]+ 00fc 32818218\[^\n\]*\n"	{ set x [expr $x+1] }
3317	    -re "^ +\[0-9\]+ 0100 3281A218\[^\n\]*\n"	{ set x [expr $x+1] }
3318	    -re "^ +\[0-9\]+ 0104 3281E218\[^\n\]*\n"	{ set x [expr $x+1] }
3319	    -re "^ +\[0-9\]+ 0108 32818A18\[^\n\]*\n"	{ set x [expr $x+1] }
3320	    -re "^ +\[0-9\]+ 010c 3281AA18\[^\n\]*\n"	{ set x [expr $x+1] }
3321	    -re "^ +\[0-9\]+ 0110 3281EA18\[^\n\]*\n"	{ set x [expr $x+1] }
3322	    -re "^ +\[0-9\]+ 0114 32819A18\[^\n\]*\n"	{ set x [expr $x+1] }
3323	    -re "^ +\[0-9\]+ 0118 3281BA18\[^\n\]*\n"	{ set x [expr $x+1] }
3324	    -re "^ +\[0-9\]+ 011c 3281FA18\[^\n\]*\n"	{ set x [expr $x+1] }
3325	    -re "\[^\n\]*\n"				{ }
3326	    timeout				{ perror "timeout\n"; break }
3327	    eof					{ break }
3328	}
3329    }
3330
3331    # This was intended to do any cleanup necessary.  It kinda looks like it
3332    # isn't needed, but just in case, please keep it in for now.
3333    gas_finish
3334
3335    # Did we find what we were looking for?  If not, flunk it.
3336    if [expr $x==72] then { pass $testname } else { fail $testname }
3337}
3338
3339proc do_fp_fcmp {} {
3340    set testname "fp_fcmp.s: fp_fcmp tests"
3341    set x 0
3342
3343    gas_start "fp_fcmp.s" "-al"
3344
3345    # Check the assembled instruction against a table built by the HP assembler
3346    # Any differences should be checked by hand -- with the number of problems
3347    # I've seen in the HP assembler I don't completely trust it.
3348    #
3349    # Instead of having a variable for each match string just increment the
3350    # total number of matches seen.  That's simpler when testing large numbers
3351    # of instructions (as these tests to).
3352    while 1 {
3353	expect {
3354	    -re "^ +\[0-9\]+ 0000 30850400\[^\n\]*\n"	{set x [expr $x+1] }
3355	    -re "^ +\[0-9\]+ 0004 30850401\[^\n\]*\n"	{set x [expr $x+1] }
3356	    -re "^ +\[0-9\]+ 0008 30850402\[^\n\]*\n"	{set x [expr $x+1] }
3357	    -re "^ +\[0-9\]+ 000c 30850403\[^\n\]*\n"	{set x [expr $x+1] }
3358	    -re "^ +\[0-9\]+ 0010 30850404\[^\n\]*\n"	{set x [expr $x+1] }
3359	    -re "^ +\[0-9\]+ 0014 30850405\[^\n\]*\n"	{set x [expr $x+1] }
3360	    -re "^ +\[0-9\]+ 0018 30850406\[^\n\]*\n"	{set x [expr $x+1] }
3361	    -re "^ +\[0-9\]+ 001c 30850407\[^\n\]*\n"	{set x [expr $x+1] }
3362	    -re "^ +\[0-9\]+ 0020 30850408\[^\n\]*\n"	{set x [expr $x+1] }
3363	    -re "^ +\[0-9\]+ 0024 30850409\[^\n\]*\n"	{set x [expr $x+1] }
3364	    -re "^ +\[0-9\]+ 0028 3085040A\[^\n\]*\n"	{set x [expr $x+1] }
3365	    -re "^ +\[0-9\]+ 002c 3085040B\[^\n\]*\n"	{set x [expr $x+1] }
3366	    -re "^ +\[0-9\]+ 0030 3085040C\[^\n\]*\n"	{set x [expr $x+1] }
3367	    -re "^ +\[0-9\]+ 0034 3085040D\[^\n\]*\n"	{set x [expr $x+1] }
3368	    -re "^ +\[0-9\]+ 0038 3085040E\[^\n\]*\n"	{set x [expr $x+1] }
3369	    -re "^ +\[0-9\]+ 003c 3085040F\[^\n\]*\n"	{set x [expr $x+1] }
3370	    -re "^ +\[0-9\]+ 0040 30850410\[^\n\]*\n"	{set x [expr $x+1] }
3371	    -re "^ +\[0-9\]+ 0044 30850411\[^\n\]*\n"	{set x [expr $x+1] }
3372	    -re "^ +\[0-9\]+ 0048 30850412\[^\n\]*\n"	{set x [expr $x+1] }
3373	    -re "^ +\[0-9\]+ 004c 30850413\[^\n\]*\n"	{set x [expr $x+1] }
3374	    -re "^ +\[0-9\]+ 0050 30850414\[^\n\]*\n"	{set x [expr $x+1] }
3375	    -re "^ +\[0-9\]+ 0054 30850415\[^\n\]*\n"	{set x [expr $x+1] }
3376	    -re "^ +\[0-9\]+ 0058 30850416\[^\n\]*\n"	{set x [expr $x+1] }
3377	    -re "^ +\[0-9\]+ 005c 30850417\[^\n\]*\n"	{set x [expr $x+1] }
3378	    -re "^ +\[0-9\]+ 0060 30850418\[^\n\]*\n"	{set x [expr $x+1] }
3379	    -re "^ +\[0-9\]+ 0064 30850419\[^\n\]*\n"	{set x [expr $x+1] }
3380	    -re "^ +\[0-9\]+ 0068 3085041A\[^\n\]*\n"	{set x [expr $x+1] }
3381	    -re "^ +\[0-9\]+ 006c 3085041B\[^\n\]*\n"	{set x [expr $x+1] }
3382	    -re "^ +\[0-9\]+ 0070 3085041C\[^\n\]*\n"	{set x [expr $x+1] }
3383	    -re "^ +\[0-9\]+ 0074 3085041D\[^\n\]*\n"	{set x [expr $x+1] }
3384	    -re "^ +\[0-9\]+ 0078 3085041E\[^\n\]*\n"	{set x [expr $x+1] }
3385	    -re "^ +\[0-9\]+ 007c 3085041F\[^\n\]*\n"	{set x [expr $x+1] }
3386	    -re "^ +\[0-9\]+ 0080 30850C00\[^\n\]*\n"	{set x [expr $x+1] }
3387	    -re "^ +\[0-9\]+ 0084 30850C01\[^\n\]*\n"	{set x [expr $x+1] }
3388	    -re "^ +\[0-9\]+ 0088 30850C02\[^\n\]*\n"	{set x [expr $x+1] }
3389	    -re "^ +\[0-9\]+ 008c 30850C03\[^\n\]*\n"	{set x [expr $x+1] }
3390	    -re "^ +\[0-9\]+ 0090 30850C04\[^\n\]*\n"	{set x [expr $x+1] }
3391	    -re "^ +\[0-9\]+ 0094 30850C05\[^\n\]*\n"	{set x [expr $x+1] }
3392	    -re "^ +\[0-9\]+ 0098 30850C06\[^\n\]*\n"	{set x [expr $x+1] }
3393	    -re "^ +\[0-9\]+ 009c 30850C07\[^\n\]*\n"	{set x [expr $x+1] }
3394	    -re "^ +\[0-9\]+ 00a0 30850C08\[^\n\]*\n"	{set x [expr $x+1] }
3395	    -re "^ +\[0-9\]+ 00a4 30850C09\[^\n\]*\n"	{set x [expr $x+1] }
3396	    -re "^ +\[0-9\]+ 00a8 30850C0A\[^\n\]*\n"	{set x [expr $x+1] }
3397	    -re "^ +\[0-9\]+ 00ac 30850C0B\[^\n\]*\n"	{set x [expr $x+1] }
3398	    -re "^ +\[0-9\]+ 00b0 30850C0C\[^\n\]*\n"	{set x [expr $x+1] }
3399	    -re "^ +\[0-9\]+ 00b4 30850C0D\[^\n\]*\n"	{set x [expr $x+1] }
3400	    -re "^ +\[0-9\]+ 00b8 30850C0E\[^\n\]*\n"	{set x [expr $x+1] }
3401	    -re "^ +\[0-9\]+ 00bc 30850C0F\[^\n\]*\n"	{set x [expr $x+1] }
3402	    -re "^ +\[0-9\]+ 00c0 30850C10\[^\n\]*\n"	{set x [expr $x+1] }
3403	    -re "^ +\[0-9\]+ 00c4 30850C11\[^\n\]*\n"	{set x [expr $x+1] }
3404	    -re "^ +\[0-9\]+ 00c8 30850C12\[^\n\]*\n"	{set x [expr $x+1] }
3405	    -re "^ +\[0-9\]+ 00cc 30850C13\[^\n\]*\n"	{set x [expr $x+1] }
3406	    -re "^ +\[0-9\]+ 00d0 30850C14\[^\n\]*\n"	{set x [expr $x+1] }
3407	    -re "^ +\[0-9\]+ 00d4 30850C15\[^\n\]*\n"	{set x [expr $x+1] }
3408	    -re "^ +\[0-9\]+ 00d8 30850C16\[^\n\]*\n"	{set x [expr $x+1] }
3409	    -re "^ +\[0-9\]+ 00dc 30850C17\[^\n\]*\n"	{set x [expr $x+1] }
3410	    -re "^ +\[0-9\]+ 00e0 30850C18\[^\n\]*\n"	{set x [expr $x+1] }
3411	    -re "^ +\[0-9\]+ 00e4 30850C19\[^\n\]*\n"	{set x [expr $x+1] }
3412	    -re "^ +\[0-9\]+ 00e8 30850C1A\[^\n\]*\n"	{set x [expr $x+1] }
3413	    -re "^ +\[0-9\]+ 00ec 30850C1B\[^\n\]*\n"	{set x [expr $x+1] }
3414	    -re "^ +\[0-9\]+ 00f0 30850C1C\[^\n\]*\n"	{set x [expr $x+1] }
3415	    -re "^ +\[0-9\]+ 00f4 30850C1D\[^\n\]*\n"	{set x [expr $x+1] }
3416	    -re "^ +\[0-9\]+ 00f8 30850C1E\[^\n\]*\n"	{set x [expr $x+1] }
3417	    -re "^ +\[0-9\]+ 00fc 30850C1F\[^\n\]*\n"	{set x [expr $x+1] }
3418	    -re "^ +\[0-9\]+ 0100 30851C00\[^\n\]*\n"	{set x [expr $x+1] }
3419	    -re "^ +\[0-9\]+ 0104 30851C01\[^\n\]*\n"	{set x [expr $x+1] }
3420	    -re "^ +\[0-9\]+ 0108 30851C02\[^\n\]*\n"	{set x [expr $x+1] }
3421	    -re "^ +\[0-9\]+ 010c 30851C03\[^\n\]*\n"	{set x [expr $x+1] }
3422	    -re "^ +\[0-9\]+ 0110 30851C04\[^\n\]*\n"	{set x [expr $x+1] }
3423	    -re "^ +\[0-9\]+ 0114 30851C05\[^\n\]*\n"	{set x [expr $x+1] }
3424	    -re "^ +\[0-9\]+ 0118 30851C06\[^\n\]*\n"	{set x [expr $x+1] }
3425	    -re "^ +\[0-9\]+ 011c 30851C07\[^\n\]*\n"	{set x [expr $x+1] }
3426	    -re "^ +\[0-9\]+ 0120 30851C08\[^\n\]*\n"	{set x [expr $x+1] }
3427	    -re "^ +\[0-9\]+ 0124 30851C09\[^\n\]*\n"	{set x [expr $x+1] }
3428	    -re "^ +\[0-9\]+ 0128 30851C0A\[^\n\]*\n"	{set x [expr $x+1] }
3429	    -re "^ +\[0-9\]+ 012c 30851C0B\[^\n\]*\n"	{set x [expr $x+1] }
3430	    -re "^ +\[0-9\]+ 0130 30851C0C\[^\n\]*\n"	{set x [expr $x+1] }
3431	    -re "^ +\[0-9\]+ 0134 30851C0D\[^\n\]*\n"	{set x [expr $x+1] }
3432	    -re "^ +\[0-9\]+ 0138 30851C0E\[^\n\]*\n"	{set x [expr $x+1] }
3433	    -re "^ +\[0-9\]+ 013c 30851C0F\[^\n\]*\n"	{set x [expr $x+1] }
3434	    -re "^ +\[0-9\]+ 0140 30851C10\[^\n\]*\n"	{set x [expr $x+1] }
3435	    -re "^ +\[0-9\]+ 0144 30851C11\[^\n\]*\n"	{set x [expr $x+1] }
3436	    -re "^ +\[0-9\]+ 0148 30851C12\[^\n\]*\n"	{set x [expr $x+1] }
3437	    -re "^ +\[0-9\]+ 014c 30851C13\[^\n\]*\n"	{set x [expr $x+1] }
3438	    -re "^ +\[0-9\]+ 0150 30851C14\[^\n\]*\n"	{set x [expr $x+1] }
3439	    -re "^ +\[0-9\]+ 0154 30851C15\[^\n\]*\n"	{set x [expr $x+1] }
3440	    -re "^ +\[0-9\]+ 0158 30851C16\[^\n\]*\n"	{set x [expr $x+1] }
3441	    -re "^ +\[0-9\]+ 015c 30851C17\[^\n\]*\n"	{set x [expr $x+1] }
3442	    -re "^ +\[0-9\]+ 0160 30851C18\[^\n\]*\n"	{set x [expr $x+1] }
3443	    -re "^ +\[0-9\]+ 0164 30851C19\[^\n\]*\n"	{set x [expr $x+1] }
3444	    -re "^ +\[0-9\]+ 0168 30851C1A\[^\n\]*\n"	{set x [expr $x+1] }
3445	    -re "^ +\[0-9\]+ 016c 30851C1B\[^\n\]*\n"	{set x [expr $x+1] }
3446	    -re "^ +\[0-9\]+ 0170 30851C1C\[^\n\]*\n"	{set x [expr $x+1] }
3447	    -re "^ +\[0-9\]+ 0174 30851C1D\[^\n\]*\n"	{set x [expr $x+1] }
3448	    -re "^ +\[0-9\]+ 0178 30851C1E\[^\n\]*\n"	{set x [expr $x+1] }
3449	    -re "^ +\[0-9\]+ 017c 30851C1F\[^\n\]*\n"	{set x [expr $x+1] }
3450	    -re "\[^\n\]*\n"				{ }
3451	    timeout				{ perror "timeout\n"; break }
3452	    eof					{ break }
3453	}
3454    }
3455
3456    # This was intended to do any cleanup necessary.  It kinda looks like it
3457    # isn't needed, but just in case, please keep it in for now.
3458    gas_finish
3459
3460    # Did we find what we were looking for?  If not, flunk it.
3461    if [expr $x==96] then { pass $testname } else { fail $testname }
3462}
3463
3464proc do_media {} {
3465    set testname "media.s: media tests"
3466    set x 0
3467
3468    gas_start "media.s" "-al"
3469
3470    # Check the assembled instruction against a table built by the HP assembler
3471    # Any differences should be checked by hand -- with the number of problems
3472    # I've seen in the HP assembler I don't completely trust it.
3473    #
3474    # Instead of having a variable for each match string just increment the
3475    # total number of matches seen.  That's simpler when testing large numbers
3476    # of instructions (as these tests to).
3477    while 1 {
3478	expect {
3479	    -re "^ +\[0-9\]+ 0000 096703CC\[^\n\]*\n"	{set x [expr $x+1] }
3480	    -re "^ +\[0-9\]+ 0004 0967034C\[^\n\]*\n"	{set x [expr $x+1] }
3481	    -re "^ +\[0-9\]+ 0008 0967030C\[^\n\]*\n"	{set x [expr $x+1] }
3482	    -re "^ +\[0-9\]+ 000c 096702CC\[^\n\]*\n"	{set x [expr $x+1] }
3483	    -re "^ +\[0-9\]+ 0010 F8078B4B\[^\n\]*\n"	{set x [expr $x+1] }
3484	    -re "^ +\[0-9\]+ 0014 0967074C\[^\n\]*\n"	{set x [expr $x+1] }
3485	    -re "^ +\[0-9\]+ 0018 0967078C\[^\n\]*\n"	{set x [expr $x+1] }
3486	    -re "^ +\[0-9\]+ 001c 096707CC\[^\n\]*\n"	{set x [expr $x+1] }
3487	    -re "^ +\[0-9\]+ 0020 F8E0CF4B\[^\n\]*\n"	{set x [expr $x+1] }
3488	    -re "^ +\[0-9\]+ 0024 F8E0CF4B\[^\n\]*\n"	{set x [expr $x+1] }
3489	    -re "^ +\[0-9\]+ 0028 F8E0CB4B\[^\n\]*\n"	{set x [expr $x+1] }
3490	    -re "^ +\[0-9\]+ 002c 0967054C\[^\n\]*\n"	{set x [expr $x+1] }
3491	    -re "^ +\[0-9\]+ 0030 0967058C\[^\n\]*\n"	{set x [expr $x+1] }
3492	    -re "^ +\[0-9\]+ 0034 096705CC\[^\n\]*\n"	{set x [expr $x+1] }
3493	    -re "^ +\[0-9\]+ 0038 0ACE01C9\[^\n\]*\n"	{set x [expr $x+1] }
3494	    -re "^ +\[0-9\]+ 003c 0ACE0149\[^\n\]*\n"	{set x [expr $x+1] }
3495	    -re "^ +\[0-9\]+ 0040 0ACE0109\[^\n\]*\n"	{set x [expr $x+1] }
3496	    -re "^ +\[0-9\]+ 0044 FACE8409\[^\n\]*\n"	{set x [expr $x+1] }
3497	    -re "^ +\[0-9\]+ 0048 FACEC409\[^\n\]*\n"	{set x [expr $x+1] }
3498	    -re "^ +\[0-9\]+ 004c FACE8009\[^\n\]*\n"	{set x [expr $x+1] }
3499	    -re "^ +\[0-9\]+ 0050 FACEC009\[^\n\]*\n"	{set x [expr $x+1] }
3500	    -re "^ +\[0-9\]+ 0054 FAD60E49\[^\n\]*\n"	{set x [expr $x+1] }
3501	    -re "^ +\[0-9\]+ 0058 FAD64A89\[^\n\]*\n"	{set x [expr $x+1] }
3502	    -re "^ +\[0-9\]+ 005c FAD66309\[^\n\]*\n"	{set x [expr $x+1] }
3503	    -re "\[^\n\]*\n"				{ }
3504	    timeout				{ perror "timeout\n"; break }
3505	    eof					{ break }
3506	}
3507    }
3508
3509    # This was intended to do any cleanup necessary.  It kinda looks like it
3510    # isn't needed, but just in case, please keep it in for now.
3511    gas_finish
3512
3513    # Did we find what we were looking for?  If not, flunk it.
3514    if [expr $x==24] then { pass $testname } else { fail $testname }
3515}
3516
3517proc do_special {} {
3518    set testname "special.s: special tests"
3519    set x 0
3520
3521    gas_start "special.s" "-al"
3522
3523    # Check the assembled instruction against a table built by the HP assembler
3524    # Any differences should be checked by hand -- with the number of problems
3525    # I've seen in the HP assembler I don't completely trust it.
3526    #
3527    # Instead of having a variable for each match string just increment the
3528    # total number of matches seen.  That's simpler when testing large numbers
3529    # of instructions (as these tests to).
3530    while 1 {
3531	expect {
3532	    -re "^ +\[0-9\]+ 0000 04A41680\[^\n\]*\n"	{ set x [expr $x+1] }
3533	    -re "^ +\[0-9\]+ 0004 04A416A0\[^\n\]*\n"	{ set x [expr $x+1] }
3534	    -re "^ +\[0-9\]+ 0008 04A41A80\[^\n\]*\n"	{ set x [expr $x+1] }
3535	    -re "^ +\[0-9\]+ 000c 04A41AA0\[^\n\]*\n"	{ set x [expr $x+1] }
3536	    -re "\[^\n\]*\n"				{ }
3537	    timeout				{ perror "timeout\n"; break }
3538	    eof					{ break }
3539	}
3540    }
3541
3542    # This was intended to do any cleanup necessary.  It kinda looks like it
3543    # isn't needed, but just in case, please keep it in for now.
3544    gas_finish
3545
3546    # Did we find what we were looking for?  If not, flunk it.
3547    if [expr $x==4] then { pass $testname } else { fail $testname }
3548}
3549
3550proc do_perf {} {
3551    set testname "perf.s: perf tests"
3552    set x 0
3553
3554    gas_start "perf.s" "-al"
3555
3556    # Check the assembled instruction against a table built by the HP assembler
3557    # Any differences should be checked by hand -- with the number of problems
3558    # I've seen in the HP assembler I don't completely trust it.
3559    #
3560    # Instead of having a variable for each match string just increment the
3561    # total number of matches seen.  That's simpler when testing large numbers
3562    # of instructions (as these tests to).
3563
3564    # The third one is questionable.  HP as doesn't generate what the book
3565    # says.  It outputs the nullify flag at 30 instead.
3566
3567    while 1 {
3568	expect {
3569	    -re "^ +\[0-9\]+ 0000 30000680\[^\n\]*\n"	{ set x [expr $x+1] }
3570	    -re "^ +\[0-9\]+ 0004 30000280\[^\n\]*\n"	{ set x [expr $x+1] }
3571	    -re "^ +\[0-9\]+ 0008 300002A0\[^\n\]*\n"	{ set x [expr $x+1] }
3572	    -re "\[^\n\]*\n"				{ }
3573	    timeout				{ perror "timeout\n"; break }
3574	    eof					{ break }
3575	}
3576    }
3577
3578    # This was intended to do any cleanup necessary.  It kinda looks like it
3579    # isn't needed, but just in case, please keep it in for now.
3580    gas_finish
3581
3582    # Did we find what we were looking for?  If not, flunk it.
3583    if [expr $x==3] then { pass $testname } else { fail $testname }
3584}
3585
3586proc do_spop {} {
3587    set testname "spop.s: spop tests"
3588    set x 0
3589
3590    # This tickles a bug in the expression parser.
3591    gas_start "spop.s" "-al"
3592
3593    # Check the assembled instruction against a table built by the HP assembler
3594    # Any differences should be checked by hand -- with the number of problems
3595    # I've seen in the HP assembler I don't completely trust it.
3596    #
3597    # Instead of having a variable for each match string just increment the
3598    # total number of matches seen.  That's simpler when testing large numbers
3599    # of instructions (as these tests to).
3600    while 1 {
3601	expect {
3602	    -re "^ +\[0-9\]+ 0000 10000105\[^\n\]*\n"	{ set x [expr $x+1] }
3603	    -re "^ +\[0-9\]+ 0004 10001913\[^\n\]*\n"	{ set x [expr $x+1] }
3604	    -re "^ +\[0-9\]+ 0008 10000125\[^\n\]*\n"	{ set x [expr $x+1] }
3605	    -re "^ +\[0-9\]+ 000c 10001933\[^\n\]*\n"	{ set x [expr $x+1] }
3606	    -re "^ +\[0-9\]+ 0010 10002B05\[^\n\]*\n"	{ set x [expr $x+1] }
3607	    -re "^ +\[0-9\]+ 0014 10039B05\[^\n\]*\n"	{ set x [expr $x+1] }
3608	    -re "^ +\[0-9\]+ 0018 10002B25\[^\n\]*\n"	{ set x [expr $x+1] }
3609	    -re "^ +\[0-9\]+ 001c 10039B25\[^\n\]*\n"	{ set x [expr $x+1] }
3610	    -re "^ +\[0-9\]+ 0020 10A00505\[^\n\]*\n"	{ set x [expr $x+1] }
3611	    -re "^ +\[0-9\]+ 0024 10A01D13\[^\n\]*\n"	{ set x [expr $x+1] }
3612	    -re "^ +\[0-9\]+ 0028 10A00525\[^\n\]*\n"	{ set x [expr $x+1] }
3613	    -re "^ +\[0-9\]+ 002c 10A01D33\[^\n\]*\n"	{ set x [expr $x+1] }
3614	    -re "^ +\[0-9\]+ 0030 10C50705\[^\n\]*\n"	{ set x [expr $x+1] }
3615	    -re "^ +\[0-9\]+ 0034 10C51F13\[^\n\]*\n"	{ set x [expr $x+1] }
3616	    -re "^ +\[0-9\]+ 0038 10C50725\[^\n\]*\n"	{ set x [expr $x+1] }
3617	    -re "^ +\[0-9\]+ 003c 10C51F33\[^\n\]*\n"	{ set x [expr $x+1] }
3618	    -re "\[^\n\]*\n"				{ }
3619	    timeout				{ perror "timeout\n"; break }
3620	    eof					{ break }
3621	}
3622    }
3623
3624    # This was intended to do any cleanup necessary.  It kinda looks like it
3625    # isn't needed, but just in case, please keep it in for now.
3626    gas_finish
3627
3628    # Did we find what we were looking for?  If not, flunk it.
3629    if [expr $x==16] then { pass $testname } else { fail $testname }
3630}
3631
3632proc do_copr {} {
3633    set testname "copr.s: copr tests"
3634    set x 0
3635
3636    gas_start "copr.s" "-al"
3637
3638    # Check the assembled instruction against a table built by the HP assembler
3639    # Any differences should be checked by hand -- with the number of problems
3640    # I've seen in the HP assembler I don't completely trust it.
3641    #
3642    # Instead of having a variable for each match string just increment the
3643    # total number of matches seen.  That's simpler when testing large numbers
3644    # of instructions (as these tests to).
3645    while 1 {
3646	expect {
3647	    -re "^ +\[0-9\]+ 0000 30000105\[^\n\]*\n"	{ set x [expr $x+1] }
3648	    -re "^ +\[0-9\]+ 0004 30000713\[^\n\]*\n"	{ set x [expr $x+1] }
3649	    -re "^ +\[0-9\]+ 0008 30000125\[^\n\]*\n"	{ set x [expr $x+1] }
3650	    -re "^ +\[0-9\]+ 000c 30000733\[^\n\]*\n"	{ set x [expr $x+1] }
3651	    -re "\[^\n\]*\n"				{ }
3652	    timeout				{ perror "timeout\n"; break }
3653	    eof					{ break }
3654	}
3655    }
3656
3657    # This was intended to do any cleanup necessary.  It kinda looks like it
3658    # isn't needed, but just in case, please keep it in for now.
3659    gas_finish
3660
3661    # Did we find what we were looking for?  If not, flunk it.
3662    if [expr $x==4] then { pass $testname } else { fail $testname }
3663}
3664
3665proc do_coprmem {} {
3666    set testname "coprmem.s: copr memory tests"
3667    set x 0
3668
3669    gas_start "coprmem.s" "-al"
3670
3671    # Check the assembled instruction against a table built by the HP assembler
3672    # Any differences should be checked by hand -- with the number of problems
3673    # I've seen in the HP assembler I don't completely trust it.
3674    #
3675    # Instead of having a variable for each match string just increment the
3676    # total number of matches seen.  That's simpler when testing large numbers
3677    # of instructions (as these tests to).
3678    while 1 {
3679	expect {
3680	    -re "^ +\[0-9\]+ 0000 2485011A\[^\n\]*\n"	{ set x [expr $x+1] }
3681	    -re "^ +\[0-9\]+ 0004 2485211A\[^\n\]*\n"	{ set x [expr $x+1] }
3682	    -re "^ +\[0-9\]+ 0008 2485013A\[^\n\]*\n"	{ set x [expr $x+1] }
3683	    -re "^ +\[0-9\]+ 000c 2485213A\[^\n\]*\n"	{ set x [expr $x+1] }
3684	    -re "^ +\[0-9\]+ 0010 2C85011A\[^\n\]*\n"	{ set x [expr $x+1] }
3685	    -re "^ +\[0-9\]+ 0014 2C85211A\[^\n\]*\n"	{ set x [expr $x+1] }
3686	    -re "^ +\[0-9\]+ 0018 2C85013A\[^\n\]*\n"	{ set x [expr $x+1] }
3687	    -re "^ +\[0-9\]+ 001c 2C85213A\[^\n\]*\n"	{ set x [expr $x+1] }
3688	    -re "^ +\[0-9\]+ 0020 2485031A\[^\n\]*\n"	{ set x [expr $x+1] }
3689	    -re "^ +\[0-9\]+ 0024 2485231A\[^\n\]*\n"	{ set x [expr $x+1] }
3690	    -re "^ +\[0-9\]+ 0028 2485033A\[^\n\]*\n"	{ set x [expr $x+1] }
3691	    -re "^ +\[0-9\]+ 002c 2485233A\[^\n\]*\n"	{ set x [expr $x+1] }
3692	    -re "^ +\[0-9\]+ 0030 2C85031A\[^\n\]*\n"	{ set x [expr $x+1] }
3693	    -re "^ +\[0-9\]+ 0034 2C85231A\[^\n\]*\n"	{ set x [expr $x+1] }
3694	    -re "^ +\[0-9\]+ 0038 2C85033A\[^\n\]*\n"	{ set x [expr $x+1] }
3695	    -re "^ +\[0-9\]+ 003c 2C85233A\[^\n\]*\n"	{ set x [expr $x+1] }
3696	    -re "^ +\[0-9\]+ 0040 2480111A\[^\n\]*\n"	{ set x [expr $x+1] }
3697	    -re "^ +\[0-9\]+ 0044 2480313A\[^\n\]*\n"	{ set x [expr $x+1] }
3698	    -re "^ +\[0-9\]+ 0048 2480113A\[^\n\]*\n"	{ set x [expr $x+1] }
3699	    -re "^ +\[0-9\]+ 004c 2C80111A\[^\n\]*\n"	{ set x [expr $x+1] }
3700	    -re "^ +\[0-9\]+ 0050 2C80313A\[^\n\]*\n"	{ set x [expr $x+1] }
3701	    -re "^ +\[0-9\]+ 0054 2C80113A\[^\n\]*\n"	{ set x [expr $x+1] }
3702	    -re "^ +\[0-9\]+ 0058 2480131A\[^\n\]*\n"	{ set x [expr $x+1] }
3703	    -re "^ +\[0-9\]+ 005c 2480333A\[^\n\]*\n"	{ set x [expr $x+1] }
3704	    -re "^ +\[0-9\]+ 0060 2480133A\[^\n\]*\n"	{ set x [expr $x+1] }
3705	    -re "^ +\[0-9\]+ 0064 2C80131A\[^\n\]*\n"	{ set x [expr $x+1] }
3706	    -re "^ +\[0-9\]+ 0068 2C80333A\[^\n\]*\n"	{ set x [expr $x+1] }
3707	    -re "^ +\[0-9\]+ 006c 2C80133A\[^\n\]*\n"	{ set x [expr $x+1] }
3708	    -re "\[^\n\]*\n"				{ }
3709	    timeout				{ perror "timeout\n"; break }
3710	    eof					{ break }
3711	}
3712    }
3713
3714    # This was intended to do any cleanup necessary.  It kinda looks like it
3715    # isn't needed, but just in case, please keep it in for now.
3716    gas_finish
3717
3718    # Did we find what we were looking for?  If not, flunk it.
3719    if [expr $x==28] then { pass $testname } else { fail $testname }
3720}
3721
3722proc do_fmem_LR_tests {} {
3723    set testname "fmemLRbug.s: LR register selection on fp mem instructions"
3724    set x 0
3725
3726    gas_start "fmemLRbug.s" "-al"
3727
3728    # Make sure we correctly handle field selectors.
3729    while 1 {
3730	expect {
3731	    -re "^ +\[0-9\]+ 0000 27401246\[^\n\]*\n"	{ set x [expr $x+1] }
3732	    -re "^ +\[0-9\]+ 0004 27481206\[^\n\]*\n"	{ set x [expr $x+1] }
3733	    -re "^ +\[0-9\]+ 0008 27501206\[^\n\]*\n"	{ set x [expr $x+1] }
3734	    -re "^ +\[0-9\]+ 000c 2F481206\[^\n\]*\n"	{ set x [expr $x+1] }
3735	    -re "^ +\[0-9\]+ 0010 2F501206\[^\n\]*\n"	{ set x [expr $x+1] }
3736	    -re "^ +\[0-9\]+ 0014 27401046\[^\n\]*\n"	{ set x [expr $x+1] }
3737	    -re "^ +\[0-9\]+ 0018 27481006\[^\n\]*\n"	{ set x [expr $x+1] }
3738	    -re "^ +\[0-9\]+ 001c 27501006\[^\n\]*\n"	{ set x [expr $x+1] }
3739	    -re "^ +\[0-9\]+ 0020 2F481006\[^\n\]*\n"	{ set x [expr $x+1] }
3740	    -re "^ +\[0-9\]+ 0024 2F501006\[^\n\]*\n"	{ set x [expr $x+1] }
3741	    -re "^ +\[0-9\]+ 0028 27401246\[^\n\]*\n"	{ set x [expr $x+1] }
3742	    -re "^ +\[0-9\]+ 002c 27481206\[^\n\]*\n"	{ set x [expr $x+1] }
3743	    -re "^ +\[0-9\]+ 0030 27501206\[^\n\]*\n"	{ set x [expr $x+1] }
3744	    -re "^ +\[0-9\]+ 0034 2F481206\[^\n\]*\n"	{ set x [expr $x+1] }
3745	    -re "^ +\[0-9\]+ 0038 2F501206\[^\n\]*\n"	{ set x [expr $x+1] }
3746	    -re "^ +\[0-9\]+ 003c 27401046\[^\n\]*\n"	{ set x [expr $x+1] }
3747	    -re "^ +\[0-9\]+ 0040 27481006\[^\n\]*\n"	{ set x [expr $x+1] }
3748	    -re "^ +\[0-9\]+ 0044 27501006\[^\n\]*\n"	{ set x [expr $x+1] }
3749	    -re "^ +\[0-9\]+ 0048 2F481006\[^\n\]*\n"	{ set x [expr $x+1] }
3750	    -re "^ +\[0-9\]+ 004c 2F501006\[^\n\]*\n"	{ set x [expr $x+1] }
3751	    -re "^ +\[0-9\]+ 0050 27590246\[^\n\]*\n"	{ set x [expr $x+1] }
3752	    -re "^ +\[0-9\]+ 0054 27590206\[^\n\]*\n"	{ set x [expr $x+1] }
3753	    -re "^ +\[0-9\]+ 0058 27590206\[^\n\]*\n"	{ set x [expr $x+1] }
3754	    -re "^ +\[0-9\]+ 005c 2F590206\[^\n\]*\n"	{ set x [expr $x+1] }
3755	    -re "^ +\[0-9\]+ 0060 2F590206\[^\n\]*\n"	{ set x [expr $x+1] }
3756	    -re "^ +\[0-9\]+ 0064 27590046\[^\n\]*\n"	{ set x [expr $x+1] }
3757	    -re "^ +\[0-9\]+ 0068 27590006\[^\n\]*\n"	{ set x [expr $x+1] }
3758	    -re "^ +\[0-9\]+ 006c 27590006\[^\n\]*\n"	{ set x [expr $x+1] }
3759	    -re "^ +\[0-9\]+ 0070 2F590006\[^\n\]*\n"	{ set x [expr $x+1] }
3760	    -re "^ +\[0-9\]+ 0074 2F590006\[^\n\]*\n"	{ set x [expr $x+1] }
3761	    -re "^ +\[0-9\]+ 0078 27590246\[^\n\]*\n"	{ set x [expr $x+1] }
3762	    -re "^ +\[0-9\]+ 007c 27590206\[^\n\]*\n"	{ set x [expr $x+1] }
3763	    -re "^ +\[0-9\]+ 0080 27590206\[^\n\]*\n"	{ set x [expr $x+1] }
3764	    -re "^ +\[0-9\]+ 0084 2F590206\[^\n\]*\n"	{ set x [expr $x+1] }
3765	    -re "^ +\[0-9\]+ 0088 2F590206\[^\n\]*\n"	{ set x [expr $x+1] }
3766	    -re "^ +\[0-9\]+ 008c 27590046\[^\n\]*\n"	{ set x [expr $x+1] }
3767	    -re "^ +\[0-9\]+ 0090 27590006\[^\n\]*\n"	{ set x [expr $x+1] }
3768	    -re "^ +\[0-9\]+ 0094 27590006\[^\n\]*\n"	{ set x [expr $x+1] }
3769	    -re "^ +\[0-9\]+ 0098 2F590006\[^\n\]*\n"	{ set x [expr $x+1] }
3770	    -re "^ +\[0-9\]+ 009c 2F590006\[^\n\]*\n"	{ set x [expr $x+1] }
3771	    -re "^ +\[0-9\]+ 00a0 E840C000\[^\n\]*\n"	{ set x [expr $x+1] }
3772	    -re "^ +\[0-9\]+ 00a4 08000240\[^\n\]*\n"	{ set x [expr $x+1] }
3773	    -re "\[^\n\]*\n"				{ }
3774	    timeout				{ perror "timeout\n"; break }
3775	    eof					{ break }
3776	}
3777    }
3778
3779    # This was intended to do any cleanup necessary.  It kinda looks like it
3780    # isn't needed, but just in case, please keep it in for now.
3781    gas_finish
3782
3783    # Did we find what we were looking for?  If not, flunk it.
3784    if [expr $x==42] then { pass $testname } else { fail $testname }
3785}
3786
3787if [istarget hppa*-*-*] then {
3788    # Test the basic instruction parser.
3789    do_imem
3790    do_immed
3791    do_branch
3792    do_add
3793    do_add2
3794    do_sh1add
3795    do_sh2add
3796    do_sh3add
3797    do_shladd
3798    do_shladd2
3799    do_sub
3800    do_sub2
3801    do_ds
3802    do_comclr
3803    do_logical
3804    do_unit
3805    do_unit2
3806    do_dcor
3807    do_dcor2
3808    do_addi
3809    do_subi
3810    do_shift
3811    do_shift2
3812    do_shift3
3813    do_extract
3814    do_extract2
3815    do_extract3
3816    do_deposit
3817    do_deposit2
3818    do_deposit3
3819    do_system
3820    do_system2
3821    do_purge
3822    do_purge2
3823    do_fp_misc
3824    do_fmem
3825    do_fp_comp
3826    do_fp_conv
3827    do_fp_fcmp
3828    do_special
3829    do_perf
3830    do_spop
3831    do_copr
3832    do_coprmem
3833
3834    # The "weird.s" file from the gdb testsuite.  Simply verify it
3835    # assembles.
3836    gas_test "weird.s" "" "" "stabs parsing"
3837
3838    # Test that we correctly assemble some FP memory tests which
3839    # L/R register selects.  (Regression test for a bug Tege found).
3840    do_fmem_LR_tests
3841
3842    # PA2.0 tests
3843    do_fp_comp2
3844    do_branch2
3845    do_media
3846}
3847