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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [gas/] [testsuite/] [gas/] [h8300/] [h8300.exp] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
#
2
# Some H8/300 tests
3
#
4
proc do_h8300_add_sub {} {
5
    set testname "addsub.s: h8300 add/sub tests"
6
    set x 0
7
 
8
    gas_start "addsub.s" "-al"
9
 
10
    # Check each instruction bit pattern to verify it got
11
    # assembled correctly.
12
    while 1 {
13
        expect {
14
            -re " +\[0-9\]+ 0000 8910\[^\n\]*\n"   { set x [expr $x+1] }
15
            -re " +\[0-9\]+ 0002 0819\[^\n\]*\n"   { set x [expr $x+1] }
16
            -re " +\[0-9\]+ 0004 0912\[^\n\]*\n"   { set x [expr $x+1] }
17
            -re " +\[0-9\]+ 0006 0B04\[^\n\]*\n"   { set x [expr $x+1] }
18
            -re " +\[0-9\]+ 0008 0B85\[^\n\]*\n"   { set x [expr $x+1] }
19
            -re " +\[0-9\]+ 000a 0E89\[^\n\]*\n"   { set x [expr $x+1] }
20
            -re " +\[0-9\]+ 000c 9210\[^\n\]*\n"   { set x [expr $x+1] }
21
            -re " +\[0-9\]+ 000e 1889\[^\n\]*\n"   { set x [expr $x+1] }
22
            -re " +\[0-9\]+ 0010 1901\[^\n\]*\n"   { set x [expr $x+1] }
23
            -re " +\[0-9\]+ 0012 1B04\[^\n\]*\n"   { set x [expr $x+1] }
24
            -re " +\[0-9\]+ 0014 1B85\[^\n\]*\n"   { set x [expr $x+1] }
25
            -re " +\[0-9\]+ 0016 1E89\[^\n\]*\n"   { set x [expr $x+1] }
26
            -re " +\[0-9\]+ 0018 B210\[^\n\]*\n"   { set x [expr $x+1] }
27
            timeout                             { perror "timeout\n; break }
28
            eof                                 { break }
29
        }
30
    }
31
 
32
    # This was intended to do any cleanup necessary.  It kinda looks like it
33
    # isn't needed, but just in case, please keep it in for now.
34
    gas_finish
35
 
36
    # Did we find what we were looking for?  If not, flunk it.
37
    if [expr $x == 13] then { pass $testname } else { fail $testname }
38
}
39
 
40
proc do_h8300_logical {} {
41
    set testname "logical.s: h8300 logical tests"
42
    set x 0
43
 
44
    gas_start "logical.s" "-al"
45
 
46
    # Check each instruction bit pattern to verify it got
47
    # assembled correctly.
48
    while 1 {
49
        expect {
50
            -re " +\[0-9\]+ 0000 E910\[^\n\]*\n"   { set x [expr $x+1] }
51
            -re " +\[0-9\]+ 0002 1691\[^\n\]*\n"   { set x [expr $x+1] }
52
            -re " +\[0-9\]+ 0004 0610\[^\n\]*\n"   { set x [expr $x+1] }
53
            -re " +\[0-9\]+ 0006 C810\[^\n\]*\n"   { set x [expr $x+1] }
54
            -re " +\[0-9\]+ 0008 1498\[^\n\]*\n"   { set x [expr $x+1] }
55
            -re " +\[0-9\]+ 000a 0410\[^\n\]*\n"   { set x [expr $x+1] }
56
            -re " +\[0-9\]+ 000c D810\[^\n\]*\n"   { set x [expr $x+1] }
57
            -re " +\[0-9\]+ 000e 1589\[^\n\]*\n"   { set x [expr $x+1] }
58
            -re " +\[0-9\]+ 0010 0510\[^\n\]*\n"   { set x [expr $x+1] }
59
            -re " +\[0-9\]+ 0012 1788\[^\n\]*\n"   { set x [expr $x+1] }
60
            -re " +\[0-9\]+ 0014 1708\[^\n\]*\n"   { set x [expr $x+1] }
61
            timeout                             { perror "timeout\n; break }
62
            eof                                 { break }
63
        }
64
    }
65
 
66
    # This was intended to do any cleanup necessary.  It kinda looks like it
67
    # isn't needed, but just in case, please keep it in for now.
68
    gas_finish
69
 
70
    # Did we find what we were looking for?  If not, flunk it.
71
    if [expr $x == 11] then { pass $testname } else { fail $testname }
72
}
73
 
74
proc do_h8300_cbranch {} {
75
    set testname "cbranch.s: h8300 conditional branch tests"
76
    set x 0
77
 
78
    gas_start "cbranch.s" "-al"
79
 
80
    # Check each instruction bit pattern to verify it got
81
    # assembled correctly.
82
    while 1 {
83
        expect {
84
            -re " +\[0-9\]+ 0000 4000\[^\n\]*\n"   { set x [expr $x+1] }
85
            -re " +\[0-9\]+ 0002 4000\[^\n\]*\n"   { set x [expr $x+1] }
86
            -re " +\[0-9\]+ 0004 4100\[^\n\]*\n"   { set x [expr $x+1] }
87
            -re " +\[0-9\]+ 0006 4100\[^\n\]*\n"   { set x [expr $x+1] }
88
            -re " +\[0-9\]+ 0008 4200\[^\n\]*\n"   { set x [expr $x+1] }
89
            -re " +\[0-9\]+ 000a 4300\[^\n\]*\n"   { set x [expr $x+1] }
90
            -re " +\[0-9\]+ 000c 4400\[^\n\]*\n"   { set x [expr $x+1] }
91
            -re " +\[0-9\]+ 000e 4400\[^\n\]*\n"   { set x [expr $x+1] }
92
            -re " +\[0-9\]+ 0010 4500\[^\n\]*\n"   { set x [expr $x+1] }
93
            -re " +\[0-9\]+ 0012 4500\[^\n\]*\n"   { set x [expr $x+1] }
94
            -re " +\[0-9\]+ 0014 4600\[^\n\]*\n"   { set x [expr $x+1] }
95
            -re " +\[0-9\]+ 0016 4700\[^\n\]*\n"   { set x [expr $x+1] }
96
            -re " +\[0-9\]+ 0018 4800\[^\n\]*\n"   { set x [expr $x+1] }
97
            -re " +\[0-9\]+ 001a 4900\[^\n\]*\n"   { set x [expr $x+1] }
98
            -re " +\[0-9\]+ 001c 4A00\[^\n\]*\n"   { set x [expr $x+1] }
99
            -re " +\[0-9\]+ 001e 4B00\[^\n\]*\n"   { set x [expr $x+1] }
100
            -re " +\[0-9\]+ 0020 4C00\[^\n\]*\n"   { set x [expr $x+1] }
101
            -re " +\[0-9\]+ 0022 4D00\[^\n\]*\n"   { set x [expr $x+1] }
102
            -re " +\[0-9\]+ 0024 4E00\[^\n\]*\n"   { set x [expr $x+1] }
103
            -re " +\[0-9\]+ 0026 4F00\[^\n\]*\n"   { set x [expr $x+1] }
104
            timeout                             { perror "timeout\n; break }
105
            eof                                 { break }
106
        }
107
    }
108
 
109
    # This was intended to do any cleanup necessary.  It kinda looks like it
110
    # isn't needed, but just in case, please keep it in for now.
111
    gas_finish
112
 
113
    # Did we find what we were looking for?  If not, flunk it.
114
    if [expr $x == 20] then { pass $testname } else { fail $testname }
115
}
116
 
117
proc do_h8300_bitops1 {} {
118
    set testname "bitops1.s: h8300 bitops tests #1"
119
    set x 0
120
 
121
    gas_start "bitops1.s" "-al"
122
 
123
    # Check each instruction bit pattern to verify it got
124
    # assembled correctly.
125
    while 1 {
126
        expect {
127
            -re " +\[0-9\]+ 0000 7608\[^\n\]*\n"   { set x [expr $x+1] }
128
            -re " +\[0-9\]+ 0002 7C007600\[^\n\]*\n"   { set x [expr $x+1] }
129
            -re " +\[0-9\]+ 0006 7E407600\[^\n\]*\n"   { set x [expr $x+1] }
130
            -re " +\[0-9\]+ 000a 7208\[^\n\]*\n"   { set x [expr $x+1] }
131
            -re " +\[0-9\]+ 000c 7D007200\[^\n\]*\n"   { set x [expr $x+1] }
132
            -re " +\[0-9\]+ 0010 7F407200\[^\n\]*\n"   { set x [expr $x+1] }
133
            -re " +\[0-9\]+ 0014 6298\[^\n\]*\n"   { set x [expr $x+1] }
134
            -re " +\[0-9\]+ 0016 7D006290\[^\n\]*\n"   { set x [expr $x+1] }
135
            -re " +\[0-9\]+ 001a 7F406290\[^\n\]*\n"   { set x [expr $x+1] }
136
            -re " +\[0-9\]+ 001e 7688\[^\n\]*\n"   { set x [expr $x+1] }
137
            -re " +\[0-9\]+ 0020 7C007680\[^\n\]*\n"   { set x [expr $x+1] }
138
            -re " +\[0-9\]+ 0024 7E407680\[^\n\]*\n"   { set x [expr $x+1] }
139
            -re " +\[0-9\]+ 0028 7788\[^\n\]*\n"   { set x [expr $x+1] }
140
            -re " +\[0-9\]+ 002a 7C007780\[^\n\]*\n"   { set x [expr $x+1] }
141
            -re " +\[0-9\]+ 002e 7E407780\[^\n\]*\n"   { set x [expr $x+1] }
142
            timeout                             { perror "timeout\n; break }
143
            eof                                 { break }
144
        }
145
    }
146
 
147
    # This was intended to do any cleanup necessary.  It kinda looks like it
148
    # isn't needed, but just in case, please keep it in for now.
149
    gas_finish
150
 
151
    # Did we find what we were looking for?  If not, flunk it.
152
    if [expr $x == 15] then { pass $testname } else { fail $testname }
153
}
154
 
155
proc do_h8300_bitops2 {} {
156
    set testname "bitops2.s: h8300 bitops tests #2"
157
    set x 0
158
 
159
    gas_start "bitops2.s" "-al"
160
 
161
    # Check each instruction bit pattern to verify it got
162
    # assembled correctly.
163
    while 1 {
164
        expect {
165
            -re " +\[0-9\]+ 0000 7488\[^\n\]*\n"   { set x [expr $x+1] }
166
            -re " +\[0-9\]+ 0002 7C007480\[^\n\]*\n"   { set x [expr $x+1] }
167
            -re " +\[0-9\]+ 0006 7E407480\[^\n\]*\n"   { set x [expr $x+1] }
168
            -re " +\[0-9\]+ 000a 6788\[^\n\]*\n"   { set x [expr $x+1] }
169
            -re " +\[0-9\]+ 000c 7D006780\[^\n\]*\n"   { set x [expr $x+1] }
170
            -re " +\[0-9\]+ 0010 7F406780\[^\n\]*\n"   { set x [expr $x+1] }
171
            -re " +\[0-9\]+ 0014 7588\[^\n\]*\n"   { set x [expr $x+1] }
172
            -re " +\[0-9\]+ 0016 7C007580\[^\n\]*\n"   { set x [expr $x+1] }
173
            -re " +\[0-9\]+ 001a 7E407580\[^\n\]*\n"   { set x [expr $x+1] }
174
            -re " +\[0-9\]+ 001e 7708\[^\n\]*\n"   { set x [expr $x+1] }
175
            -re " +\[0-9\]+ 0020 7C007700\[^\n\]*\n"   { set x [expr $x+1] }
176
            -re " +\[0-9\]+ 0024 7E407700\[^\n\]*\n"   { set x [expr $x+1] }
177
            timeout                             { perror "timeout\n; break }
178
            eof                                 { break }
179
        }
180
    }
181
 
182
    # This was intended to do any cleanup necessary.  It kinda looks like it
183
    # isn't needed, but just in case, please keep it in for now.
184
    gas_finish
185
 
186
    # Did we find what we were looking for?  If not, flunk it.
187
    if [expr $x == 12] then { pass $testname } else { fail $testname }
188
}
189
 
190
proc do_h8300_bitops3 {} {
191
    set testname "bitops3.s: h8300 bitops tests #3"
192
    set x 0
193
 
194
    gas_start "bitops3.s" "-al"
195
 
196
    # Check each instruction bit pattern to verify it got
197
    # assembled correctly.
198
    while 1 {
199
        expect {
200
            -re " +\[0-9\]+ 0000 7108\[^\n\]*\n"   { set x [expr $x+1] }
201
            -re " +\[0-9\]+ 0002 7D007100\[^\n\]*\n"   { set x [expr $x+1] }
202
            -re " +\[0-9\]+ 0006 7F407100\[^\n\]*\n"   { set x [expr $x+1] }
203
            -re " +\[0-9\]+ 000a 6198\[^\n\]*\n"   { set x [expr $x+1] }
204
            -re " +\[0-9\]+ 000c 7D006190\[^\n\]*\n"   { set x [expr $x+1] }
205
            -re " +\[0-9\]+ 0010 7F406190\[^\n\]*\n"   { set x [expr $x+1] }
206
            -re " +\[0-9\]+ 0014 7008\[^\n\]*\n"   { set x [expr $x+1] }
207
            -re " +\[0-9\]+ 0016 7D007000\[^\n\]*\n"   { set x [expr $x+1] }
208
            -re " +\[0-9\]+ 001a 7F407000\[^\n\]*\n"   { set x [expr $x+1] }
209
            -re " +\[0-9\]+ 001e 6098\[^\n\]*\n"   { set x [expr $x+1] }
210
            -re " +\[0-9\]+ 0020 7D006090\[^\n\]*\n"   { set x [expr $x+1] }
211
            -re " +\[0-9\]+ 0024 7F406090\[^\n\]*\n"   { set x [expr $x+1] }
212
            timeout                             { perror "timeout\n; break }
213
            eof                                 { break }
214
        }
215
    }
216
 
217
    # This was intended to do any cleanup necessary.  It kinda looks like it
218
    # isn't needed, but just in case, please keep it in for now.
219
    gas_finish
220
 
221
    # Did we find what we were looking for?  If not, flunk it.
222
    if [expr $x == 12] then { pass $testname } else { fail $testname }
223
}
224
 
225
proc do_h8300_bitops4 {} {
226
    set testname "bitops4.s: h8300 bitops tests #4"
227
    set x 0
228
 
229
    gas_start "bitops4.s" "-al"
230
 
231
    # Check each instruction bit pattern to verify it got
232
    # assembled correctly.
233
    while 1 {
234
        expect {
235
            -re " +\[0-9\]+ 0000 7408\[^\n\]*\n"   { set x [expr $x+1] }
236
            -re " +\[0-9\]+ 0002 7C007400\[^\n\]*\n"   { set x [expr $x+1] }
237
            -re " +\[0-9\]+ 0006 7E407400\[^\n\]*\n"   { set x [expr $x+1] }
238
            -re " +\[0-9\]+ 000a 6708\[^\n\]*\n"   { set x [expr $x+1] }
239
            -re " +\[0-9\]+ 000c 7D006700\[^\n\]*\n"   { set x [expr $x+1] }
240
            -re " +\[0-9\]+ 0010 7F406700\[^\n\]*\n"   { set x [expr $x+1] }
241
            -re " +\[0-9\]+ 0014 7308\[^\n\]*\n"   { set x [expr $x+1] }
242
            -re " +\[0-9\]+ 0016 7C007300\[^\n\]*\n"   { set x [expr $x+1] }
243
            -re " +\[0-9\]+ 001a 7E407300\[^\n\]*\n"   { set x [expr $x+1] }
244
            -re " +\[0-9\]+ 001e 6398\[^\n\]*\n"   { set x [expr $x+1] }
245
            -re " +\[0-9\]+ 0020 7C006390\[^\n\]*\n"   { set x [expr $x+1] }
246
            -re " +\[0-9\]+ 0024 7E406390\[^\n\]*\n"   { set x [expr $x+1] }
247
            -re " +\[0-9\]+ 0028 7508\[^\n\]*\n"   { set x [expr $x+1] }
248
            -re " +\[0-9\]+ 002a 7C007500\[^\n\]*\n"   { set x [expr $x+1] }
249
            -re " +\[0-9\]+ 002e 7E407500\[^\n\]*\n"   { set x [expr $x+1] }
250
            timeout                             { perror "timeout\n; break }
251
            eof                                 { break }
252
        }
253
    }
254
 
255
    # This was intended to do any cleanup necessary.  It kinda looks like it
256
    # isn't needed, but just in case, please keep it in for now.
257
    gas_finish
258
 
259
    # Did we find what we were looking for?  If not, flunk it.
260
    if [expr $x == 15] then { pass $testname } else { fail $testname }
261
}
262
 
263
proc do_h8300_branch {} {
264
    set testname "branch.s: h8300 branch tests"
265
    set x 0
266
 
267
    gas_start "branch.s" "-al"
268
 
269
    # Check each instruction bit pattern to verify it got
270
    # assembled correctly.
271
    while 1 {
272
        expect {
273
            -re " +\[0-9\]+ 0000 5500\[^\n\]*\n"   { set x [expr $x+1] }
274
            -re " +\[0-9\]+ 0002 5A000000\[^\n\]*\n"   { set x [expr $x+1] }
275
            -re " +\[0-9\]+ 0006 5900\[^\n\]*\n"   { set x [expr $x+1] }
276
            -re " +\[0-9\]+ 0008 5B00\[^\n\]*\n"   { set x [expr $x+1] }
277
            -re " +\[0-9\]+ 000a 5E000000\[^\n\]*\n"   { set x [expr $x+1] }
278
            -re " +\[0-9\]+ 000e 5D00\[^\n\]*\n"   { set x [expr $x+1] }
279
            -re " +\[0-9\]+ 0010 5F00\[^\n\]*\n"   { set x [expr $x+1] }
280
            timeout                             { perror "timeout\n; break }
281
            eof                                 { break }
282
        }
283
    }
284
 
285
    # This was intended to do any cleanup necessary.  It kinda looks like it
286
    # isn't needed, but just in case, please keep it in for now.
287
    gas_finish
288
 
289
    # Did we find what we were looking for?  If not, flunk it.
290
    if [expr $x == 7] then { pass $testname } else { fail $testname }
291
}
292
 
293
proc do_h8300_compare {} {
294
    set testname "compare.s: h8300 compare tests"
295
    set x 0
296
 
297
    gas_start "compare.s" "-al"
298
 
299
    # Check each instruction bit pattern to verify it got
300
    # assembled correctly.
301
    while 1 {
302
        expect {
303
            -re " +\[0-9\]+ 0000 A800\[^\n\]*\n"   { set x [expr $x+1] }
304
            -re " +\[0-9\]+ 0002 1C08\[^\n\]*\n"   { set x [expr $x+1] }
305
            -re " +\[0-9\]+ 0004 1D01\[^\n\]*\n"   { set x [expr $x+1] }
306
            timeout                             { perror "timeout\n; break }
307
            eof                                 { break }
308
        }
309
    }
310
 
311
    # This was intended to do any cleanup necessary.  It kinda looks like it
312
    # isn't needed, but just in case, please keep it in for now.
313
    gas_finish
314
 
315
    # Did we find what we were looking for?  If not, flunk it.
316
    if [expr $x == 3] then { pass $testname } else { fail $testname }
317
}
318
 
319
proc do_h8300_decimal {} {
320
    set testname "decimal.s: h8300 decimal tests"
321
    set x 0
322
 
323
    gas_start "decimal.s" "-al"
324
 
325
    # Check each instruction bit pattern to verify it got
326
    # assembled correctly.
327
    while 1 {
328
        expect {
329
            -re " +\[0-9\]+ 0000 0F08\[^\n\]*\n"   { set x [expr $x+1] }
330
            -re " +\[0-9\]+ 0002 1F08\[^\n\]*\n"   { set x [expr $x+1] }
331
            eof                                 { break }
332
        }
333
    }
334
 
335
    # This was intended to do any cleanup necessary.  It kinda looks like it
336
    # isn't needed, but just in case, please keep it in for now.
337
    gas_finish
338
 
339
    # Did we find what we were looking for?  If not, flunk it.
340
    if [expr $x == 2] then { pass $testname } else { fail $testname }
341
}
342
 
343
proc do_h8300_incdec {} {
344
    set testname "incdec.s: h8300 incdec tests"
345
    set x 0
346
 
347
    gas_start "incdec.s" "-al"
348
 
349
    # Check each instruction bit pattern to verify it got
350
    # assembled correctly.
351
    while 1 {
352
        expect {
353
            -re " +\[0-9\]+ 0000 1A08\[^\n\]*\n"   { set x [expr $x+1] }
354
            -re " +\[0-9\]+ 0002 0A08\[^\n\]*\n"   { set x [expr $x+1] }
355
            eof                                 { break }
356
        }
357
    }
358
 
359
    # This was intended to do any cleanup necessary.  It kinda looks like it
360
    # isn't needed, but just in case, please keep it in for now.
361
    gas_finish
362
 
363
    # Did we find what we were looking for?  If not, flunk it.
364
    if [expr $x == 2] then { pass $testname } else { fail $testname }
365
}
366
 
367
proc do_h8300_divmul {} {
368
    set testname "divmul.s: h8300 divmul tests"
369
    set x 0
370
 
371
    gas_start "divmul.s" "-al"
372
 
373
    # Check each instruction bit pattern to verify it got
374
    # assembled correctly.
375
    while 1 {
376
        expect {
377
            -re " +\[0-9\]+ 0000 5181\[^\n\]*\n"   { set x [expr $x+1] }
378
            -re " +\[0-9\]+ 0002 5081\[^\n\]*\n"   { set x [expr $x+1] }
379
            eof                                 { break }
380
        }
381
    }
382
 
383
    # This was intended to do any cleanup necessary.  It kinda looks like it
384
    # isn't needed, but just in case, please keep it in for now.
385
    gas_finish
386
 
387
    # Did we find what we were looking for?  If not, flunk it.
388
    if [expr $x == 2] then { pass $testname } else { fail $testname }
389
}
390
 
391
proc do_h8300_misc {} {
392
    set testname "misc.s: h8300 misc tests"
393
    set x 0
394
 
395
    gas_start "misc.s" "-al"
396
 
397
    # Check each instruction bit pattern to verify it got
398
    # assembled correctly.
399
    while 1 {
400
        expect {
401
            -re " +\[0-9\]+ 0000 7B5C598F\[^\n\]*\n"   { set x [expr $x+1] }
402
            -re " +\[0-9\]+ 0004 0700\[^\n\]*\n"   { set x [expr $x+1] }
403
            -re " +\[0-9\]+ 0006 0308\[^\n\]*\n"   { set x [expr $x+1] }
404
            -re " +\[0-9\]+ 0008 0000\[^\n\]*\n"   { set x [expr $x+1] }
405
            -re " +\[0-9\]+ 000a 5670\[^\n\]*\n"   { set x [expr $x+1] }
406
            -re " +\[0-9\]+ 000c 5470\[^\n\]*\n"   { set x [expr $x+1] }
407
            -re " +\[0-9\]+ 000e 0180\[^\n\]*\n"   { set x [expr $x+1] }
408
            -re " +\[0-9\]+ 0010 0208\[^\n\]*\n"   { set x [expr $x+1] }
409
            eof                                 { break }
410
        }
411
    }
412
 
413
    # This was intended to do any cleanup necessary.  It kinda looks like it
414
    # isn't needed, but just in case, please keep it in for now.
415
    gas_finish
416
 
417
    # Did we find what we were looking for?  If not, flunk it.
418
    if [expr $x == 8] then { pass $testname } else { fail $testname }
419
 
420
    setup_xfail "h8300*-*-*"
421
    fail "h8300 movfpe/movtpe tests"
422
}
423
 
424
proc do_h8300_movb {} {
425
    set testname "movb.s: h8300 movb tests"
426
    set x 0
427
 
428
    gas_start "movb.s" "-al"
429
 
430
    # Check each instruction bit pattern to verify it got
431
    # assembled correctly.
432
    while 1 {
433
        expect {
434
            -re " +\[0-9\]+ 0000 0C89\[^\n\]*\n"   { set x [expr $x+1] }
435
            -re " +\[0-9\]+ 0002 F810\[^\n\]*\n"   { set x [expr $x+1] }
436
            -re " +\[0-9\]+ 0004 6818\[^\n\]*\n"   { set x [expr $x+1] }
437
            -re " +\[0-9\]+ 0006 6E180010\[^\n\]*\n"   { set x [expr $x+1] }
438
            -re " +\[0-9\]+ 000a 6C18\[^\n\]*\n"   { set x [expr $x+1] }
439
            -re " +\[0-9\]+ 000c 2810\[^\n\]*\n"   { set x [expr $x+1] }
440
            -re " +\[0-9\]+ 000e 6A080000\[^\n\]*\n"   { set x [expr $x+1] }
441
            -re " +\[0-9\]+ 0012 6898\[^\n\]*\n"   { set x [expr $x+1] }
442
            -re " +\[0-9\]+ 0014 6E980010\[^\n\]*\n"   { set x [expr $x+1] }
443
            -re " +\[0-9\]+ 0018 6C98\[^\n\]*\n"   { set x [expr $x+1] }
444
            -re " +\[0-9\]+ 001a 3810\[^\n\]*\n"   { set x [expr $x+1] }
445
            -re " +\[0-9\]+ 001c 6A880000\[^\n\]*\n"   { set x [expr $x+1] }
446
            eof                                 { break }
447
        }
448
    }
449
 
450
    # This was intended to do any cleanup necessary.  It kinda looks like it
451
    # isn't needed, but just in case, please keep it in for now.
452
    gas_finish
453
 
454
    # Did we find what we were looking for?  If not, flunk it.
455
    if [expr $x == 12] then { pass $testname } else { fail $testname }
456
}
457
 
458
proc do_h8300_movw {} {
459
    set testname "movw.s: h8300 movw tests"
460
    set x 0
461
 
462
    gas_start "movw.s" "-al"
463
 
464
    # Check each instruction bit pattern to verify it got
465
    # assembled correctly.
466
    while 1 {
467
        expect {
468
            -re " +\[0-9\]+ 0000 0D01\[^\n\]*\n"   { set x [expr $x+1] }
469
            -re " +\[0-9\]+ 0002 79000010\[^\n\]*\n"   { set x [expr $x+1] }
470
            -re " +\[0-9\]+ 0006 6910\[^\n\]*\n"   { set x [expr $x+1] }
471
            -re " +\[0-9\]+ 0008 6F100010\[^\n\]*\n"   { set x [expr $x+1] }
472
            -re " +\[0-9\]+ 000c 6D10\[^\n\]*\n"   { set x [expr $x+1] }
473
            -re " +\[0-9\]+ 000e 6B000000\[^\n\]*\n"   { set x [expr $x+1] }
474
            -re " +\[0-9\]+ 0012 6990\[^\n\]*\n"   { set x [expr $x+1] }
475
            -re " +\[0-9\]+ 0014 6F900010\[^\n\]*\n"   { set x [expr $x+1] }
476
            -re " +\[0-9\]+ 0018 6D90\[^\n\]*\n"   { set x [expr $x+1] }
477
            -re " +\[0-9\]+ 001a 6B800000\[^\n\]*\n"   { set x [expr $x+1] }
478
            eof                                 { break }
479
        }
480
    }
481
 
482
    # This was intended to do any cleanup necessary.  It kinda looks like it
483
    # isn't needed, but just in case, please keep it in for now.
484
    gas_finish
485
 
486
    # Did we find what we were looking for?  If not, flunk it.
487
    if [expr $x == 10] then { pass $testname } else { fail $testname }
488
}
489
 
490
proc do_h8300_pushpop {} {
491
    set testname "pushpop.s: h8300 pushpop tests"
492
    set x 0
493
 
494
    gas_start "pushpop.s" "-al"
495
 
496
    # Check each instruction bit pattern to verify it got
497
    # assembled correctly.
498
    while 1 {
499
        expect {
500
            -re " +\[0-9\]+ 0000 6D70\[^\n\]*\n"   { set x [expr $x+1] }
501
            -re " +\[0-9\]+ 0002 6DF0\[^\n\]*\n"   { set x [expr $x+1] }
502
            eof                                 { break }
503
        }
504
    }
505
 
506
    # This was intended to do any cleanup necessary.  It kinda looks like it
507
    # isn't needed, but just in case, please keep it in for now.
508
    gas_finish
509
 
510
    # Did we find what we were looking for?  If not, flunk it.
511
    if [expr $x == 2] then { pass $testname } else { fail $testname }
512
}
513
 
514
proc do_h8300_rotate_shift {} {
515
    set testname "rotsh.s: h8300 rotate and shift tests"
516
    set x 0
517
 
518
    gas_start "rotsh.s" "-al"
519
 
520
    # Check each instruction bit pattern to verify it got
521
    # assembled correctly.
522
    while 1 {
523
        expect {
524
            -re " +\[0-9\]+ 0000 1288\[^\n\]*\n"   { set x [expr $x+1] }
525
            -re " +\[0-9\]+ 0002 1388\[^\n\]*\n"   { set x [expr $x+1] }
526
            -re " +\[0-9\]+ 0004 1208\[^\n\]*\n"   { set x [expr $x+1] }
527
            -re " +\[0-9\]+ 0006 1308\[^\n\]*\n"   { set x [expr $x+1] }
528
            -re " +\[0-9\]+ 0008 1088\[^\n\]*\n"   { set x [expr $x+1] }
529
            -re " +\[0-9\]+ 000a 1188\[^\n\]*\n"   { set x [expr $x+1] }
530
            -re " +\[0-9\]+ 000c 1008\[^\n\]*\n"   { set x [expr $x+1] }
531
            -re " +\[0-9\]+ 000e 1108\[^\n\]*\n"   { set x [expr $x+1] }
532
            eof                                 { break }
533
        }
534
    }
535
 
536
    # This was intended to do any cleanup necessary.  It kinda looks like it
537
    # isn't needed, but just in case, please keep it in for now.
538
    gas_finish
539
 
540
    # Did we find what we were looking for?  If not, flunk it.
541
    if [expr $x == 8] then { pass $testname } else { fail $testname }
542
}
543
 
544
proc do_h8300h_add_sub {} {
545
    set testname "addsubh.s: h8300h add/sub tests"
546
    set x 0
547
 
548
    gas_start "addsubh.s" "-al"
549
 
550
    # Check each instruction bit pattern to verify it got
551
    # assembled correctly.
552
    while 1 {
553
        expect {
554
            -re " +\[0-9\]+ 0000 8910\[^\n\]*\n"   { set x [expr $x+1] }
555
            -re " +\[0-9\]+ 0002 0819\[^\n\]*\n"   { set x [expr $x+1] }
556
            -re " +\[0-9\]+ 0004 79110020\[^\n\]*\n"   { set x [expr $x+1] }
557
            -re " +\[0-9\]+ 0008 0912\[^\n\]*\n"   { set x [expr $x+1] }
558
            -re " +\[0-9\]+ 000a 7A110000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
559
            -re " +\[0-9\]+ 0010 0A92\[^\n\]*\n"   { set x [expr $x+1] }
560
            -re " +\[0-9\]+ 0012 0B04\[^\n\]*\n"   { set x [expr $x+1] }
561
            -re " +\[0-9\]+ 0014 0B85\[^\n\]*\n"   { set x [expr $x+1] }
562
            -re " +\[0-9\]+ 0016 0B96\[^\n\]*\n"   { set x [expr $x+1] }
563
            -re " +\[0-9\]+ 0018 0E89\[^\n\]*\n"   { set x [expr $x+1] }
564
            -re " +\[0-9\]+ 001a 9210\[^\n\]*\n"   { set x [expr $x+1] }
565
            -re " +\[0-9\]+ 001c 1889\[^\n\]*\n"   { set x [expr $x+1] }
566
            -re " +\[0-9\]+ 001e 79310010\[^\n\]*\n"   { set x [expr $x+1] }
567
            -re " +\[0-9\]+ 0022 1901\[^\n\]*\n"   { set x [expr $x+1] }
568
            -re " +\[0-9\]+ 0024 7A310000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
569
            -re " +\[0-9\]+ 002a 1A92\[^\n\]*\n"   { set x [expr $x+1] }
570
            -re " +\[0-9\]+ 002c 1B04\[^\n\]*\n"   { set x [expr $x+1] }
571
            -re " +\[0-9\]+ 002e 1B85\[^\n\]*\n"   { set x [expr $x+1] }
572
            -re " +\[0-9\]+ 0030 1B96\[^\n\]*\n"   { set x [expr $x+1] }
573
            -re " +\[0-9\]+ 0032 1E89\[^\n\]*\n"   { set x [expr $x+1] }
574
            -re " +\[0-9\]+ 0034 B210\[^\n\]*\n"   { set x [expr $x+1] }
575
            timeout                             { perror "timeout\n; break }
576
            eof                                 { break }
577
        }
578
    }
579
 
580
    # This was intended to do any cleanup necessary.  It kinda looks like it
581
    # isn't needed, but just in case, please keep it in for now.
582
    gas_finish
583
 
584
    # Did we find what we were looking for?  If not, flunk it.
585
    if [expr $x == 21] then { pass $testname } else { fail $testname }
586
}
587
 
588
proc do_h8300h_logical {} {
589
    set testname "logicalh.s: h8300h logical tests"
590
    set x 0
591
 
592
    gas_start "logicalh.s" "-al"
593
 
594
    # Check each instruction bit pattern to verify it got
595
    # assembled correctly.
596
    while 1 {
597
        expect {
598
            -re " +\[0-9\]+ 0000 E910\[^\n\]*\n"   { set x [expr $x+1] }
599
            -re " +\[0-9\]+ 0002 1691\[^\n\]*\n"   { set x [expr $x+1] }
600
            -re " +\[0-9\]+ 0004 79610020\[^\n\]*\n"   { set x [expr $x+1] }
601
            -re " +\[0-9\]+ 0008 6611\[^\n\]*\n"   { set x [expr $x+1] }
602
            -re " +\[0-9\]+ 000a 7A610000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
603
            -re " +\[0-9\]+ 0010 01F06611\[^\n\]*\n"   { set x [expr $x+1] }
604
            -re " +\[0-9\]+ 0014 0610\[^\n\]*\n"   { set x [expr $x+1] }
605
            -re " +\[0-9\]+ 0016 C810\[^\n\]*\n"   { set x [expr $x+1] }
606
            -re " +\[0-9\]+ 0018 1498\[^\n\]*\n"   { set x [expr $x+1] }
607
            -re " +\[0-9\]+ 001a 79410020\[^\n\]*\n"   { set x [expr $x+1] }
608
            -re " +\[0-9\]+ 001e 6411\[^\n\]*\n"   { set x [expr $x+1] }
609
            -re " +\[0-9\]+ 0020 7A410000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
610
            -re " +\[0-9\]+ 0026 01F06411\[^\n\]*\n"   { set x [expr $x+1] }
611
            -re " +\[0-9\]+ 002a 0410\[^\n\]*\n"   { set x [expr $x+1] }
612
            -re " +\[0-9\]+ 002c D810\[^\n\]*\n"   { set x [expr $x+1] }
613
            -re " +\[0-9\]+ 002e 1589\[^\n\]*\n"   { set x [expr $x+1] }
614
            -re " +\[0-9\]+ 0030 79510020\[^\n\]*\n"   { set x [expr $x+1] }
615
            -re " +\[0-9\]+ 0034 6511\[^\n\]*\n"   { set x [expr $x+1] }
616
            -re " +\[0-9\]+ 0036 7A510000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
617
            -re " +\[0-9\]+ 003c 01F06511\[^\n\]*\n"   { set x [expr $x+1] }
618
            -re " +\[0-9\]+ 0040 0510\[^\n\]*\n"   { set x [expr $x+1] }
619
            -re " +\[0-9\]+ 0042 1788\[^\n\]*\n"   { set x [expr $x+1] }
620
            -re " +\[0-9\]+ 0044 1790\[^\n\]*\n"   { set x [expr $x+1] }
621
            -re " +\[0-9\]+ 0046 17B0\[^\n\]*\n"   { set x [expr $x+1] }
622
            -re " +\[0-9\]+ 0048 1708\[^\n\]*\n"   { set x [expr $x+1] }
623
            -re " +\[0-9\]+ 004a 1710\[^\n\]*\n"   { set x [expr $x+1] }
624
            -re " +\[0-9\]+ 004c 1730\[^\n\]*\n"   { set x [expr $x+1] }
625
            timeout                             { perror "timeout\n; break }
626
            eof                                 { break }
627
        }
628
    }
629
 
630
    # This was intended to do any cleanup necessary.  It kinda looks like it
631
    # isn't needed, but just in case, please keep it in for now.
632
    gas_finish
633
 
634
    # Did we find what we were looking for?  If not, flunk it.
635
    if [expr $x == 27] then { pass $testname } else { fail $testname }
636
}
637
 
638
proc do_h8300h_cbranch {} {
639
    set testname "cbranchh.s: h8300h conditional branch tests"
640
    set x 0
641
 
642
    gas_start "cbranchh.s" "-al"
643
 
644
    # Check each instruction bit pattern to verify it got
645
    # assembled correctly.
646
    while 1 {
647
        expect {
648
            -re " +\[0-9\]+ 0000 4000\[^\n\]*\n"   { set x [expr $x+1] }
649
            -re " +\[0-9\]+ 0002 4000\[^\n\]*\n"   { set x [expr $x+1] }
650
            -re " +\[0-9\]+ 0004 4100\[^\n\]*\n"   { set x [expr $x+1] }
651
            -re " +\[0-9\]+ 0006 4100\[^\n\]*\n"   { set x [expr $x+1] }
652
            -re " +\[0-9\]+ 0008 4200\[^\n\]*\n"   { set x [expr $x+1] }
653
            -re " +\[0-9\]+ 000a 4300\[^\n\]*\n"   { set x [expr $x+1] }
654
            -re " +\[0-9\]+ 000c 4400\[^\n\]*\n"   { set x [expr $x+1] }
655
            -re " +\[0-9\]+ 000e 4400\[^\n\]*\n"   { set x [expr $x+1] }
656
            -re " +\[0-9\]+ 0010 4500\[^\n\]*\n"   { set x [expr $x+1] }
657
            -re " +\[0-9\]+ 0012 4500\[^\n\]*\n"   { set x [expr $x+1] }
658
            -re " +\[0-9\]+ 0014 4600\[^\n\]*\n"   { set x [expr $x+1] }
659
            -re " +\[0-9\]+ 0016 4700\[^\n\]*\n"   { set x [expr $x+1] }
660
            -re " +\[0-9\]+ 0018 4800\[^\n\]*\n"   { set x [expr $x+1] }
661
            -re " +\[0-9\]+ 001a 4900\[^\n\]*\n"   { set x [expr $x+1] }
662
            -re " +\[0-9\]+ 001c 4A00\[^\n\]*\n"   { set x [expr $x+1] }
663
            -re " +\[0-9\]+ 001e 4B00\[^\n\]*\n"   { set x [expr $x+1] }
664
            -re " +\[0-9\]+ 0020 4C00\[^\n\]*\n"   { set x [expr $x+1] }
665
            -re " +\[0-9\]+ 0022 4D00\[^\n\]*\n"   { set x [expr $x+1] }
666
            -re " +\[0-9\]+ 0024 4E00\[^\n\]*\n"   { set x [expr $x+1] }
667
            -re " +\[0-9\]+ 0026 4F00\[^\n\]*\n"   { set x [expr $x+1] }
668
            -re " +\[0-9\]+ 0028 58000000\[^\n\]*\n"   { set x [expr $x+1] }
669
            -re " +\[0-9\]+ 002c 58000000\[^\n\]*\n"   { set x [expr $x+1] }
670
            -re " +\[0-9\]+ 0030 58100000\[^\n\]*\n"   { set x [expr $x+1] }
671
            -re " +\[0-9\]+ 0034 58100000\[^\n\]*\n"   { set x [expr $x+1] }
672
            -re " +\[0-9\]+ 0038 58200000\[^\n\]*\n"   { set x [expr $x+1] }
673
            -re " +\[0-9\]+ 003c 58300000\[^\n\]*\n"   { set x [expr $x+1] }
674
            -re " +\[0-9\]+ 0040 58400000\[^\n\]*\n"   { set x [expr $x+1] }
675
            -re " +\[0-9\]+ 0044 58400000\[^\n\]*\n"   { set x [expr $x+1] }
676
            -re " +\[0-9\]+ 0048 58500000\[^\n\]*\n"   { set x [expr $x+1] }
677
            -re " +\[0-9\]+ 004c 58500000\[^\n\]*\n"   { set x [expr $x+1] }
678
            -re " +\[0-9\]+ 0050 58600000\[^\n\]*\n"   { set x [expr $x+1] }
679
            -re " +\[0-9\]+ 0054 58700000\[^\n\]*\n"   { set x [expr $x+1] }
680
            -re " +\[0-9\]+ 0058 58800000\[^\n\]*\n"   { set x [expr $x+1] }
681
            -re " +\[0-9\]+ 005c 58900000\[^\n\]*\n"   { set x [expr $x+1] }
682
            -re " +\[0-9\]+ 0060 58A00000\[^\n\]*\n"   { set x [expr $x+1] }
683
            -re " +\[0-9\]+ 0064 58B00000\[^\n\]*\n"   { set x [expr $x+1] }
684
            -re " +\[0-9\]+ 0068 58C00000\[^\n\]*\n"   { set x [expr $x+1] }
685
            -re " +\[0-9\]+ 006c 58D00000\[^\n\]*\n"   { set x [expr $x+1] }
686
            -re " +\[0-9\]+ 0070 58E00000\[^\n\]*\n"   { set x [expr $x+1] }
687
            -re " +\[0-9\]+ 0074 58F00000\[^\n\]*\n"   { set x [expr $x+1] }
688
            timeout                             { perror "timeout\n; break }
689
            eof                                 { break }
690
        }
691
    }
692
 
693
    # This was intended to do any cleanup necessary.  It kinda looks like it
694
    # isn't needed, but just in case, please keep it in for now.
695
    gas_finish
696
 
697
    # Did we find what we were looking for?  If not, flunk it.
698
    if [expr $x == 40] then { pass $testname } else { fail $testname }
699
}
700
proc do_h8300h_bitops1 {} {
701
    set testname "bitops1h.s: h8300h bitops tests #1"
702
    set x 0
703
 
704
    gas_start "bitops1h.s" "-al"
705
 
706
    # Check each instruction bit pattern to verify it got
707
    # assembled correctly.
708
    while 1 {
709
        expect {
710
            -re " +\[0-9\]+ 0000 7608\[^\n\]*\n"   { set x [expr $x+1] }
711
            -re " +\[0-9\]+ 0002 7C007600\[^\n\]*\n"   { set x [expr $x+1] }
712
            -re " +\[0-9\]+ 0006 7E407600\[^\n\]*\n"   { set x [expr $x+1] }
713
            -re " +\[0-9\]+ 000a 7208\[^\n\]*\n"   { set x [expr $x+1] }
714
            -re " +\[0-9\]+ 000c 7D007200\[^\n\]*\n"   { set x [expr $x+1] }
715
            -re " +\[0-9\]+ 0010 7F407200\[^\n\]*\n"   { set x [expr $x+1] }
716
            -re " +\[0-9\]+ 0014 6298\[^\n\]*\n"   { set x [expr $x+1] }
717
            -re " +\[0-9\]+ 0016 7D006290\[^\n\]*\n"   { set x [expr $x+1] }
718
            -re " +\[0-9\]+ 001a 7F406290\[^\n\]*\n"   { set x [expr $x+1] }
719
            -re " +\[0-9\]+ 001e 7688\[^\n\]*\n"   { set x [expr $x+1] }
720
            -re " +\[0-9\]+ 0020 7C007680\[^\n\]*\n"   { set x [expr $x+1] }
721
            -re " +\[0-9\]+ 0024 7E407680\[^\n\]*\n"   { set x [expr $x+1] }
722
            -re " +\[0-9\]+ 0028 7788\[^\n\]*\n"   { set x [expr $x+1] }
723
            -re " +\[0-9\]+ 002a 7C007780\[^\n\]*\n"   { set x [expr $x+1] }
724
            -re " +\[0-9\]+ 002e 7E407780\[^\n\]*\n"   { set x [expr $x+1] }
725
            timeout                             { perror "timeout\n; break }
726
            eof                                 { break }
727
        }
728
    }
729
 
730
    # This was intended to do any cleanup necessary.  It kinda looks like it
731
    # isn't needed, but just in case, please keep it in for now.
732
    gas_finish
733
 
734
    # Did we find what we were looking for?  If not, flunk it.
735
    if [expr $x == 15] then { pass $testname } else { fail $testname }
736
}
737
 
738
proc do_h8300h_bitops2 {} {
739
    set testname "bitops2h.s: h8300h bitops tests #2"
740
    set x 0
741
 
742
    gas_start "bitops2h.s" "-al"
743
 
744
    # Check each instruction bit pattern to verify it got
745
    # assembled correctly.
746
    while 1 {
747
        expect {
748
            -re " +\[0-9\]+ 0000 7488\[^\n\]*\n"   { set x [expr $x+1] }
749
            -re " +\[0-9\]+ 0002 7C007480\[^\n\]*\n"   { set x [expr $x+1] }
750
            -re " +\[0-9\]+ 0006 7E407480\[^\n\]*\n"   { set x [expr $x+1] }
751
            -re " +\[0-9\]+ 000a 6788\[^\n\]*\n"   { set x [expr $x+1] }
752
            -re " +\[0-9\]+ 000c 7D006780\[^\n\]*\n"   { set x [expr $x+1] }
753
            -re " +\[0-9\]+ 0010 7F406780\[^\n\]*\n"   { set x [expr $x+1] }
754
            -re " +\[0-9\]+ 0014 7588\[^\n\]*\n"   { set x [expr $x+1] }
755
            -re " +\[0-9\]+ 0016 7C007580\[^\n\]*\n"   { set x [expr $x+1] }
756
            -re " +\[0-9\]+ 001a 7E407580\[^\n\]*\n"   { set x [expr $x+1] }
757
            -re " +\[0-9\]+ 001e 7708\[^\n\]*\n"   { set x [expr $x+1] }
758
            -re " +\[0-9\]+ 0020 7C007700\[^\n\]*\n"   { set x [expr $x+1] }
759
            -re " +\[0-9\]+ 0024 7E407700\[^\n\]*\n"   { set x [expr $x+1] }
760
            timeout                             { perror "timeout\n; break }
761
            eof                                 { break }
762
        }
763
    }
764
 
765
    # This was intended to do any cleanup necessary.  It kinda looks like it
766
    # isn't needed, but just in case, please keep it in for now.
767
    gas_finish
768
 
769
    # Did we find what we were looking for?  If not, flunk it.
770
    if [expr $x == 12] then { pass $testname } else { fail $testname }
771
}
772
 
773
proc do_h8300h_bitops3 {} {
774
    set testname "bitops3h.s: h8300h bitops tests #3"
775
    set x 0
776
 
777
    gas_start "bitops3h.s" "-al"
778
 
779
    # Check each instruction bit pattern to verify it got
780
    # assembled correctly.
781
    while 1 {
782
        expect {
783
            -re " +\[0-9\]+ 0000 7108\[^\n\]*\n"   { set x [expr $x+1] }
784
            -re " +\[0-9\]+ 0002 7D007100\[^\n\]*\n"   { set x [expr $x+1] }
785
            -re " +\[0-9\]+ 0006 7F407100\[^\n\]*\n"   { set x [expr $x+1] }
786
            -re " +\[0-9\]+ 000a 6198\[^\n\]*\n"   { set x [expr $x+1] }
787
            -re " +\[0-9\]+ 000c 7D006190\[^\n\]*\n"   { set x [expr $x+1] }
788
            -re " +\[0-9\]+ 0010 7F406190\[^\n\]*\n"   { set x [expr $x+1] }
789
            -re " +\[0-9\]+ 0014 7008\[^\n\]*\n"   { set x [expr $x+1] }
790
            -re " +\[0-9\]+ 0016 7D007000\[^\n\]*\n"   { set x [expr $x+1] }
791
            -re " +\[0-9\]+ 001a 7F407000\[^\n\]*\n"   { set x [expr $x+1] }
792
            -re " +\[0-9\]+ 001e 6098\[^\n\]*\n"   { set x [expr $x+1] }
793
            -re " +\[0-9\]+ 0020 7D006090\[^\n\]*\n"   { set x [expr $x+1] }
794
            -re " +\[0-9\]+ 0024 7F406090\[^\n\]*\n"   { set x [expr $x+1] }
795
            timeout                             { perror "timeout\n; break }
796
            eof                                 { break }
797
        }
798
    }
799
 
800
    # This was intended to do any cleanup necessary.  It kinda looks like it
801
    # isn't needed, but just in case, please keep it in for now.
802
    gas_finish
803
 
804
    # Did we find what we were looking for?  If not, flunk it.
805
    if [expr $x == 12] then { pass $testname } else { fail $testname }
806
}
807
 
808
proc do_h8300h_bitops4 {} {
809
    set testname "bitops4h.s: h8300h bitops tests #4"
810
    set x 0
811
 
812
    gas_start "bitops4h.s" "-al"
813
 
814
    # Check each instruction bit pattern to verify it got
815
    # assembled correctly.
816
    while 1 {
817
        expect {
818
            -re " +\[0-9\]+ 0000 7408\[^\n\]*\n"   { set x [expr $x+1] }
819
            -re " +\[0-9\]+ 0002 7C007400\[^\n\]*\n"   { set x [expr $x+1] }
820
            -re " +\[0-9\]+ 0006 7E407400\[^\n\]*\n"   { set x [expr $x+1] }
821
            -re " +\[0-9\]+ 000a 6708\[^\n\]*\n"   { set x [expr $x+1] }
822
            -re " +\[0-9\]+ 000c 7D006700\[^\n\]*\n"   { set x [expr $x+1] }
823
            -re " +\[0-9\]+ 0010 7F406700\[^\n\]*\n"   { set x [expr $x+1] }
824
            -re " +\[0-9\]+ 0014 7308\[^\n\]*\n"   { set x [expr $x+1] }
825
            -re " +\[0-9\]+ 0016 7C007300\[^\n\]*\n"   { set x [expr $x+1] }
826
            -re " +\[0-9\]+ 001a 7E407300\[^\n\]*\n"   { set x [expr $x+1] }
827
            -re " +\[0-9\]+ 001e 6398\[^\n\]*\n"   { set x [expr $x+1] }
828
            -re " +\[0-9\]+ 0020 7C006390\[^\n\]*\n"   { set x [expr $x+1] }
829
            -re " +\[0-9\]+ 0024 7E406390\[^\n\]*\n"   { set x [expr $x+1] }
830
            -re " +\[0-9\]+ 0028 7508\[^\n\]*\n"   { set x [expr $x+1] }
831
            -re " +\[0-9\]+ 002a 7C007500\[^\n\]*\n"   { set x [expr $x+1] }
832
            -re " +\[0-9\]+ 002e 7E407500\[^\n\]*\n"   { set x [expr $x+1] }
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 == 15] then { pass $testname } else { fail $testname }
844
}
845
 
846
proc do_h8300h_branch {} {
847
    set testname "branchh.s: h8300h branch tests"
848
    set x 0
849
 
850
    gas_start "branchh.s" "-al"
851
 
852
    # Check each instruction bit pattern to verify it got
853
    # assembled correctly.
854
    while 1 {
855
        expect {
856
            -re " +\[0-9\]+ 0000 5500\[^\n\]*\n"   { set x [expr $x+1] }
857
            -re " +\[0-9\]+ 0002 5C000000\[^\n\]*\n"   { set x [expr $x+1] }
858
            -re " +\[0-9\]+ 0006 5A000000\[^\n\]*\n"   { set x [expr $x+1] }
859
            -re " +\[0-9\]+ 000a 5900\[^\n\]*\n"   { set x [expr $x+1] }
860
            -re " +\[0-9\]+ 000c 5B00\[^\n\]*\n"   { set x [expr $x+1] }
861
            -re " +\[0-9\]+ 000e 5E000000\[^\n\]*\n"   { set x [expr $x+1] }
862
            -re " +\[0-9\]+ 0012 5D00\[^\n\]*\n"   { set x [expr $x+1] }
863
            -re " +\[0-9\]+ 0014 5F00\[^\n\]*\n"   { set x [expr $x+1] }
864
            timeout                             { perror "timeout\n; break }
865
            eof                                 { break }
866
        }
867
    }
868
 
869
    # This was intended to do any cleanup necessary.  It kinda looks like it
870
    # isn't needed, but just in case, please keep it in for now.
871
    gas_finish
872
 
873
    # Did we find what we were looking for?  If not, flunk it.
874
    if [expr $x == 8] then { pass $testname } else { fail $testname }
875
}
876
 
877
proc do_h8300h_compare {} {
878
    set testname "compareh.s: h8300h compare tests"
879
    set x 0
880
 
881
    gas_start "compareh.s" "-al"
882
 
883
    # Check each instruction bit pattern to verify it got
884
    # assembled correctly.
885
    while 1 {
886
        expect {
887
            -re " +\[0-9\]+ 0000 A800\[^\n\]*\n"   { set x [expr $x+1] }
888
            -re " +\[0-9\]+ 0002 1C08\[^\n\]*\n"   { set x [expr $x+1] }
889
            -re " +\[0-9\]+ 0004 79200020\[^\n\]*\n"   { set x [expr $x+1] }
890
            -re " +\[0-9\]+ 0008 1D01\[^\n\]*\n"   { set x [expr $x+1] }
891
            -re " +\[0-9\]+ 000a 7A200000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
892
            -re " +\[0-9\]+ 0010 1F81\[^\n\]*\n"   { set x [expr $x+1] }
893
            timeout                             { perror "timeout\n; break }
894
            eof                                 { break }
895
        }
896
    }
897
 
898
    # This was intended to do any cleanup necessary.  It kinda looks like it
899
    # isn't needed, but just in case, please keep it in for now.
900
    gas_finish
901
 
902
    # Did we find what we were looking for?  If not, flunk it.
903
    if [expr $x == 6] then { pass $testname } else { fail $testname }
904
}
905
 
906
proc do_h8300h_decimal {} {
907
    set testname "decimalh.s: h8300h decimal tests"
908
    set x 0
909
 
910
    gas_start "decimalh.s" "-al"
911
 
912
    # Check each instruction bit pattern to verify it got
913
    # assembled correctly.
914
    while 1 {
915
        expect {
916
            -re " +\[0-9\]+ 0000 0F08\[^\n\]*\n"   { set x [expr $x+1] }
917
            -re " +\[0-9\]+ 0002 1F08\[^\n\]*\n"   { set x [expr $x+1] }
918
            eof                                 { break }
919
        }
920
    }
921
 
922
    # This was intended to do any cleanup necessary.  It kinda looks like it
923
    # isn't needed, but just in case, please keep it in for now.
924
    gas_finish
925
 
926
    # Did we find what we were looking for?  If not, flunk it.
927
    if [expr $x == 2] then { pass $testname } else { fail $testname }
928
}
929
 
930
proc do_h8300h_incdec {} {
931
    set testname "incdech.s: h8300h incdec tests"
932
    set x 0
933
 
934
    gas_start "incdech.s" "-al"
935
 
936
    # Check each instruction bit pattern to verify it got
937
    # assembled correctly.
938
    while 1 {
939
        expect {
940
            -re " +\[0-9\]+ 0000 1A08\[^\n\]*\n"   { set x [expr $x+1] }
941
            -re " +\[0-9\]+ 0002 1B50\[^\n\]*\n"   { set x [expr $x+1] }
942
            -re " +\[0-9\]+ 0004 1BD0\[^\n\]*\n"   { set x [expr $x+1] }
943
            -re " +\[0-9\]+ 0006 1B70\[^\n\]*\n"   { set x [expr $x+1] }
944
            -re " +\[0-9\]+ 0008 1BF0\[^\n\]*\n"   { set x [expr $x+1] }
945
            -re " +\[0-9\]+ 000a 0A08\[^\n\]*\n"   { set x [expr $x+1] }
946
            -re " +\[0-9\]+ 000c 0B50\[^\n\]*\n"   { set x [expr $x+1] }
947
            -re " +\[0-9\]+ 000e 0BD0\[^\n\]*\n"   { set x [expr $x+1] }
948
            -re " +\[0-9\]+ 0010 0B70\[^\n\]*\n"   { set x [expr $x+1] }
949
            -re " +\[0-9\]+ 0012 0BF0\[^\n\]*\n"   { set x [expr $x+1] }
950
            eof                                 { break }
951
        }
952
    }
953
 
954
    # This was intended to do any cleanup necessary.  It kinda looks like it
955
    # isn't needed, but just in case, please keep it in for now.
956
    gas_finish
957
 
958
    # Did we find what we were looking for?  If not, flunk it.
959
    if [expr $x == 10] then { pass $testname } else { fail $testname }
960
}
961
 
962
proc do_h8300h_divmul {} {
963
    set testname "divmulh.s: h8300h divmul tests"
964
    set x 0
965
 
966
    gas_start "divmulh.s" "-al"
967
 
968
    # Check each instruction bit pattern to verify it got
969
    # assembled correctly.
970
    while 1 {
971
        expect {
972
            -re " +\[0-9\]+ 0000 5181\[^\n\]*\n"   { set x [expr $x+1] }
973
            -re " +\[0-9\]+ 0002 5301\[^\n\]*\n"   { set x [expr $x+1] }
974
            -re " +\[0-9\]+ 0004 01D05181\[^\n\]*\n"   { set x [expr $x+1] }
975
            -re " +\[0-9\]+ 0008 01D05301\[^\n\]*\n"   { set x [expr $x+1] }
976
            -re " +\[0-9\]+ 000c 5081\[^\n\]*\n"   { set x [expr $x+1] }
977
            -re " +\[0-9\]+ 000e 5201\[^\n\]*\n"   { set x [expr $x+1] }
978
            -re " +\[0-9\]+ 0010 01C05081\[^\n\]*\n"   { set x [expr $x+1] }
979
            -re " +\[0-9\]+ 0014 01C05201\[^\n\]*\n"   { set x [expr $x+1] }
980
            eof                                 { break }
981
        }
982
    }
983
 
984
    # This was intended to do any cleanup necessary.  It kinda looks like it
985
    # isn't needed, but just in case, please keep it in for now.
986
    gas_finish
987
 
988
    # Did we find what we were looking for?  If not, flunk it.
989
    if [expr $x == 8] then { pass $testname } else { fail $testname }
990
}
991
 
992
proc do_h8300h_misc {} {
993
    set testname "misch.s: h8300h misc tests"
994
    set x 0
995
 
996
    gas_start "misch.s" "-al"
997
 
998
    # Check each instruction bit pattern to verify it got
999
    # assembled correctly.
1000
    while 1 {
1001
        expect {
1002
            -re " +\[0-9\]+ 0000 7B5C598F\[^\n\]*\n"   { set x [expr $x+1] }
1003
            -re " +\[0-9\]+ 0004 7BD4598F\[^\n\]*\n"   { set x [expr $x+1] }
1004
            -re " +\[0-9\]+ 0008 0700\[^\n\]*\n"   { set x [expr $x+1] }
1005
            -re " +\[0-9\]+ 000a 0308\[^\n\]*\n"   { set x [expr $x+1] }
1006
            -re " +\[0-9\]+ 000c 01406900\[^\n\]*\n"   { set x [expr $x+1] }
1007
            -re " +\[0-9\]+ 0010 01406F00\[^\n\]*\n +\[0-9\]+ +0010\[^\n\]*\n"   { set x [expr $x+1] }
1008
            -re " +\[0-9\]+ 0016 01407800\[^\n\]*\n +\[0-9\]+ +6B200000\[^\n\]*\n +\[0-9\]+ +0020\[^\n\]*\n"   { set x [expr $x+1] }
1009
            -re " +\[0-9\]+ 0020 01406D00\[^\n\]*\n"   { set x [expr $x+1] }
1010
            -re " +\[0-9\]+ 0024 01406B00\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1011
            -re " +\[0-9\]+ 002a 01406B20\[^\n\]*\n +\[0-9\]+ +00000000\[^\n\]*\n"   { set x [expr $x+1] }
1012
            -re " +\[0-9\]+ 0032 0000\[^\n\]*\n"   { set x [expr $x+1] }
1013
            -re " +\[0-9\]+ 0034 5670\[^\n\]*\n"   { set x [expr $x+1] }
1014
            -re " +\[0-9\]+ 0036 5470\[^\n\]*\n"   { set x [expr $x+1] }
1015
            -re " +\[0-9\]+ 0038 0180\[^\n\]*\n"   { set x [expr $x+1] }
1016
            -re " +\[0-9\]+ 003a 0208\[^\n\]*\n"   { set x [expr $x+1] }
1017
            -re " +\[0-9\]+ 003c 01406980\[^\n\]*\n"   { set x [expr $x+1] }
1018
            -re " +\[0-9\]+ 0040 01406F80\[^\n\]*\n +\[0-9\]+ +0010\[^\n\]*\n"   { set x [expr $x+1] }
1019
            -re " +\[0-9\]+ 0046 01407800\[^\n\]*\n +\[0-9\]+ +6BA00000\[^\n\]*\n +\[0-9\]+ +0020\[^\n\]*\n"   { set x [expr $x+1] }
1020
            -re " +\[0-9\]+ 0050 01406D80\[^\n\]*\n"   { set x [expr $x+1] }
1021
            -re " +\[0-9\]+ 0054 01406B80\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1022
            -re " +\[0-9\]+ 005a 01406BA0\[^\n\]*\n +\[0-9\]+ +00000000\[^\n\]*\n"   { set x [expr $x+1] }
1023
            eof                                 { break }
1024
        }
1025
    }
1026
 
1027
    # This was intended to do any cleanup necessary.  It kinda looks like it
1028
    # isn't needed, but just in case, please keep it in for now.
1029
    gas_finish
1030
 
1031
    # Did we find what we were looking for?  If not, flunk it.
1032
    if [expr $x == 21] then { pass $testname } else { fail $testname }
1033
 
1034
    setup_xfail "h8300*-*-*"
1035
    fail "h8300h movfpe/movtpe tests"
1036
}
1037
 
1038
proc do_h8300h_movb {} {
1039
    set testname "movbh.s: h8300h movb tests"
1040
    set x 0
1041
 
1042
    gas_start "movbh.s" "-al"
1043
 
1044
    # Check each instruction bit pattern to verify it got
1045
    # assembled correctly.
1046
    while 1 {
1047
        expect {
1048
            -re " +\[0-9\]+ 0000 0C89\[^\n\]*\n"   { set x [expr $x+1] }
1049
            -re " +\[0-9\]+ 0002 F810\[^\n\]*\n"   { set x [expr $x+1] }
1050
            -re " +\[0-9\]+ 0004 6818\[^\n\]*\n"   { set x [expr $x+1] }
1051
            -re " +\[0-9\]+ 0006 6E180010\[^\n\]*\n"   { set x [expr $x+1] }
1052
            -re " +\[0-9\]+ 000a 78106A28\[^\n\]*\n +\[0-9\]+ +00000020\[^\n\]*\n"   { set x [expr $x+1] }
1053
            -re " +\[0-9\]+ 0012 6C18\[^\n\]*\n"   { set x [expr $x+1] }
1054
            -re " +\[0-9\]+ 0014 2810\[^\n\]*\n"   { set x [expr $x+1] }
1055
            -re " +\[0-9\]+ 0016 6A080000\[^\n\]*\n"   { set x [expr $x+1] }
1056
            -re " +\[0-9\]+ 001a 6A280000\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1057
            -re " +\[0-9\]+ 0020 6898\[^\n\]*\n"   { set x [expr $x+1] }
1058
            -re " +\[0-9\]+ 0022 6E980010\[^\n\]*\n"   { set x [expr $x+1] }
1059
            -re " +\[0-9\]+ 0026 78106AA8\[^\n\]*\n +\[0-9\]+ +00000020\[^\n\]*\n"   { set x [expr $x+1] }
1060
            -re " +\[0-9\]+ 002e 6C98\[^\n\]*\n"   { set x [expr $x+1] }
1061
            -re " +\[0-9\]+ 0030 3810\[^\n\]*\n"   { set x [expr $x+1] }
1062
            -re " +\[0-9\]+ 0032 6A880000\[^\n\]*\n"   { set x [expr $x+1] }
1063
            -re " +\[0-9\]+ 0036 6AA80000\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1064
            eof                                 { break }
1065
        }
1066
    }
1067
 
1068
    # This was intended to do any cleanup necessary.  It kinda looks like it
1069
    # isn't needed, but just in case, please keep it in for now.
1070
    gas_finish
1071
 
1072
    # Did we find what we were looking for?  If not, flunk it.
1073
    if [expr $x == 16] then { pass $testname } else { fail $testname }
1074
}
1075
 
1076
proc do_h8300h_movw {} {
1077
    set testname "movwh.s: h8300h movw tests"
1078
    set x 0
1079
 
1080
    gas_start "movwh.s" "-al"
1081
 
1082
    # Check each instruction bit pattern to verify it got
1083
    # assembled correctly.
1084
    while 1 {
1085
        expect {
1086
            -re " +\[0-9\]+ 0000 0D01\[^\n\]*\n"   { set x [expr $x+1] }
1087
            -re " +\[0-9\]+ 0002 79000010\[^\n\]*\n"   { set x [expr $x+1] }
1088
            -re " +\[0-9\]+ 0006 6910\[^\n\]*\n"   { set x [expr $x+1] }
1089
            -re " +\[0-9\]+ 0008 6F100010\[^\n\]*\n"   { set x [expr $x+1] }
1090
            -re " +\[0-9\]+ 000c 78106B20\[^\n\]*\n +\[0-9\]+ +00000020\[^\n\]*\n"   { set x [expr $x+1] }
1091
            -re " +\[0-9\]+ 0014 6D10\[^\n\]*\n"   { set x [expr $x+1] }
1092
            -re " +\[0-9\]+ 0016 6B000000\[^\n\]*\n"   { set x [expr $x+1] }
1093
            -re " +\[0-9\]+ 001a 6B200000\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1094
            -re " +\[0-9\]+ 0020 6990\[^\n\]*\n"   { set x [expr $x+1] }
1095
            -re " +\[0-9\]+ 0022 6F900010\[^\n\]*\n"   { set x [expr $x+1] }
1096
            -re " +\[0-9\]+ 0026 78106BA0\[^\n\]*\n +\[0-9\]+ +00000020\[^\n\]*\n"   { set x [expr $x+1] }
1097
            -re " +\[0-9\]+ 002e 6D90\[^\n\]*\n"   { set x [expr $x+1] }
1098
            -re " +\[0-9\]+ 0030 6B800000\[^\n\]*\n"   { set x [expr $x+1] }
1099
            -re " +\[0-9\]+ 0034 6BA00000\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1100
            eof                                 { break }
1101
        }
1102
    }
1103
 
1104
    # This was intended to do any cleanup necessary.  It kinda looks like it
1105
    # isn't needed, but just in case, please keep it in for now.
1106
    gas_finish
1107
 
1108
    # Did we find what we were looking for?  If not, flunk it.
1109
    if [expr $x == 14] then { pass $testname } else { fail $testname }
1110
}
1111
 
1112
proc do_h8300h_movl {} {
1113
    set testname "movlh.s: h8300h movl tests"
1114
    set x 0
1115
 
1116
    gas_start "movlh.s" "-al"
1117
 
1118
    # Check each instruction bit pattern to verify it got
1119
    # assembled correctly.
1120
    while 1 {
1121
        expect {
1122
            -re " +\[0-9\]+ 0000 0F81\[^\n\]*\n"   { set x [expr $x+1] }
1123
            -re " +\[0-9\]+ 0002 7A000000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
1124
            -re " +\[0-9\]+ 0008 01006910\[^\n\]*\n"   { set x [expr $x+1] }
1125
            -re " +\[0-9\]+ 000c 01006F10\[^\n\]*\n +\[0-9\]+ +0010\[^\n\]*\n"   { set x [expr $x+1] }
1126
            -re " +\[0-9\]+ 0012 01007810\[^\n\]*\n +\[0-9\]+ +6B200000\[^\n\]*\n +\[0-9\]+ +0020\[^\n\]*\n"   { set x [expr $x+1] }
1127
            -re " +\[0-9\]+ 001c 01006D10\[^\n\]*\n"   { set x [expr $x+1] }
1128
            -re " +\[0-9\]+ 0020 01006B00\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1129
            -re " +\[0-9\]+ 0026 01006B20\[^\n\]*\n +\[0-9\]+ +00000000\[^\n\]*\n"   { set x [expr $x+1] }
1130
            -re " +\[0-9\]+ 002e 01006990\[^\n\]*\n"   { set x [expr $x+1] }
1131
            -re " +\[0-9\]+ 0032 01006F90\[^\n\]*\n +\[0-9\]+ +0010\[^\n\]*\n"   { set x [expr $x+1] }
1132
            -re " +\[0-9\]+ 0038 01007890\[^\n\]*\n +\[0-9\]+ +6BA00000\[^\n\]*\n +\[0-9\]+ +0020\[^\n\]*\n"   { set x [expr $x+1] }
1133
            -re " +\[0-9\]+ 0042 01006D90\[^\n\]*\n"   { set x [expr $x+1] }
1134
            -re " +\[0-9\]+ 0046 01006B80\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1135
            -re " +\[0-9\]+ 004c 01006BA0\[^\n\]*\n +\[0-9\]+ +00000000\[^\n\]*\n"   { set x [expr $x+1] }
1136
            eof                                 { break }
1137
        }
1138
    }
1139
 
1140
    # This was intended to do any cleanup necessary.  It kinda looks like it
1141
    # isn't needed, but just in case, please keep it in for now.
1142
    gas_finish
1143
 
1144
    # Did we find what we were looking for?  If not, flunk it.
1145
    if [expr $x == 14] then { pass $testname } else { fail $testname }
1146
}
1147
 
1148
proc do_h8300h_pushpop {} {
1149
    set testname "pushpoph.s: h8300h pushpop tests"
1150
    set x 0
1151
 
1152
    gas_start "pushpoph.s" "-al"
1153
 
1154
    # Check each instruction bit pattern to verify it got
1155
    # assembled correctly.
1156
    while 1 {
1157
        expect {
1158
            -re " +\[0-9\]+ 0000 6D70\[^\n\]*\n"   { set x [expr $x+1] }
1159
            -re " +\[0-9\]+ 0002 01006D70\[^\n\]*\n"   { set x [expr $x+1] }
1160
            -re " +\[0-9\]+ 0006 6DF0\[^\n\]*\n"   { set x [expr $x+1] }
1161
            -re " +\[0-9\]+ 0008 01006DF0\[^\n\]*\n"   { set x [expr $x+1] }
1162
            eof                                 { break }
1163
        }
1164
    }
1165
 
1166
    # This was intended to do any cleanup necessary.  It kinda looks like it
1167
    # isn't needed, but just in case, please keep it in for now.
1168
    gas_finish
1169
 
1170
    # Did we find what we were looking for?  If not, flunk it.
1171
    if [expr $x == 4] then { pass $testname } else { fail $testname }
1172
}
1173
 
1174
proc do_h8300h_rotate_shift {} {
1175
    set testname "rotshh.s: h8300h rotate and shift tests"
1176
    set x 0
1177
 
1178
    gas_start "rotshh.s" "-al"
1179
 
1180
    # Check each instruction bit pattern to verify it got
1181
    # assembled correctly.
1182
    while 1 {
1183
        expect {
1184
            -re " +\[0-9\]+ 0000 1288\[^\n\]*\n"   { set x [expr $x+1] }
1185
            -re " +\[0-9\]+ 0002 1290\[^\n\]*\n"   { set x [expr $x+1] }
1186
            -re " +\[0-9\]+ 0004 12B0\[^\n\]*\n"   { set x [expr $x+1] }
1187
            -re " +\[0-9\]+ 0006 1388\[^\n\]*\n"   { set x [expr $x+1] }
1188
            -re " +\[0-9\]+ 0008 1390\[^\n\]*\n"   { set x [expr $x+1] }
1189
            -re " +\[0-9\]+ 000a 13B0\[^\n\]*\n"   { set x [expr $x+1] }
1190
            -re " +\[0-9\]+ 000c 1208\[^\n\]*\n"   { set x [expr $x+1] }
1191
            -re " +\[0-9\]+ 000e 1210\[^\n\]*\n"   { set x [expr $x+1] }
1192
            -re " +\[0-9\]+ 0010 1230\[^\n\]*\n"   { set x [expr $x+1] }
1193
            -re " +\[0-9\]+ 0012 1308\[^\n\]*\n"   { set x [expr $x+1] }
1194
            -re " +\[0-9\]+ 0014 1310\[^\n\]*\n"   { set x [expr $x+1] }
1195
            -re " +\[0-9\]+ 0016 1330\[^\n\]*\n"   { set x [expr $x+1] }
1196
            -re " +\[0-9\]+ 0018 1088\[^\n\]*\n"   { set x [expr $x+1] }
1197
            -re " +\[0-9\]+ 001a 1090\[^\n\]*\n"   { set x [expr $x+1] }
1198
            -re " +\[0-9\]+ 001c 10B0\[^\n\]*\n"   { set x [expr $x+1] }
1199
            -re " +\[0-9\]+ 001e 1188\[^\n\]*\n"   { set x [expr $x+1] }
1200
            -re " +\[0-9\]+ 0020 1190\[^\n\]*\n"   { set x [expr $x+1] }
1201
            -re " +\[0-9\]+ 0022 11B0\[^\n\]*\n"   { set x [expr $x+1] }
1202
            -re " +\[0-9\]+ 0024 1008\[^\n\]*\n"   { set x [expr $x+1] }
1203
            -re " +\[0-9\]+ 0026 1010\[^\n\]*\n"   { set x [expr $x+1] }
1204
            -re " +\[0-9\]+ 0028 1030\[^\n\]*\n"   { set x [expr $x+1] }
1205
            -re " +\[0-9\]+ 002a 1108\[^\n\]*\n"   { set x [expr $x+1] }
1206
            -re " +\[0-9\]+ 002c 1110\[^\n\]*\n"   { set x [expr $x+1] }
1207
            -re " +\[0-9\]+ 002e 1130\[^\n\]*\n"   { set x [expr $x+1] }
1208
            eof                                 { break }
1209
        }
1210
    }
1211
 
1212
    # This was intended to do any cleanup necessary.  It kinda looks like it
1213
    # isn't needed, but just in case, please keep it in for now.
1214
    gas_finish
1215
 
1216
    # Did we find what we were looking for?  If not, flunk it.
1217
    if [expr $x == 24] then { pass $testname } else { fail $testname }
1218
}
1219
 
1220
proc do_h8300h_extend {} {
1221
    set testname "extendh.s: h8300h extend tests"
1222
    set x 0
1223
 
1224
    gas_start "extendh.s" "-al"
1225
 
1226
    # Check each instruction bit pattern to verify it got
1227
    # assembled correctly.
1228
    while 1 {
1229
        expect {
1230
            -re " +\[0-9\]+ 0000 17D0\[^\n\]*\n"   { set x [expr $x+1] }
1231
            -re " +\[0-9\]+ 0002 17F0\[^\n\]*\n"   { set x [expr $x+1] }
1232
            -re " +\[0-9\]+ 0004 1750\[^\n\]*\n"   { set x [expr $x+1] }
1233
            -re " +\[0-9\]+ 0006 1770\[^\n\]*\n"   { set x [expr $x+1] }
1234
            eof                                 { break }
1235
        }
1236
    }
1237
 
1238
    # This was intended to do any cleanup necessary.  It kinda looks like it
1239
    # isn't needed, but just in case, please keep it in for now.
1240
    gas_finish
1241
 
1242
    # Did we find what we were looking for?  If not, flunk it.
1243
    if [expr $x == 4] then { pass $testname } else { fail $testname }
1244
}
1245
 
1246
proc do_h8300s_add_sub {} {
1247
    set testname "addsubs.s: h8300s add/sub tests"
1248
    set x 0
1249
 
1250
    gas_start "addsubs.s" "-al"
1251
 
1252
    # Check each instruction bit pattern to verify it got
1253
    # assembled correctly.
1254
    while 1 {
1255
        expect {
1256
            -re " +\[0-9\]+ 0000 8910\[^\n\]*\n"   { set x [expr $x+1] }
1257
            -re " +\[0-9\]+ 0002 0819\[^\n\]*\n"   { set x [expr $x+1] }
1258
            -re " +\[0-9\]+ 0004 79110020\[^\n\]*\n"   { set x [expr $x+1] }
1259
            -re " +\[0-9\]+ 0008 0912\[^\n\]*\n"   { set x [expr $x+1] }
1260
            -re " +\[0-9\]+ 000a 7A110000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
1261
            -re " +\[0-9\]+ 0010 0A92\[^\n\]*\n"   { set x [expr $x+1] }
1262
            -re " +\[0-9\]+ 0012 0B04\[^\n\]*\n"   { set x [expr $x+1] }
1263
            -re " +\[0-9\]+ 0014 0B85\[^\n\]*\n"   { set x [expr $x+1] }
1264
            -re " +\[0-9\]+ 0016 0B96\[^\n\]*\n"   { set x [expr $x+1] }
1265
            -re " +\[0-9\]+ 0018 0E89\[^\n\]*\n"   { set x [expr $x+1] }
1266
            -re " +\[0-9\]+ 001a 9210\[^\n\]*\n"   { set x [expr $x+1] }
1267
            -re " +\[0-9\]+ 001c 1889\[^\n\]*\n"   { set x [expr $x+1] }
1268
            -re " +\[0-9\]+ 001e 79310010\[^\n\]*\n"   { set x [expr $x+1] }
1269
            -re " +\[0-9\]+ 0022 1901\[^\n\]*\n"   { set x [expr $x+1] }
1270
            -re " +\[0-9\]+ 0024 7A310000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
1271
            -re " +\[0-9\]+ 002a 1A92\[^\n\]*\n"   { set x [expr $x+1] }
1272
            -re " +\[0-9\]+ 002c 1B04\[^\n\]*\n"   { set x [expr $x+1] }
1273
            -re " +\[0-9\]+ 002e 1B85\[^\n\]*\n"   { set x [expr $x+1] }
1274
            -re " +\[0-9\]+ 0030 1B96\[^\n\]*\n"   { set x [expr $x+1] }
1275
            -re " +\[0-9\]+ 0032 1E89\[^\n\]*\n"   { set x [expr $x+1] }
1276
            -re " +\[0-9\]+ 0034 B210\[^\n\]*\n"   { set x [expr $x+1] }
1277
            timeout                             { perror "timeout\n; break }
1278
            eof                                 { break }
1279
        }
1280
    }
1281
 
1282
    # This was intended to do any cleanup necessary.  It kinda looks like it
1283
    # isn't needed, but just in case, please keep it in for now.
1284
    gas_finish
1285
 
1286
    # Did we find what we were looking for?  If not, flunk it.
1287
    if [expr $x == 21] then { pass $testname } else { fail $testname }
1288
}
1289
 
1290
proc do_h8300s_logical {} {
1291
    set testname "logicals.s: h8300s logical tests"
1292
    set x 0
1293
 
1294
    gas_start "logicals.s" "-al"
1295
 
1296
    # Check each instruction bit pattern to verify it got
1297
    # assembled correctly.
1298
    while 1 {
1299
        expect {
1300
            -re " +\[0-9\]+ 0000 E910\[^\n\]*\n"   { set x [expr $x+1] }
1301
            -re " +\[0-9\]+ 0002 1691\[^\n\]*\n"   { set x [expr $x+1] }
1302
            -re " +\[0-9\]+ 0004 79610020\[^\n\]*\n"   { set x [expr $x+1] }
1303
            -re " +\[0-9\]+ 0008 6611\[^\n\]*\n"   { set x [expr $x+1] }
1304
            -re " +\[0-9\]+ 000a 7A610000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
1305
            -re " +\[0-9\]+ 0010 01F06611\[^\n\]*\n"   { set x [expr $x+1] }
1306
            -re " +\[0-9\]+ 0014 0610\[^\n\]*\n"   { set x [expr $x+1] }
1307
            -re " +\[0-9\]+ 0016 01410610\[^\n\]*\n"   { set x [expr $x+1] }
1308
            -re " +\[0-9\]+ 001a C810\[^\n\]*\n"   { set x [expr $x+1] }
1309
            -re " +\[0-9\]+ 001c 1498\[^\n\]*\n"   { set x [expr $x+1] }
1310
            -re " +\[0-9\]+ 001e 79410020\[^\n\]*\n"   { set x [expr $x+1] }
1311
            -re " +\[0-9\]+ 0022 6411\[^\n\]*\n"   { set x [expr $x+1] }
1312
            -re " +\[0-9\]+ 0024 7A410000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
1313
            -re " +\[0-9\]+ 002a 01F06411\[^\n\]*\n"   { set x [expr $x+1] }
1314
            -re " +\[0-9\]+ 002e 0410\[^\n\]*\n"   { set x [expr $x+1] }
1315
            -re " +\[0-9\]+ 0030 01410410\[^\n\]*\n"   { set x [expr $x+1] }
1316
 
1317
            -re " +\[0-9\]+ 0034 D810\[^\n\]*\n"   { set x [expr $x+1] }
1318
            -re " +\[0-9\]+ 0036 1589\[^\n\]*\n"   { set x [expr $x+1] }
1319
            -re " +\[0-9\]+ 0038 79510020\[^\n\]*\n"   { set x [expr $x+1] }
1320
            -re " +\[0-9\]+ 003c 6511\[^\n\]*\n"   { set x [expr $x+1] }
1321
            -re " +\[0-9\]+ 003e 7A510000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
1322
            -re " +\[0-9\]+ 0044 01F06511\[^\n\]*\n"   { set x [expr $x+1] }
1323
            -re " +\[0-9\]+ 0048 0510\[^\n\]*\n"   { set x [expr $x+1] }
1324
            -re " +\[0-9\]+ 004a 01410510\[^\n\]*\n"   { set x [expr $x+1] }
1325
            -re " +\[0-9\]+ 004e 1788\[^\n\]*\n"   { set x [expr $x+1] }
1326
            -re " +\[0-9\]+ 0050 1790\[^\n\]*\n"   { set x [expr $x+1] }
1327
            -re " +\[0-9\]+ 0052 17B0\[^\n\]*\n"   { set x [expr $x+1] }
1328
            -re " +\[0-9\]+ 0054 1708\[^\n\]*\n"   { set x [expr $x+1] }
1329
            -re " +\[0-9\]+ 0056 1710\[^\n\]*\n"   { set x [expr $x+1] }
1330
            -re " +\[0-9\]+ 0058 1730\[^\n\]*\n"   { set x [expr $x+1] }
1331
            timeout                             { perror "timeout\n; break }
1332
            eof                                 { break }
1333
        }
1334
    }
1335
 
1336
    # This was intended to do any cleanup necessary.  It kinda looks like it
1337
    # isn't needed, but just in case, please keep it in for now.
1338
    gas_finish
1339
 
1340
    # Did we find what we were looking for?  If not, flunk it.
1341
    if [expr $x == 30] then { pass $testname } else { fail $testname }
1342
}
1343
 
1344
proc do_h8300s_cbranch {} {
1345
    set testname "cbranchs.s: h8300s conditional branch tests"
1346
    set x 0
1347
 
1348
    gas_start "cbranchs.s" "-al"
1349
 
1350
    # Check each instruction bit pattern to verify it got
1351
    # assembled correctly.
1352
    while 1 {
1353
        expect {
1354
            -re " +\[0-9\]+ 0000 4000\[^\n\]*\n"   { set x [expr $x+1] }
1355
            -re " +\[0-9\]+ 0002 4000\[^\n\]*\n"   { set x [expr $x+1] }
1356
            -re " +\[0-9\]+ 0004 4100\[^\n\]*\n"   { set x [expr $x+1] }
1357
            -re " +\[0-9\]+ 0006 4100\[^\n\]*\n"   { set x [expr $x+1] }
1358
            -re " +\[0-9\]+ 0008 4200\[^\n\]*\n"   { set x [expr $x+1] }
1359
            -re " +\[0-9\]+ 000a 4300\[^\n\]*\n"   { set x [expr $x+1] }
1360
            -re " +\[0-9\]+ 000c 4400\[^\n\]*\n"   { set x [expr $x+1] }
1361
            -re " +\[0-9\]+ 000e 4400\[^\n\]*\n"   { set x [expr $x+1] }
1362
            -re " +\[0-9\]+ 0010 4500\[^\n\]*\n"   { set x [expr $x+1] }
1363
            -re " +\[0-9\]+ 0012 4500\[^\n\]*\n"   { set x [expr $x+1] }
1364
            -re " +\[0-9\]+ 0014 4600\[^\n\]*\n"   { set x [expr $x+1] }
1365
            -re " +\[0-9\]+ 0016 4700\[^\n\]*\n"   { set x [expr $x+1] }
1366
            -re " +\[0-9\]+ 0018 4800\[^\n\]*\n"   { set x [expr $x+1] }
1367
            -re " +\[0-9\]+ 001a 4900\[^\n\]*\n"   { set x [expr $x+1] }
1368
            -re " +\[0-9\]+ 001c 4A00\[^\n\]*\n"   { set x [expr $x+1] }
1369
            -re " +\[0-9\]+ 001e 4B00\[^\n\]*\n"   { set x [expr $x+1] }
1370
            -re " +\[0-9\]+ 0020 4C00\[^\n\]*\n"   { set x [expr $x+1] }
1371
            -re " +\[0-9\]+ 0022 4D00\[^\n\]*\n"   { set x [expr $x+1] }
1372
            -re " +\[0-9\]+ 0024 4E00\[^\n\]*\n"   { set x [expr $x+1] }
1373
            -re " +\[0-9\]+ 0026 4F00\[^\n\]*\n"   { set x [expr $x+1] }
1374
            -re " +\[0-9\]+ 0028 58000000\[^\n\]*\n"   { set x [expr $x+1] }
1375
            -re " +\[0-9\]+ 002c 58000000\[^\n\]*\n"   { set x [expr $x+1] }
1376
            -re " +\[0-9\]+ 0030 58100000\[^\n\]*\n"   { set x [expr $x+1] }
1377
            -re " +\[0-9\]+ 0034 58100000\[^\n\]*\n"   { set x [expr $x+1] }
1378
            -re " +\[0-9\]+ 0038 58200000\[^\n\]*\n"   { set x [expr $x+1] }
1379
            -re " +\[0-9\]+ 003c 58300000\[^\n\]*\n"   { set x [expr $x+1] }
1380
            -re " +\[0-9\]+ 0040 58400000\[^\n\]*\n"   { set x [expr $x+1] }
1381
            -re " +\[0-9\]+ 0044 58400000\[^\n\]*\n"   { set x [expr $x+1] }
1382
            -re " +\[0-9\]+ 0048 58500000\[^\n\]*\n"   { set x [expr $x+1] }
1383
            -re " +\[0-9\]+ 004c 58500000\[^\n\]*\n"   { set x [expr $x+1] }
1384
            -re " +\[0-9\]+ 0050 58600000\[^\n\]*\n"   { set x [expr $x+1] }
1385
            -re " +\[0-9\]+ 0054 58700000\[^\n\]*\n"   { set x [expr $x+1] }
1386
            -re " +\[0-9\]+ 0058 58800000\[^\n\]*\n"   { set x [expr $x+1] }
1387
            -re " +\[0-9\]+ 005c 58900000\[^\n\]*\n"   { set x [expr $x+1] }
1388
            -re " +\[0-9\]+ 0060 58A00000\[^\n\]*\n"   { set x [expr $x+1] }
1389
            -re " +\[0-9\]+ 0064 58B00000\[^\n\]*\n"   { set x [expr $x+1] }
1390
            -re " +\[0-9\]+ 0068 58C00000\[^\n\]*\n"   { set x [expr $x+1] }
1391
            -re " +\[0-9\]+ 006c 58D00000\[^\n\]*\n"   { set x [expr $x+1] }
1392
            -re " +\[0-9\]+ 0070 58E00000\[^\n\]*\n"   { set x [expr $x+1] }
1393
            -re " +\[0-9\]+ 0074 58F00000\[^\n\]*\n"   { set x [expr $x+1] }
1394
            timeout                             { perror "timeout\n; break }
1395
            eof                                 { break }
1396
        }
1397
    }
1398
 
1399
    # This was intended to do any cleanup necessary.  It kinda looks like it
1400
    # isn't needed, but just in case, please keep it in for now.
1401
    gas_finish
1402
 
1403
    # Did we find what we were looking for?  If not, flunk it.
1404
    if [expr $x == 40] then { pass $testname } else { fail $testname }
1405
}
1406
proc do_h8300s_bitops1 {} {
1407
    set testname "bitops1s.s: h8300s bitops tests #1"
1408
    set x 0
1409
 
1410
    gas_start "bitops1s.s" "-al"
1411
 
1412
    # Check each instruction bit pattern to verify it got
1413
    # assembled correctly.
1414
    while 1 {
1415
        expect {
1416
            -re " +\[0-9\]+ 0000 7608\[^\n\]*\n"   { set x [expr $x+1] }
1417
            -re " +\[0-9\]+ 0002 7C007600\[^\n\]*\n"   { set x [expr $x+1] }
1418
            -re " +\[0-9\]+ 0006 7E407600\[^\n\]*\n"   { set x [expr $x+1] }
1419
            -re " +\[0-9\]+ 000a 6A100080\[^\n\]*\n +\[0-9\]+ +7600"   { set x [expr $x+1] }
1420
            -re " +\[0-9\]+ 0010 6A300001\[^\n\]*\n +\[0-9\]+ +00007600"   { set x [expr $x+1] }
1421
            -re " +\[0-9\]+ 0018 7208\[^\n\]*\n"   { set x [expr $x+1] }
1422
            -re " +\[0-9\]+ 001a 7D007200\[^\n\]*\n"   { set x [expr $x+1] }
1423
            -re " +\[0-9\]+ 001e 7F407200\[^\n\]*\n"   { set x [expr $x+1] }
1424
            -re " +\[0-9\]+ 0022 6A180080\[^\n\]*\n +\[0-9\]+ +7200"   { set x [expr $x+1] }
1425
            -re " +\[0-9\]+ 0028 6A380001\[^\n\]*\n +\[0-9\]+ +00007200"   { set x [expr $x+1] }
1426
            -re " +\[0-9\]+ 0030 6298\[^\n\]*\n"   { set x [expr $x+1] }
1427
            -re " +\[0-9\]+ 0032 7D006290\[^\n\]*\n"   { set x [expr $x+1] }
1428
            -re " +\[0-9\]+ 0036 7F406290\[^\n\]*\n"   { set x [expr $x+1] }
1429
            -re " +\[0-9\]+ 003a 6A180080\[^\n\]*\n +\[0-9\]+ +6290"   { set x [expr $x+1] }
1430
            -re " +\[0-9\]+ 0040 6A380001\[^\n\]*\n +\[0-9\]+ +00006290"   { set x [expr $x+1] }
1431
            -re " +\[0-9\]+ 0048 7688\[^\n\]*\n"   { set x [expr $x+1] }
1432
            -re " +\[0-9\]+ 004a 7C007680\[^\n\]*\n"   { set x [expr $x+1] }
1433
            -re " +\[0-9\]+ 004e 7E407680\[^\n\]*\n"   { set x [expr $x+1] }
1434
            -re " +\[0-9\]+ 0052 6A100080\[^\n\]*\n +\[0-9\]+ +7680"   { set x [expr $x+1] }
1435
            -re " +\[0-9\]+ 0058 6A300001\[^\n\]*\n +\[0-9\]+ +00007680"   { set x [expr $x+1] }
1436
            -re " +\[0-9\]+ 0060 7788\[^\n\]*\n"   { set x [expr $x+1] }
1437
            -re " +\[0-9\]+ 0062 7C007780\[^\n\]*\n"   { set x [expr $x+1] }
1438
            -re " +\[0-9\]+ 0066 7E407780\[^\n\]*\n"   { set x [expr $x+1] }
1439
            -re " +\[0-9\]+ 006a 6A100080\[^\n\]*\n +\[0-9\]+ +7780"   { set x [expr $x+1] }
1440
            -re " +\[0-9\]+ 0070 6A300001\[^\n\]*\n +\[0-9\]+ +00007780"   { set x [expr $x+1] }
1441
            timeout                             { perror "timeout\n; break }
1442
            eof                                 { break }
1443
        }
1444
    }
1445
 
1446
    # This was intended to do any cleanup necessary.  It kinda looks like it
1447
    # isn't needed, but just in case, please keep it in for now.
1448
    gas_finish
1449
 
1450
    # Did we find what we were looking for?  If not, flunk it.
1451
    if [expr $x == 25] then { pass $testname } else { fail $testname }
1452
}
1453
 
1454
proc do_h8300s_bitops2 {} {
1455
    set testname "bitops2s.s: h8300s bitops tests #2"
1456
    set x 0
1457
 
1458
    gas_start "bitops2s.s" "-al"
1459
 
1460
    # Check each instruction bit pattern to verify it got
1461
    # assembled correctly.
1462
    while 1 {
1463
        expect {
1464
            -re " +\[0-9\]+ 0000 7488\[^\n\]*\n"   { set x [expr $x+1] }
1465
            -re " +\[0-9\]+ 0002 7C007480\[^\n\]*\n"   { set x [expr $x+1] }
1466
            -re " +\[0-9\]+ 0006 7E407480\[^\n\]*\n"   { set x [expr $x+1] }
1467
            -re " +\[0-9\]+ 000a 6A100080\[^\n\]*\n +\[0-9\]+ +7480"   { set x [expr $x+1] }
1468
            -re " +\[0-9\]+ 0010 6A300001\[^\n\]*\n +\[0-9\]+ +00007480"   { set x [expr $x+1] }
1469
            -re " +\[0-9\]+ 0018 6788\[^\n\]*\n"   { set x [expr $x+1] }
1470
            -re " +\[0-9\]+ 001a 7D006780\[^\n\]*\n"   { set x [expr $x+1] }
1471
            -re " +\[0-9\]+ 001e 7F406780\[^\n\]*\n"   { set x [expr $x+1] }
1472
            -re " +\[0-9\]+ 0022 6A180080\[^\n\]*\n +\[0-9\]+ +6780"   { set x [expr $x+1] }
1473
            -re " +\[0-9\]+ 0028 6A380001\[^\n\]*\n +\[0-9\]+ +00006780"   { set x [expr $x+1] }
1474
 
1475
            -re " +\[0-9\]+ 0030 7588\[^\n\]*\n"   { set x [expr $x+1] }
1476
            -re " +\[0-9\]+ 0032 7C007580\[^\n\]*\n"   { set x [expr $x+1] }
1477
            -re " +\[0-9\]+ 0036 7E407580\[^\n\]*\n"   { set x [expr $x+1] }
1478
            -re " +\[0-9\]+ 003a 6A100080\[^\n\]*\n +\[0-9\]+ +7580"   { set x [expr $x+1] }
1479
            -re " +\[0-9\]+ 0040 6A300001\[^\n\]*\n +\[0-9\]+ +00007580"   { set x [expr $x+1] }
1480
            -re " +\[0-9\]+ 0048 7708\[^\n\]*\n"   { set x [expr $x+1] }
1481
            -re " +\[0-9\]+ 004a 7C007700\[^\n\]*\n"   { set x [expr $x+1] }
1482
            -re " +\[0-9\]+ 004e 7E407700\[^\n\]*\n"   { set x [expr $x+1] }
1483
            -re " +\[0-9\]+ 0052 6A100080\[^\n\]*\n +\[0-9\]+ +7700"   { set x [expr $x+1] }
1484
            -re " +\[0-9\]+ 0058 6A300001\[^\n\]*\n +\[0-9\]+ +00007700"   { set x [expr $x+1] }
1485
            timeout                             { perror "timeout\n; break }
1486
            eof                                 { break }
1487
        }
1488
    }
1489
 
1490
    # This was intended to do any cleanup necessary.  It kinda looks like it
1491
    # isn't needed, but just in case, please keep it in for now.
1492
    gas_finish
1493
 
1494
    # Did we find what we were looking for?  If not, flunk it.
1495
    if [expr $x == 20] then { pass $testname } else { fail $testname }
1496
}
1497
 
1498
proc do_h8300s_bitops3 {} {
1499
    set testname "bitops3s.s: h8300s bitops tests #3"
1500
    set x 0
1501
 
1502
    gas_start "bitops3s.s" "-al"
1503
 
1504
    # Check each instruction bit pattern to verify it got
1505
    # assembled correctly.
1506
    while 1 {
1507
        expect {
1508
            -re " +\[0-9\]+ 0000 7108\[^\n\]*\n"   { set x [expr $x+1] }
1509
            -re " +\[0-9\]+ 0002 7D007100\[^\n\]*\n"   { set x [expr $x+1] }
1510
            -re " +\[0-9\]+ 0006 7F407100\[^\n\]*\n"   { set x [expr $x+1] }
1511
            -re " +\[0-9\]+ 000a 6A180080\[^\n\]*\n +\[0-9\]+ +7100"   { set x [expr $x+1] }
1512
            -re " +\[0-9\]+ 0010 6A380001\[^\n\]*\n +\[0-9\]+ +00007100"   { set x [expr $x+1] }
1513
            -re " +\[0-9\]+ 0018 6198\[^\n\]*\n"   { set x [expr $x+1] }
1514
            -re " +\[0-9\]+ 001a 7D006190\[^\n\]*\n"   { set x [expr $x+1] }
1515
            -re " +\[0-9\]+ 001e 7F406190\[^\n\]*\n"   { set x [expr $x+1] }
1516
            -re " +\[0-9\]+ 0022 6A180080\[^\n\]*\n +\[0-9\]+ +6190"   { set x [expr $x+1] }
1517
            -re " +\[0-9\]+ 0028 6A380001\[^\n\]*\n +\[0-9\]+ +00006190"   { set x [expr $x+1] }
1518
            -re " +\[0-9\]+ 0030 7008\[^\n\]*\n"   { set x [expr $x+1] }
1519
            -re " +\[0-9\]+ 0032 7D007000\[^\n\]*\n"   { set x [expr $x+1] }
1520
            -re " +\[0-9\]+ 0036 7F407000\[^\n\]*\n"   { set x [expr $x+1] }
1521
            -re " +\[0-9\]+ 003a 6A180080\[^\n\]*\n +\[0-9\]+ +7000"   { set x [expr $x+1] }
1522
            -re " +\[0-9\]+ 0040 6A380001\[^\n\]*\n +\[0-9\]+ +00007000"   { set x [expr $x+1] }
1523
            -re " +\[0-9\]+ 0048 6098\[^\n\]*\n"   { set x [expr $x+1] }
1524
            -re " +\[0-9\]+ 004a 7D006090\[^\n\]*\n"   { set x [expr $x+1] }
1525
            -re " +\[0-9\]+ 004e 7F406090\[^\n\]*\n"   { set x [expr $x+1] }
1526
            -re " +\[0-9\]+ 0052 6A180080\[^\n\]*\n +\[0-9\]+ +6090"   { set x [expr $x+1] }
1527
            -re " +\[0-9\]+ 0058 6A380001\[^\n\]*\n +\[0-9\]+ +00006090"   { set x [expr $x+1] }
1528
            timeout                             { perror "timeout\n; break }
1529
            eof                                 { break }
1530
        }
1531
    }
1532
 
1533
    # This was intended to do any cleanup necessary.  It kinda looks like it
1534
    # isn't needed, but just in case, please keep it in for now.
1535
    gas_finish
1536
 
1537
    # Did we find what we were looking for?  If not, flunk it.
1538
    if [expr $x == 20] then { pass $testname } else { fail $testname }
1539
}
1540
 
1541
proc do_h8300s_bitops4 {} {
1542
    set testname "bitops4s.s: h8300s bitops tests #4"
1543
    set x 0
1544
 
1545
    gas_start "bitops4s.s" "-al"
1546
 
1547
    # Check each instruction bit pattern to verify it got
1548
    # assembled correctly.
1549
    while 1 {
1550
        expect {
1551
            -re " +\[0-9\]+ 0000 7408\[^\n\]*\n"   { set x [expr $x+1] }
1552
            -re " +\[0-9\]+ 0002 7C007400\[^\n\]*\n"   { set x [expr $x+1] }
1553
            -re " +\[0-9\]+ 0006 7E407400\[^\n\]*\n"   { set x [expr $x+1] }
1554
            -re " +\[0-9\]+ 000a 6A100080\[^\n\]*\n +\[0-9\]+ +7400"   { set x [expr $x+1] }
1555
            -re " +\[0-9\]+ 0010 6A300001\[^\n\]*\n +\[0-9\]+ +00007400"   { set x [expr $x+1] }
1556
            -re " +\[0-9\]+ 0018 6708\[^\n\]*\n"   { set x [expr $x+1] }
1557
            -re " +\[0-9\]+ 001a 7D006700\[^\n\]*\n"   { set x [expr $x+1] }
1558
            -re " +\[0-9\]+ 001e 7F406700\[^\n\]*\n"   { set x [expr $x+1] }
1559
            -re " +\[0-9\]+ 0022 6A180080\[^\n\]*\n +\[0-9\]+ +6700"   { set x [expr $x+1] }
1560
            -re " +\[0-9\]+ 0028 6A380001\[^\n\]*\n +\[0-9\]+ +00006700"   { set x [expr $x+1] }
1561
            -re " +\[0-9\]+ 0030 7308\[^\n\]*\n"   { set x [expr $x+1] }
1562
            -re " +\[0-9\]+ 0032 7C007300\[^\n\]*\n"   { set x [expr $x+1] }
1563
            -re " +\[0-9\]+ 0036 7E407300\[^\n\]*\n"   { set x [expr $x+1] }
1564
            -re " +\[0-9\]+ 003a 6A100080\[^\n\]*\n +\[0-9\]+ +7300"   { set x [expr $x+1] }
1565
            -re " +\[0-9\]+ 0040 6A300001\[^\n\]*\n +\[0-9\]+ +00007300"   { set x [expr $x+1] }
1566
            -re " +\[0-9\]+ 0048 6398\[^\n\]*\n"   { set x [expr $x+1] }
1567
            -re " +\[0-9\]+ 004a 7C006390\[^\n\]*\n"   { set x [expr $x+1] }
1568
            -re " +\[0-9\]+ 004e 7E406390\[^\n\]*\n"   { set x [expr $x+1] }
1569
            -re " +\[0-9\]+ 0052 6A100080\[^\n\]*\n +\[0-9\]+ +6390"   { set x [expr $x+1] }
1570
            -re " +\[0-9\]+ 0058 6A300001\[^\n\]*\n +\[0-9\]+ +00006390"   { set x [expr $x+1] }
1571
            -re " +\[0-9\]+ 0060 7508\[^\n\]*\n"   { set x [expr $x+1] }
1572
            -re " +\[0-9\]+ 0062 7C007500\[^\n\]*\n"   { set x [expr $x+1] }
1573
            -re " +\[0-9\]+ 0066 7E407500\[^\n\]*\n"   { set x [expr $x+1] }
1574
            -re " +\[0-9\]+ 006a 6A100080\[^\n\]*\n +\[0-9\]+ +7500"   { set x [expr $x+1] }
1575
            -re " +\[0-9\]+ 0070 6A300001\[^\n\]*\n +\[0-9\]+ +00007500"   { set x [expr $x+1] }
1576
            timeout                             { perror "timeout\n; break }
1577
            eof                                 { break }
1578
        }
1579
    }
1580
 
1581
    # This was intended to do any cleanup necessary.  It kinda looks like it
1582
    # isn't needed, but just in case, please keep it in for now.
1583
    gas_finish
1584
 
1585
    # Did we find what we were looking for?  If not, flunk it.
1586
    if [expr $x == 25] then { pass $testname } else { fail $testname }
1587
}
1588
 
1589
proc do_h8300s_branch {} {
1590
    set testname "branchs.s: h8300s branch tests"
1591
    set x 0
1592
 
1593
    gas_start "branchs.s" "-al"
1594
 
1595
    # Check each instruction bit pattern to verify it got
1596
    # assembled correctly.
1597
    while 1 {
1598
        expect {
1599
            -re " +\[0-9\]+ 0000 5500\[^\n\]*\n"   { set x [expr $x+1] }
1600
            -re " +\[0-9\]+ 0002 5C000000\[^\n\]*\n"   { set x [expr $x+1] }
1601
            -re " +\[0-9\]+ 0006 5A000000\[^\n\]*\n"   { set x [expr $x+1] }
1602
            -re " +\[0-9\]+ 000a 5900\[^\n\]*\n"   { set x [expr $x+1] }
1603
            -re " +\[0-9\]+ 000c 5B00\[^\n\]*\n"   { set x [expr $x+1] }
1604
            -re " +\[0-9\]+ 000e 5E000000\[^\n\]*\n"   { set x [expr $x+1] }
1605
            -re " +\[0-9\]+ 0012 5D00\[^\n\]*\n"   { set x [expr $x+1] }
1606
            -re " +\[0-9\]+ 0014 5F00\[^\n\]*\n"   { set x [expr $x+1] }
1607
            timeout                             { perror "timeout\n; break }
1608
            eof                                 { break }
1609
        }
1610
    }
1611
 
1612
    # This was intended to do any cleanup necessary.  It kinda looks like it
1613
    # isn't needed, but just in case, please keep it in for now.
1614
    gas_finish
1615
 
1616
    # Did we find what we were looking for?  If not, flunk it.
1617
    if [expr $x == 8] then { pass $testname } else { fail $testname }
1618
}
1619
 
1620
proc do_h8300s_compare {} {
1621
    set testname "compares.s: h8300s compare tests"
1622
    set x 0
1623
 
1624
    gas_start "compares.s" "-al"
1625
 
1626
    # Check each instruction bit pattern to verify it got
1627
    # assembled correctly.
1628
    while 1 {
1629
        expect {
1630
            -re " +\[0-9\]+ 0000 A800\[^\n\]*\n"   { set x [expr $x+1] }
1631
            -re " +\[0-9\]+ 0002 1C08\[^\n\]*\n"   { set x [expr $x+1] }
1632
            -re " +\[0-9\]+ 0004 79200020\[^\n\]*\n"   { set x [expr $x+1] }
1633
            -re " +\[0-9\]+ 0008 1D01\[^\n\]*\n"   { set x [expr $x+1] }
1634
            -re " +\[0-9\]+ 000a 7A200000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
1635
            -re " +\[0-9\]+ 0010 1F81\[^\n\]*\n"   { set x [expr $x+1] }
1636
            timeout                             { perror "timeout\n; break }
1637
            eof                                 { break }
1638
        }
1639
    }
1640
 
1641
    # This was intended to do any cleanup necessary.  It kinda looks like it
1642
    # isn't needed, but just in case, please keep it in for now.
1643
    gas_finish
1644
 
1645
    # Did we find what we were looking for?  If not, flunk it.
1646
    if [expr $x == 6] then { pass $testname } else { fail $testname }
1647
}
1648
 
1649
proc do_h8300s_decimal {} {
1650
    set testname "decimals.s: h8300s decimal tests"
1651
    set x 0
1652
 
1653
    gas_start "decimals.s" "-al"
1654
 
1655
    # Check each instruction bit pattern to verify it got
1656
    # assembled correctly.
1657
    while 1 {
1658
        expect {
1659
            -re " +\[0-9\]+ 0000 0F08\[^\n\]*\n"   { set x [expr $x+1] }
1660
            -re " +\[0-9\]+ 0002 1F08\[^\n\]*\n"   { set x [expr $x+1] }
1661
            eof                                 { break }
1662
        }
1663
    }
1664
 
1665
    # This was intended to do any cleanup necessary.  It kinda looks like it
1666
    # isn't needed, but just in case, please keep it in for now.
1667
    gas_finish
1668
 
1669
    # Did we find what we were looking for?  If not, flunk it.
1670
    if [expr $x == 2] then { pass $testname } else { fail $testname }
1671
}
1672
 
1673
proc do_h8300s_incdec {} {
1674
    set testname "incdecs.s: h8300s incdec tests"
1675
    set x 0
1676
 
1677
    gas_start "incdecs.s" "-al"
1678
 
1679
    # Check each instruction bit pattern to verify it got
1680
    # assembled correctly.
1681
    while 1 {
1682
        expect {
1683
            -re " +\[0-9\]+ 0000 1A08\[^\n\]*\n"   { set x [expr $x+1] }
1684
            -re " +\[0-9\]+ 0002 1B50\[^\n\]*\n"   { set x [expr $x+1] }
1685
            -re " +\[0-9\]+ 0004 1BD0\[^\n\]*\n"   { set x [expr $x+1] }
1686
            -re " +\[0-9\]+ 0006 1B70\[^\n\]*\n"   { set x [expr $x+1] }
1687
            -re " +\[0-9\]+ 0008 1BF0\[^\n\]*\n"   { set x [expr $x+1] }
1688
            -re " +\[0-9\]+ 000a 0A08\[^\n\]*\n"   { set x [expr $x+1] }
1689
            -re " +\[0-9\]+ 000c 0B50\[^\n\]*\n"   { set x [expr $x+1] }
1690
            -re " +\[0-9\]+ 000e 0BD0\[^\n\]*\n"   { set x [expr $x+1] }
1691
            -re " +\[0-9\]+ 0010 0B70\[^\n\]*\n"   { set x [expr $x+1] }
1692
            -re " +\[0-9\]+ 0012 0BF0\[^\n\]*\n"   { set x [expr $x+1] }
1693
            eof                                 { break }
1694
        }
1695
    }
1696
 
1697
    # This was intended to do any cleanup necessary.  It kinda looks like it
1698
    # isn't needed, but just in case, please keep it in for now.
1699
    gas_finish
1700
 
1701
    # Did we find what we were looking for?  If not, flunk it.
1702
    if [expr $x == 10] then { pass $testname } else { fail $testname }
1703
}
1704
 
1705
proc do_h8300s_divmul {} {
1706
    set testname "divmuls.s: h8300s divmul tests"
1707
    set x 0
1708
 
1709
    gas_start "divmuls.s" "-al"
1710
 
1711
    # Check each instruction bit pattern to verify it got
1712
    # assembled correctly.
1713
    while 1 {
1714
        expect {
1715
            -re " +\[0-9\]+ 0000 5181\[^\n\]*\n"   { set x [expr $x+1] }
1716
            -re " +\[0-9\]+ 0002 5301\[^\n\]*\n"   { set x [expr $x+1] }
1717
            -re " +\[0-9\]+ 0004 01D05181\[^\n\]*\n"   { set x [expr $x+1] }
1718
            -re " +\[0-9\]+ 0008 01D05301\[^\n\]*\n"   { set x [expr $x+1] }
1719
            -re " +\[0-9\]+ 000c 5081\[^\n\]*\n"   { set x [expr $x+1] }
1720
            -re " +\[0-9\]+ 000e 5201\[^\n\]*\n"   { set x [expr $x+1] }
1721
            -re " +\[0-9\]+ 0010 01C05081\[^\n\]*\n"   { set x [expr $x+1] }
1722
            -re " +\[0-9\]+ 0014 01C05201\[^\n\]*\n"   { set x [expr $x+1] }
1723
            eof                                 { break }
1724
        }
1725
    }
1726
 
1727
    # This was intended to do any cleanup necessary.  It kinda looks like it
1728
    # isn't needed, but just in case, please keep it in for now.
1729
    gas_finish
1730
 
1731
    # Did we find what we were looking for?  If not, flunk it.
1732
    if [expr $x == 8] then { pass $testname } else { fail $testname }
1733
}
1734
 
1735
proc do_h8300s_misc {} {
1736
    set testname "miscs.s: h8300s misc tests"
1737
    set x 0
1738
 
1739
    gas_start "miscs.s" "-al"
1740
 
1741
    # Check each instruction bit pattern to verify it got
1742
    # assembled correctly.
1743
    while 1 {
1744
        expect {
1745
            -re " +\[0-9\]+ 0000 7B5C598F\[^\n\]*\n"   { set x [expr $x+1] }
1746
            -re " +\[0-9\]+ 0004 7BD4598F\[^\n\]*\n"   { set x [expr $x+1] }
1747
            -re " +\[0-9\]+ 0008 0700\[^\n\]*\n"   { set x [expr $x+1] }
1748
            -re " +\[0-9\]+ 000a 0308\[^\n\]*\n"   { set x [expr $x+1] }
1749
            -re " +\[0-9\]+ 000c 01410700\[^\n\]*\n"   { set x [expr $x+1] }
1750
            -re " +\[0-9\]+ 0010 0318\[^\n\]*\n"   { set x [expr $x+1] }
1751
            -re " +\[0-9\]+ 0012 01406900\[^\n\]*\n"   { set x [expr $x+1] }
1752
            -re " +\[0-9\]+ 0016 01406F00\[^\n\]*\n +\[0-9\]+ +0010\[^\n\]*\n"   { set x [expr $x+1] }
1753
            -re " +\[0-9\]+ 001c 01407800\[^\n\]*\n +\[0-9\]+ +6B200000\[^\n\]*\n +\[0-9\]+ +0020\[^\n\]*\n"   { set x [expr $x+1] }
1754
            -re " +\[0-9\]+ 0026 01406D00\[^\n\]*\n"   { set x [expr $x+1] }
1755
            -re " +\[0-9\]+ 002a 01406B00\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1756
            -re " +\[0-9\]+ 0030 01406B20\[^\n\]*\n +\[0-9\]+ +00000000\[^\n\]*\n"   { set x [expr $x+1] }
1757
            -re " +\[0-9\]+ 0038 01416900\[^\n\]*\n"   { set x [expr $x+1] }
1758
            -re " +\[0-9\]+ 003c 01416F00\[^\n\]*\n +\[0-9\]+ +0010\[^\n\]*\n"   { set x [expr $x+1] }
1759
            -re " +\[0-9\]+ 0042 01417800\[^\n\]*\n +\[0-9\]+ +6B200000\[^\n\]*\n +\[0-9\]+ +0020\[^\n\]*\n"   { set x [expr $x+1] }
1760
            -re " +\[0-9\]+ 004c 01416D00\[^\n\]*\n"   { set x [expr $x+1] }
1761
            -re " +\[0-9\]+ 0050 01416B00\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1762
            -re " +\[0-9\]+ 0056 01416B20\[^\n\]*\n +\[0-9\]+ +00000000\[^\n\]*\n"   { set x [expr $x+1] }
1763
            -re " +\[0-9\]+ 005e 0000\[^\n\]*\n"   { set x [expr $x+1] }
1764
            -re " +\[0-9\]+ 0060 5670\[^\n\]*\n"   { set x [expr $x+1] }
1765
            -re " +\[0-9\]+ 0062 5470\[^\n\]*\n"   { set x [expr $x+1] }
1766
            -re " +\[0-9\]+ 0064 0180\[^\n\]*\n"   { set x [expr $x+1] }
1767
            -re " +\[0-9\]+ 0066 0208\[^\n\]*\n"   { set x [expr $x+1] }
1768
            -re " +\[0-9\]+ 0068 0218\[^\n\]*\n"   { set x [expr $x+1] }
1769
            -re " +\[0-9\]+ 006a 01406980\[^\n\]*\n"   { set x [expr $x+1] }
1770
            -re " +\[0-9\]+ 006e 01406F80\[^\n\]*\n +\[0-9\]+ +0010\[^\n\]*\n"   { set x [expr $x+1] }
1771
            -re " +\[0-9\]+ 0074 01407800\[^\n\]*\n +\[0-9\]+ +6BA00000\[^\n\]*\n +\[0-9\]+ +0020\[^\n\]*\n"   { set x [expr $x+1] }
1772
            -re " +\[0-9\]+ 007e 01406D80\[^\n\]*\n"   { set x [expr $x+1] }
1773
            -re " +\[0-9\]+ 0082 01406B80\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1774
            -re " +\[0-9\]+ 0088 01406BA0\[^\n\]*\n +\[0-9\]+ +00000000\[^\n\]*\n"   { set x [expr $x+1] }
1775
            -re " +\[0-9\]+ 0090 01416980\[^\n\]*\n"   { set x [expr $x+1] }
1776
            -re " +\[0-9\]+ 0094 01416F80\[^\n\]*\n +\[0-9\]+ +0010\[^\n\]*\n"   { set x [expr $x+1] }
1777
            -re " +\[0-9\]+ 009a 01417800\[^\n\]*\n +\[0-9\]+ +6BA00000\[^\n\]*\n +\[0-9\]+ +0020\[^\n\]*\n"   { set x [expr $x+1] }
1778
            -re " +\[0-9\]+ 00a4 01416D80\[^\n\]*\n"   { set x [expr $x+1] }
1779
            -re " +\[0-9\]+ 00a8 01416B80\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1780
            -re " +\[0-9\]+ 00ae 01416BA0\[^\n\]*\n +\[0-9\]+ +00000000\[^\n\]*\n"   { set x [expr $x+1] }
1781
            eof                                 { break }
1782
        }
1783
    }
1784
 
1785
    # This was intended to do any cleanup necessary.  It kinda looks like it
1786
    # isn't needed, but just in case, please keep it in for now.
1787
    gas_finish
1788
 
1789
    # Did we find what we were looking for?  If not, flunk it.
1790
    if [expr $x == 36] then { pass $testname } else { fail $testname }
1791
 
1792
    setup_xfail "h8300*-*-*"
1793
    fail "h8300s movfpe/movtpe tests"
1794
}
1795
 
1796
proc do_h8300s_movb {} {
1797
    set testname "movbs.s: h8300s movb tests"
1798
    set x 0
1799
 
1800
    gas_start "movbs.s" "-al"
1801
 
1802
    # Check each instruction bit pattern to verify it got
1803
    # assembled correctly.
1804
    while 1 {
1805
        expect {
1806
            -re " +\[0-9\]+ 0000 0C89\[^\n\]*\n"   { set x [expr $x+1] }
1807
            -re " +\[0-9\]+ 0002 F810\[^\n\]*\n"   { set x [expr $x+1] }
1808
            -re " +\[0-9\]+ 0004 6818\[^\n\]*\n"   { set x [expr $x+1] }
1809
            -re " +\[0-9\]+ 0006 6E180010\[^\n\]*\n"   { set x [expr $x+1] }
1810
            -re " +\[0-9\]+ 000a 78106A28\[^\n\]*\n +\[0-9\]+ +00000020\[^\n\]*\n"   { set x [expr $x+1] }
1811
            -re " +\[0-9\]+ 0012 6C18\[^\n\]*\n"   { set x [expr $x+1] }
1812
            -re " +\[0-9\]+ 0014 2810\[^\n\]*\n"   { set x [expr $x+1] }
1813
            -re " +\[0-9\]+ 0016 6A080000\[^\n\]*\n"   { set x [expr $x+1] }
1814
            -re " +\[0-9\]+ 001a 6A280000\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1815
            -re " +\[0-9\]+ 0020 6898\[^\n\]*\n"   { set x [expr $x+1] }
1816
            -re " +\[0-9\]+ 0022 6E980010\[^\n\]*\n"   { set x [expr $x+1] }
1817
            -re " +\[0-9\]+ 0026 78106AA8\[^\n\]*\n +\[0-9\]+ +00000020\[^\n\]*\n"   { set x [expr $x+1] }
1818
            -re " +\[0-9\]+ 002e 6C98\[^\n\]*\n"   { set x [expr $x+1] }
1819
            -re " +\[0-9\]+ 0030 3810\[^\n\]*\n"   { set x [expr $x+1] }
1820
            -re " +\[0-9\]+ 0032 6A880000\[^\n\]*\n"   { set x [expr $x+1] }
1821
            -re " +\[0-9\]+ 0036 6AA80000\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1822
            eof                                 { break }
1823
        }
1824
    }
1825
 
1826
    # This was intended to do any cleanup necessary.  It kinda looks like it
1827
    # isn't needed, but just in case, please keep it in for now.
1828
    gas_finish
1829
 
1830
    # Did we find what we were looking for?  If not, flunk it.
1831
    if [expr $x == 16] then { pass $testname } else { fail $testname }
1832
}
1833
 
1834
proc do_h8300s_movw {} {
1835
    set testname "movws.s: h8300s movw tests"
1836
    set x 0
1837
 
1838
    gas_start "movws.s" "-al"
1839
 
1840
    # Check each instruction bit pattern to verify it got
1841
    # assembled correctly.
1842
    while 1 {
1843
        expect {
1844
            -re " +\[0-9\]+ 0000 0D01\[^\n\]*\n"   { set x [expr $x+1] }
1845
            -re " +\[0-9\]+ 0002 79000010\[^\n\]*\n"   { set x [expr $x+1] }
1846
            -re " +\[0-9\]+ 0006 6910\[^\n\]*\n"   { set x [expr $x+1] }
1847
            -re " +\[0-9\]+ 0008 6F100010\[^\n\]*\n"   { set x [expr $x+1] }
1848
            -re " +\[0-9\]+ 000c 78106B20\[^\n\]*\n +\[0-9\]+ +00000020\[^\n\]*\n"   { set x [expr $x+1] }
1849
            -re " +\[0-9\]+ 0014 6D10\[^\n\]*\n"   { set x [expr $x+1] }
1850
            -re " +\[0-9\]+ 0016 6B000000\[^\n\]*\n"   { set x [expr $x+1] }
1851
            -re " +\[0-9\]+ 001a 6B200000\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1852
            -re " +\[0-9\]+ 0020 6990\[^\n\]*\n"   { set x [expr $x+1] }
1853
            -re " +\[0-9\]+ 0022 6F900010\[^\n\]*\n"   { set x [expr $x+1] }
1854
            -re " +\[0-9\]+ 0026 78106BA0\[^\n\]*\n +\[0-9\]+ +00000020\[^\n\]*\n"   { set x [expr $x+1] }
1855
            -re " +\[0-9\]+ 002e 6D90\[^\n\]*\n"   { set x [expr $x+1] }
1856
            -re " +\[0-9\]+ 0030 6B800000\[^\n\]*\n"   { set x [expr $x+1] }
1857
            -re " +\[0-9\]+ 0034 6BA00000\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1858
            eof                                 { break }
1859
        }
1860
    }
1861
 
1862
    # This was intended to do any cleanup necessary.  It kinda looks like it
1863
    # isn't needed, but just in case, please keep it in for now.
1864
    gas_finish
1865
 
1866
    # Did we find what we were looking for?  If not, flunk it.
1867
    if [expr $x == 14] then { pass $testname } else { fail $testname }
1868
}
1869
 
1870
 
1871
proc do_h8300s_movl {} {
1872
    set testname "movls.s: h8300s movl tests"
1873
    set x 0
1874
 
1875
    gas_start "movls.s" "-al"
1876
 
1877
    # Check each instruction bit pattern to verify it got
1878
    # assembled correctly.
1879
    while 1 {
1880
        expect {
1881
            -re " +\[0-9\]+ 0000 0F81\[^\n\]*\n"   { set x [expr $x+1] }
1882
            -re " +\[0-9\]+ 0002 7A000000\[^\n\]*\n +\[0-9\]+ +0040\[^\n\]*\n"   { set x [expr $x+1] }
1883
            -re " +\[0-9\]+ 0008 01006910\[^\n\]*\n"   { set x [expr $x+1] }
1884
            -re " +\[0-9\]+ 000c 01006F10\[^\n\]*\n +\[0-9\]+ +0010\[^\n\]*\n"   { set x [expr $x+1] }
1885
            -re " +\[0-9\]+ 0012 01007810\[^\n\]*\n +\[0-9\]+ +6B200000\[^\n\]*\n +\[0-9\]+ +0020\[^\n\]*\n"   { set x [expr $x+1] }
1886
            -re " +\[0-9\]+ 001c 01006D10\[^\n\]*\n"   { set x [expr $x+1] }
1887
            -re " +\[0-9\]+ 0020 01006B00\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1888
            -re " +\[0-9\]+ 0026 01006B20\[^\n\]*\n +\[0-9\]+ +00000000\[^\n\]*\n"   { set x [expr $x+1] }
1889
            -re " +\[0-9\]+ 002e 01006990\[^\n\]*\n"   { set x [expr $x+1] }
1890
            -re " +\[0-9\]+ 0032 01006F90\[^\n\]*\n +\[0-9\]+ +0010\[^\n\]*\n"   { set x [expr $x+1] }
1891
            -re " +\[0-9\]+ 0038 01007890\[^\n\]*\n +\[0-9\]+ +6BA00000\[^\n\]*\n +\[0-9\]+ +0020\[^\n\]*\n"   { set x [expr $x+1] }
1892
            -re " +\[0-9\]+ 0042 01006D90\[^\n\]*\n"   { set x [expr $x+1] }
1893
            -re " +\[0-9\]+ 0046 01006B80\[^\n\]*\n +\[0-9\]+ +0000\[^\n\]*\n"   { set x [expr $x+1] }
1894
            -re " +\[0-9\]+ 004c 01006BA0\[^\n\]*\n +\[0-9\]+ +00000000\[^\n\]*\n"   { set x [expr $x+1] }
1895
            eof                                 { break }
1896
        }
1897
    }
1898
 
1899
    # This was intended to do any cleanup necessary.  It kinda looks like it
1900
    # isn't needed, but just in case, please keep it in for now.
1901
    gas_finish
1902
 
1903
    # Did we find what we were looking for?  If not, flunk it.
1904
    if [expr $x == 14] then { pass $testname } else { fail $testname }
1905
}
1906
 
1907
proc do_h8300s_pushpop {} {
1908
    set testname "pushpops.s: h8300s pushpop tests"
1909
    set x 0
1910
 
1911
    gas_start "pushpops.s" "-al"
1912
 
1913
    # Check each instruction bit pattern to verify it got
1914
    # assembled correctly.
1915
    while 1 {
1916
        expect {
1917
            -re " +\[0-9\]+ 0000 6D70\[^\n\]*\n"   { set x [expr $x+1] }
1918
            -re " +\[0-9\]+ 0002 01006D70\[^\n\]*\n"   { set x [expr $x+1] }
1919
            -re " +\[0-9\]+ 0006 6DF0\[^\n\]*\n"   { set x [expr $x+1] }
1920
            -re " +\[0-9\]+ 0008 01006DF0\[^\n\]*\n"   { set x [expr $x+1] }
1921
            eof                                 { break }
1922
        }
1923
    }
1924
 
1925
    # This was intended to do any cleanup necessary.  It kinda looks like it
1926
    # isn't needed, but just in case, please keep it in for now.
1927
    gas_finish
1928
 
1929
    # Did we find what we were looking for?  If not, flunk it.
1930
    if [expr $x == 4] then { pass $testname } else { fail $testname }
1931
}
1932
 
1933
proc do_h8300s_rotate_shift {} {
1934
    set testname "rotshs.s: h8300s rotate and shift tests"
1935
    set x 0
1936
 
1937
    gas_start "rotshs.s" "-al"
1938
 
1939
    # Check each instruction bit pattern to verify it got
1940
    # assembled correctly.
1941
    while 1 {
1942
        expect {
1943
            -re " +\[0-9\]+ 0000 1288\[^\n\]*\n"   { set x [expr $x+1] }
1944
            -re " +\[0-9\]+ 0002 12C8\[^\n\]*\n"   { set x [expr $x+1] }
1945
            -re " +\[0-9\]+ 0004 1290\[^\n\]*\n"   { set x [expr $x+1] }
1946
            -re " +\[0-9\]+ 0006 12D0\[^\n\]*\n"   { set x [expr $x+1] }
1947
            -re " +\[0-9\]+ 0008 12B0\[^\n\]*\n"   { set x [expr $x+1] }
1948
            -re " +\[0-9\]+ 000a 12F0\[^\n\]*\n"   { set x [expr $x+1] }
1949
            -re " +\[0-9\]+ 000c 1388\[^\n\]*\n"   { set x [expr $x+1] }
1950
            -re " +\[0-9\]+ 000e 13C8\[^\n\]*\n"   { set x [expr $x+1] }
1951
            -re " +\[0-9\]+ 0010 1390\[^\n\]*\n"   { set x [expr $x+1] }
1952
            -re " +\[0-9\]+ 0012 13D0\[^\n\]*\n"   { set x [expr $x+1] }
1953
            -re " +\[0-9\]+ 0014 13B0\[^\n\]*\n"   { set x [expr $x+1] }
1954
            -re " +\[0-9\]+ 0016 13F0\[^\n\]*\n"   { set x [expr $x+1] }
1955
            -re " +\[0-9\]+ 0018 1208\[^\n\]*\n"   { set x [expr $x+1] }
1956
            -re " +\[0-9\]+ 001a 1248\[^\n\]*\n"   { set x [expr $x+1] }
1957
            -re " +\[0-9\]+ 001c 1210\[^\n\]*\n"   { set x [expr $x+1] }
1958
            -re " +\[0-9\]+ 001e 1250\[^\n\]*\n"   { set x [expr $x+1] }
1959
            -re " +\[0-9\]+ 0020 1230\[^\n\]*\n"   { set x [expr $x+1] }
1960
            -re " +\[0-9\]+ 0022 1270\[^\n\]*\n"   { set x [expr $x+1] }
1961
            -re " +\[0-9\]+ 0024 1308\[^\n\]*\n"   { set x [expr $x+1] }
1962
            -re " +\[0-9\]+ 0026 1348\[^\n\]*\n"   { set x [expr $x+1] }
1963
            -re " +\[0-9\]+ 0028 1310\[^\n\]*\n"   { set x [expr $x+1] }
1964
            -re " +\[0-9\]+ 002a 1350\[^\n\]*\n"   { set x [expr $x+1] }
1965
            -re " +\[0-9\]+ 002c 1330\[^\n\]*\n"   { set x [expr $x+1] }
1966
            -re " +\[0-9\]+ 002e 1370\[^\n\]*\n"   { set x [expr $x+1] }
1967
            -re " +\[0-9\]+ 0030 1088\[^\n\]*\n"   { set x [expr $x+1] }
1968
            -re " +\[0-9\]+ 0032 10C8\[^\n\]*\n"   { set x [expr $x+1] }
1969
            -re " +\[0-9\]+ 0034 1090\[^\n\]*\n"   { set x [expr $x+1] }
1970
            -re " +\[0-9\]+ 0036 10D0\[^\n\]*\n"   { set x [expr $x+1] }
1971
            -re " +\[0-9\]+ 0038 10B0\[^\n\]*\n"   { set x [expr $x+1] }
1972
            -re " +\[0-9\]+ 003a 10F0\[^\n\]*\n"   { set x [expr $x+1] }
1973
            -re " +\[0-9\]+ 003c 1188\[^\n\]*\n"   { set x [expr $x+1] }
1974
            -re " +\[0-9\]+ 003e 11C8\[^\n\]*\n"   { set x [expr $x+1] }
1975
            -re " +\[0-9\]+ 0040 1190\[^\n\]*\n"   { set x [expr $x+1] }
1976
            -re " +\[0-9\]+ 0042 11D0\[^\n\]*\n"   { set x [expr $x+1] }
1977
            -re " +\[0-9\]+ 0044 11B0\[^\n\]*\n"   { set x [expr $x+1] }
1978
            -re " +\[0-9\]+ 0046 11F0\[^\n\]*\n"   { set x [expr $x+1] }
1979
            -re " +\[0-9\]+ 0048 1008\[^\n\]*\n"   { set x [expr $x+1] }
1980
            -re " +\[0-9\]+ 004a 1048\[^\n\]*\n"   { set x [expr $x+1] }
1981
            -re " +\[0-9\]+ 004c 1010\[^\n\]*\n"   { set x [expr $x+1] }
1982
            -re " +\[0-9\]+ 004e 1050\[^\n\]*\n"   { set x [expr $x+1] }
1983
            -re " +\[0-9\]+ 0050 1030\[^\n\]*\n"   { set x [expr $x+1] }
1984
            -re " +\[0-9\]+ 0052 1070\[^\n\]*\n"   { set x [expr $x+1] }
1985
            -re " +\[0-9\]+ 0054 1108\[^\n\]*\n"   { set x [expr $x+1] }
1986
            -re " +\[0-9\]+ 0056 1148\[^\n\]*\n"   { set x [expr $x+1] }
1987
            -re " +\[0-9\]+ 0058 1110\[^\n\]*\n"   { set x [expr $x+1] }
1988
            -re " +\[0-9\]+ 005a 1150\[^\n\]*\n"   { set x [expr $x+1] }
1989
            -re " +\[0-9\]+ 005c 1130\[^\n\]*\n"   { set x [expr $x+1] }
1990
            -re " +\[0-9\]+ 005e 1170\[^\n\]*\n"   { set x [expr $x+1] }
1991
            eof                                 { break }
1992
        }
1993
    }
1994
 
1995
    # This was intended to do any cleanup necessary.  It kinda looks like it
1996
    # isn't needed, but just in case, please keep it in for now.
1997
    gas_finish
1998
 
1999
    # Did we find what we were looking for?  If not, flunk it.
2000
    if [expr $x == 48] then { pass $testname } else { fail $testname }
2001
}
2002
 
2003
proc do_h8300s_extend {} {
2004
    set testname "extends.s: h8300s extend tests"
2005
    set x 0
2006
 
2007
    gas_start "extends.s" "-al"
2008
 
2009
    # Check each instruction bit pattern to verify it got
2010
    # assembled correctly.
2011
    while 1 {
2012
        expect {
2013
            -re " +\[0-9\]+ 0000 17D0\[^\n\]*\n"   { set x [expr $x+1] }
2014
            -re " +\[0-9\]+ 0002 17F0\[^\n\]*\n"   { set x [expr $x+1] }
2015
            -re " +\[0-9\]+ 0004 1750\[^\n\]*\n"   { set x [expr $x+1] }
2016
            -re " +\[0-9\]+ 0006 1770\[^\n\]*\n"   { set x [expr $x+1] }
2017
            eof                                 { break }
2018
        }
2019
    }
2020
 
2021
    # This was intended to do any cleanup necessary.  It kinda looks like it
2022
    # isn't needed, but just in case, please keep it in for now.
2023
    gas_finish
2024
 
2025
    # Did we find what we were looking for?  If not, flunk it.
2026
    if [expr $x == 4] then { pass $testname } else { fail $testname }
2027
}
2028
 
2029
proc do_h8300s_mac {} {
2030
    set testname "macs.s: h8300s mac tests"
2031
    set x 0
2032
 
2033
    gas_start "macs.s" "-al"
2034
 
2035
    # Check each instruction bit pattern to verify it got
2036
    # assembled correctly.
2037
    while 1 {
2038
        expect {
2039
            -re " +\[0-9\]+ 0000 01A0\[^\n\]*\n"   { set x [expr $x+1] }
2040
            -re " +\[0-9\]+ 0002 0324\[^\n\]*\n"   { set x [expr $x+1] }
2041
            -re " +\[0-9\]+ 0004 0335\[^\n\]*\n"   { set x [expr $x+1] }
2042
            -re " +\[0-9\]+ 0006 01606D45\[^\n\]*\n"   { set x [expr $x+1] }
2043
            -re " +\[0-9\]+ 000a 0224\[^\n\]*\n"   { set x [expr $x+1] }
2044
            -re " +\[0-9\]+ 000c 0235\[^\n\]*\n"   { set x [expr $x+1] }
2045
            eof                                 { break }
2046
        }
2047
    }
2048
 
2049
    # This was intended to do any cleanup necessary.  It kinda looks like it
2050
    # isn't needed, but just in case, please keep it in for now.
2051
    gas_finish
2052
 
2053
    # Did we find what we were looking for?  If not, flunk it.
2054
    if [expr $x == 6] then { pass $testname } else { fail $testname }
2055
}
2056
 
2057
proc do_h8300s_multiple {} {
2058
    set testname "multiples.s: h8300s multiple tests"
2059
    set x 0
2060
 
2061
    gas_start "multiples.s" "-al"
2062
 
2063
    # Check each instruction bit pattern to verify it got
2064
    # assembled correctly.
2065
    while 1 {
2066
        expect {
2067
            -re " +\[0-9\]+ 0000 01106D71\[^\n\]*\n"   { set x [expr $x+1] }
2068
            -re " +\[0-9\]+ 0004 01206D72\[^\n\]*\n"   { set x [expr $x+1] }
2069
            -re " +\[0-9\]+ 0008 01306D73\[^\n\]*\n"   { set x [expr $x+1] }
2070
            -re " +\[0-9\]+ 000c 01106DF0\[^\n\]*\n"   { set x [expr $x+1] }
2071
            -re " +\[0-9\]+ 0010 01206DF0\[^\n\]*\n"   { set x [expr $x+1] }
2072
            -re " +\[0-9\]+ 0014 01306DF0\[^\n\]*\n"   { set x [expr $x+1] }
2073
            -re " +\[0-9\]+ 0018 01106D73\[^\n\]*\n"   { set x [expr $x+1] }
2074
            -re " +\[0-9\]+ 001c 01106DF2\[^\n\]*\n"   { set x [expr $x+1] }
2075
            -re " +\[0-9\]+ 0020 01106D75\[^\n\]*\n"   { set x [expr $x+1] }
2076
            -re " +\[0-9\]+ 0024 01206D76\[^\n\]*\n"   { set x [expr $x+1] }
2077
            -re " +\[0-9\]+ 0028 01106DF4\[^\n\]*\n"   { set x [expr $x+1] }
2078
            -re " +\[0-9\]+ 002c 01206DF4\[^\n\]*\n"   { set x [expr $x+1] }
2079
 
2080
            eof                                 { break }
2081
        }
2082
    }
2083
 
2084
    # This was intended to do any cleanup necessary.  It kinda looks like it
2085
    # isn't needed, but just in case, please keep it in for now.
2086
    gas_finish
2087
 
2088
    # Did we find what we were looking for?  If not, flunk it.
2089
    if [expr $x == 12] then { pass $testname } else { fail $testname }
2090
}
2091
 
2092
proc do_h8300h_mov32bug {} {
2093
    set testname "mov32bug.s: h8300h mov32bug test"
2094
    set x 0
2095
 
2096
    if [gas_test_old "mov32bug.s" "" "Proper relocation for mov.l (part 1)"] then {
2097
        objdump_start_no_subdir "a.out" "-r"
2098
 
2099
        while 1 {
2100
            expect {
2101
                -re "00000002\[^\n\]*32\[^\n\]*_a.0x0*88ca6c00\[^\n\]*\n"
2102
                                                { set x [expr $x+1] }
2103
                timeout                         { perror "timeout\n; break }
2104
                eof                             { break }
2105
            }
2106
        }
2107
    }
2108
 
2109
    # This was intended to do any cleanup necessary.  It kinda looks like it
2110
    # isn't needed, but just in case, please keep it in for now.
2111
    objdump_finish
2112
 
2113
    # Did we find what we were looking for?  If not, flunk it.
2114
    if [expr $x == 1] then { pass $testname } else { fail $testname }
2115
}
2116
 
2117
proc do_h8300hn_addressgen {} {
2118
    set testname "symaddgen.s: h8300hn symbol address generation"
2119
    set x 0
2120
 
2121
    gas_start "symaddgen.s" "-al"
2122
 
2123
    # Check each instruction bit pattern to verify it got
2124
    # assembled correctly.
2125
    while 1 {
2126
        expect {
2127
            -re " +\[0-9\]+ .* 01006DF6\[^\n\]*\n"   { set x [expr $x+1] }
2128
            -re " +\[0-9\]+ .* 0D76\[^\n\]*\n"       { set x [expr $x+1] }
2129
            -re " +\[0-9\]+ .* 790207D0\[^\n\]*\n"   { set x [expr $x+1] }
2130
            -re " +\[0-9\]+ .* 6B82F020\[^\n\]*\n"   { set x [expr $x+1] }
2131
            -re " +\[0-9\]+ .* 79022710\[^\n\]*\n"   { set x [expr $x+1] }
2132
            -re " +\[0-9\]+ .* 6B820000\[^\n\]*\n"   { set x [expr $x+1] }
2133
            -re " +\[0-9\]+ .* 01006D76\[^\n\]*\n"   { set x [expr $x+1] }
2134
            -re " +\[0-9\]+ .* 5470\[^\n\]*\n"       { set x [expr $x+1] }
2135
 
2136
            eof                                 { break }
2137
        }
2138
    }
2139
    # This was intended to do any cleanup necessary.  It kinda looks like it
2140
    # isn't needed, but just in case, please keep it in for now.
2141
    gas_finish
2142
    # Did we find what we were looking for?  If not, flunk it.
2143
    if [expr $x == 8] then { pass $testname } else { fail $testname }
2144
}
2145
 
2146
proc do_h8300_addsubrxcheck {} {
2147
    set testname "addsubrxcheck.s: h8300 check rx generation for adds subs instructions"
2148
    set x 0
2149
 
2150
    gas_start "addsubrxcheck.s" "-al"
2151
 
2152
    # Check each instruction bit pattern to verify it got
2153
    # assembled correctly.
2154
    while 1 {
2155
        expect {
2156
            -re " +\[0-9\]+ .* 6DF6\[^\n\]*\n"       { set x [expr $x+1] }
2157
            -re " +\[0-9\]+ .* 0D76\[^\n\]*\n"       { set x [expr $x+1] }
2158
            -re " +\[0-9\]+ .* 1B87\[^\n\]*\n"       { set x [expr $x+1] }
2159
            -re " +\[0-9\]+ .* 6F62FFFE\[^\n\]*\n"   { set x [expr $x+1] }
2160
            -re " +\[0-9\]+ .* 1B82\[^\n\]*\n"       { set x [expr $x+1] }
2161
            -re " +\[0-9\]+ .* 6FE2FFFE\[^\n\]*\n"   { set x [expr $x+1] }
2162
            -re " +\[0-9\]+ .* 1922\[^\n\]*\n"       { set x [expr $x+1] }
2163
            -re " +\[0-9\]+ .* 0D20\[^\n\]*\n"       { set x [expr $x+1] }
2164
            -re " +\[0-9\]+ .* 0B87\[^\n\]*\n"       { set x [expr $x+1] }
2165
            -re " +\[0-9\]+ .* 6D76\[^\n\]*\n"       { set x [expr $x+1] }
2166
            -re " +\[0-9\]+ .* 5470\[^\n\]*\n"       { set x [expr $x+1] }
2167
 
2168
            eof                                 { break }
2169
        }
2170
    }
2171
    # This was intended to do any cleanup necessary.  It kinda looks like it
2172
    # isn't needed, but just in case, please keep it in for now.
2173
    gas_finish
2174
    # Did we find what we were looking for?  If not, flunk it.
2175
    if [expr $x == 11] then { pass $testname } else { fail $testname }
2176
}
2177
 
2178
if [istarget h8300*-*-*] then {
2179
    # Test the basic h8300 instruction parser
2180
    do_h8300_add_sub
2181
    do_h8300_logical
2182
    do_h8300_bitops1
2183
    do_h8300_bitops2
2184
    do_h8300_bitops3
2185
    do_h8300_bitops4
2186
    do_h8300_compare
2187
    do_h8300_decimal
2188
    do_h8300_incdec
2189
    do_h8300_divmul
2190
    do_h8300_misc
2191
    do_h8300_movb
2192
    do_h8300_movw
2193
    do_h8300_pushpop
2194
    do_h8300_rotate_shift
2195
    do_h8300hn_addressgen
2196
 
2197
    do_h8300_addsubrxcheck
2198
 
2199
    # Now test the h8300h instruction parser
2200
    do_h8300h_add_sub
2201
    do_h8300h_logical
2202
    do_h8300h_bitops1
2203
    do_h8300h_bitops2
2204
    do_h8300h_bitops3
2205
    do_h8300h_bitops4
2206
    do_h8300h_compare
2207
    do_h8300h_decimal
2208
    do_h8300h_incdec
2209
    do_h8300h_divmul
2210
    do_h8300h_misc
2211
    do_h8300h_movb
2212
    do_h8300h_movw
2213
    do_h8300h_movl
2214
    do_h8300_pushpop
2215
    do_h8300h_rotate_shift
2216
    do_h8300h_extend
2217
 
2218
    # Now test the h8300s instruction parser
2219
    do_h8300s_add_sub
2220
    do_h8300s_logical
2221
    do_h8300s_bitops1
2222
    do_h8300s_bitops2
2223
    do_h8300s_bitops3
2224
    do_h8300s_bitops4
2225
    do_h8300s_compare
2226
    do_h8300s_decimal
2227
    do_h8300s_incdec
2228
    do_h8300s_divmul
2229
    do_h8300s_misc
2230
    do_h8300s_movb
2231
    do_h8300s_movw
2232
    do_h8300s_movl
2233
    do_h8300_pushpop
2234
    do_h8300s_rotate_shift
2235
    do_h8300s_extend
2236
    do_h8300s_mac
2237
    do_h8300s_multiple
2238
 
2239
    do_h8300h_mov32bug
2240
 
2241
    # Now some random tests
2242
    set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] ]
2243
    set empic [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
2244
    set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*]]
2245
 
2246
    gas_test "cmpsi2.s" "" "" "cmpsi2.s"
2247
 
2248
    run_dump_test "pr3134"
2249
}

powered by: WebSVN 2.1.0

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