OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.18.50/] [gas/] [testsuite/] [gas/] [h8300/] [t06_ari2.exp] - Blame information for rev 156

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
#
2
# Some h8300sx tests -- t06_ari2
3
#
4
 
5
proc do_t06_ari2_test {} {
6
    set testname "t06_ari2.s -- h8sx arithmetic tests"
7
 
8
    gas_start "t06_ari2.s" "-al"
9
 
10
    # Check each instruction bit pattern to verify it got assembled correctly.
11
 
12
    set x 0
13
    expect {
14
        -re ".*   7 0000 9112" { set x [expr $x+1]; exp_continue; }
15
        -re ".*   8 0002 7D109012" { set x [expr $x+1]; exp_continue; }
16
        -re ".*   9 0006 01766C18" { set x [expr $x+1]; exp_continue; }
17
        -re ".*   9      9012" { set x [expr $x+1]; exp_continue; }
18
        -re ".*  10              " {
19
            if [expr $x == 4] then {
20
                pass "$testname: addx.b #0x12:8, ..."
21
            } else {
22
                fail "$testname: addx.b #0x12:8, ... ($x)"
23
            }
24
        }
25
        default { fail "$testname: addx.b #0x12:8, ... ($x)" }
26
    }
27
 
28
    set x 0
29
    expect {
30
        -re ".*  11 000c 0E31" { set x [expr $x+1]; exp_continue; }
31
        -re ".*  12 000e 7D100E30" { set x [expr $x+1]; exp_continue; }
32
        -re ".*  13 0012 01766C18" { set x [expr $x+1]; exp_continue; }
33
        -re ".*  13      0E30" { set x [expr $x+1]; exp_continue; }
34
        -re ".*  14              " {
35
            if [expr $x == 4] then {
36
                pass "$testname: addx.b r3h, ..."
37
            } else {
38
                fail "$testname: addx.b r3h, ... ($x)"
39
            }
40
        }
41
        default { fail "$testname: addx.b r3h, ... ($x)" }
42
    }
43
 
44
    set x 0
45
    expect {
46
        -re ".*  15 0018 7C300E01" { set x [expr $x+1]; exp_continue; }
47
        -re ".*  16 001c 0174683D" { set x [expr $x+1]; exp_continue; }
48
        -re ".*  16      0110" { set x [expr $x+1]; exp_continue; }
49
        -re ".*  17              " {
50
            if [expr $x == 3] then {
51
                pass "$testname: addx.b @er3, ..."
52
            } else {
53
                fail "$testname: addx.b @er3, ... ($x)"
54
            }
55
        }
56
        default { fail "$testname: addx.b @er3, ... ($x)" }
57
    }
58
 
59
    set x 0
60
    expect {
61
        -re ".*  18 0022 01766C30" { set x [expr $x+1]; exp_continue; }
62
        -re ".*  18      0E01" { set x [expr $x+1]; exp_continue; }
63
        -re ".*  19 0028 01766C3D" { set x [expr $x+1]; exp_continue; }
64
        -re ".*  19      A110" { set x [expr $x+1]; exp_continue; }
65
        -re ".*  20              " {
66
            if [expr $x == 4] then {
67
                pass "$testname: addx.b @er3-, ..."
68
            } else {
69
                fail "$testname: addx.b @er3-, ... ($x)"
70
            }
71
        }
72
        default { fail "$testname: addx.b @er3-, ... ($x)" }
73
    }
74
 
75
    set x 0
76
    expect {
77
        -re ".*  21 002e 01517911" { set x [expr $x+1]; exp_continue; }
78
        -re ".*  21      1234" { set x [expr $x+1]; exp_continue; }
79
        -re ".*  22 0034 7D917910" { set x [expr $x+1]; exp_continue; }
80
        -re ".*  22      1234" { set x [expr $x+1]; exp_continue; }
81
        -re ".*  23 003a 01566D19" { set x [expr $x+1]; exp_continue; }
82
        -re ".*  23      79101234" { set x [expr $x+1]; exp_continue; }
83
        -re ".*  24              " {
84
            if [expr $x == 6] then {
85
                pass "$testname: addx.w #0x1234:16, ..."
86
            } else {
87
                fail "$testname: addx.w #0x1234:16, ... ($x)"
88
            }
89
        }
90
        default { fail "$testname: addx.w #0x1234:16, ... ($x)" }
91
    }
92
 
93
    set x 0
94
    expect {
95
        -re ".*  25 0042 01510931" { set x [expr $x+1]; exp_continue; }
96
        -re ".*  26 0046 7D910930" { set x [expr $x+1]; exp_continue; }
97
        -re ".*  27 004a 01566D19" { set x [expr $x+1]; exp_continue; }
98
        -re ".*  27      0930" { set x [expr $x+1]; exp_continue; }
99
        -re ".*  28              " {
100
            if [expr $x == 4] then {
101
                pass "$testname: addx.w r3, ..."
102
            } else {
103
                fail "$testname: addx.w r3, ... ($x)"
104
            }
105
        }
106
        default { fail "$testname: addx.w r3, ... ($x)" }
107
    }
108
 
109
    set x 0
110
    expect {
111
        -re ".*  29 0050 7CB10901" { set x [expr $x+1]; exp_continue; }
112
        -re ".*  30 0054 0154693D" { set x [expr $x+1]; exp_continue; }
113
        -re ".*  30      0110" { set x [expr $x+1]; exp_continue; }
114
        -re ".*  31              " {
115
            if [expr $x == 3] then {
116
                pass "$testname: addx.w @er3, ..."
117
            } else {
118
                fail "$testname: addx.w @er3, ... ($x)"
119
            }
120
        }
121
        default { fail "$testname: addx.w @er3, ... ($x)" }
122
    }
123
 
124
    set x 0
125
    expect {
126
        -re ".*  32 005a 01566D31" { set x [expr $x+1]; exp_continue; }
127
        -re ".*  32      0901" { set x [expr $x+1]; exp_continue; }
128
        -re ".*  33 0060 01566D3D" { set x [expr $x+1]; exp_continue; }
129
        -re ".*  33      A110" { set x [expr $x+1]; exp_continue; }
130
        -re ".*  34              " {
131
            if [expr $x == 4] then {
132
                pass "$testname: addx.w @er3-, ..."
133
            } else {
134
                fail "$testname: addx.w @er3-, ... ($x)"
135
            }
136
        }
137
        default { fail "$testname: addx.w @er3-, ... ($x)" }
138
    }
139
 
140
    set x 0
141
    expect {
142
        -re ".*  35 0066 01017A11" { set x [expr $x+1]; exp_continue; }
143
        -re ".*  35      12345678" { set x [expr $x+1]; exp_continue; }
144
        -re ".*  36 006e 01046919" { set x [expr $x+1]; exp_continue; }
145
        -re ".*  36      7A101234" { set x [expr $x+1]; exp_continue; }
146
        -re ".*  36      5678" { set x [expr $x+1]; exp_continue; }
147
        -re ".*  37 0078 01066D19" { set x [expr $x+1]; exp_continue; }
148
        -re ".*  37      7A101234" { set x [expr $x+1]; exp_continue; }
149
        -re ".*  37      5678" { set x [expr $x+1]; exp_continue; }
150
        -re ".*  38              " {
151
            if [expr $x == 8] then {
152
                pass "$testname: addx.l #0x12345678:32, ..."
153
            } else {
154
                fail "$testname: addx.l #0x12345678:32, ... ($x)"
155
            }
156
        }
157
        default { fail "$testname: addx.l #0x12345678:32, ... ($x)" }
158
    }
159
 
160
    set x 0
161
    expect {
162
        -re ".*  39 0082 01010AB1" { set x [expr $x+1]; exp_continue; }
163
        -re ".*  40 0086 01046919" { set x [expr $x+1]; exp_continue; }
164
        -re ".*  40      0AB0" { set x [expr $x+1]; exp_continue; }
165
        -re ".*  41 008c 01066D19" { set x [expr $x+1]; exp_continue; }
166
        -re ".*  41      0AB0" { set x [expr $x+1]; exp_continue; }
167
        -re ".*  42              " {
168
            if [expr $x == 5] then {
169
                pass "$testname: addx.l er3, ..."
170
            } else {
171
                fail "$testname: addx.l er3, ... ($x)"
172
            }
173
        }
174
        default { fail "$testname: addx.l er3, ... ($x)" }
175
    }
176
 
177
    set x 0
178
    expect {
179
        -re ".*  43 0092 01046931" { set x [expr $x+1]; exp_continue; }
180
        -re ".*  43      0A81" { set x [expr $x+1]; exp_continue; }
181
        -re ".*  44 0098 0104693D" { set x [expr $x+1]; exp_continue; }
182
        -re ".*  44      0110" { set x [expr $x+1]; exp_continue; }
183
        -re ".*  45              " {
184
            if [expr $x == 4] then {
185
                pass "$testname: addx.l @er3, ..."
186
            } else {
187
                fail "$testname: addx.l @er3, ... ($x)"
188
            }
189
        }
190
        default { fail "$testname: addx.l @er3, ... ($x)" }
191
    }
192
 
193
    set x 0
194
    expect {
195
        -re ".*  46 009e 01066D31" { set x [expr $x+1]; exp_continue; }
196
        -re ".*  46      0A81" { set x [expr $x+1]; exp_continue; }
197
        -re ".*  47 00a4 01066D3D" { set x [expr $x+1]; exp_continue; }
198
        -re ".*  47      A110" { set x [expr $x+1]; exp_continue; }
199
        -re ".*  48              " {
200
            if [expr $x == 4] then {
201
                pass "$testname: addx.l @er3-, ..."
202
            } else {
203
                fail "$testname: addx.l @er3-, ... ($x)"
204
            }
205
        }
206
        default { fail "$testname: addx.l @er3-, ... ($x)" }
207
    }
208
 
209
    set x 0
210
    expect {
211
        -re ".*  49 00aa B112" { set x [expr $x+1]; exp_continue; }
212
        -re ".*  50 00ac 7D10B012" { set x [expr $x+1]; exp_continue; }
213
        -re ".*  51 00b0 01766C18" { set x [expr $x+1]; exp_continue; }
214
        -re ".*  51      B012" { set x [expr $x+1]; exp_continue; }
215
        -re ".*  52              " {
216
            if [expr $x == 4] then {
217
                pass "$testname: subx.b #0x12:8, ..."
218
            } else {
219
                fail "$testname: subx.b #0x12:8, ... ($x)"
220
            }
221
        }
222
        default { fail "$testname: subx.b #0x12:8, ... ($x)" }
223
    }
224
 
225
    set x 0
226
    expect {
227
        -re ".*  53 00b6 1E31" { set x [expr $x+1]; exp_continue; }
228
        -re ".*  54 00b8 7D101E30" { set x [expr $x+1]; exp_continue; }
229
        -re ".*  55 00bc 01766C18" { set x [expr $x+1]; exp_continue; }
230
        -re ".*  55      1E30" { set x [expr $x+1]; exp_continue; }
231
        -re ".*  56              " {
232
            if [expr $x == 4] then {
233
                pass "$testname: subx.b r3h, ..."
234
            } else {
235
                fail "$testname: subx.b r3h, ... ($x)"
236
            }
237
        }
238
        default { fail "$testname: subx.b r3h, ... ($x)" }
239
    }
240
 
241
    set x 0
242
    expect {
243
        -re ".*  57 00c2 7C301E01" { set x [expr $x+1]; exp_continue; }
244
        -re ".*  58 00c6 0174683D" { set x [expr $x+1]; exp_continue; }
245
        -re ".*  58      0130" { set x [expr $x+1]; exp_continue; }
246
        -re ".*  59              " {
247
            if [expr $x == 3] then {
248
                pass "$testname: subx.b @er3, ..."
249
            } else {
250
                fail "$testname: subx.b @er3, ... ($x)"
251
            }
252
        }
253
        default { fail "$testname: subx.b @er3, ... ($x)" }
254
    }
255
 
256
    set x 0
257
    expect {
258
        -re ".*  60 00cc 01766C30" { set x [expr $x+1]; exp_continue; }
259
        -re ".*  60      1E01" { set x [expr $x+1]; exp_continue; }
260
        -re ".*  61 00d2 01766C3D" { set x [expr $x+1]; exp_continue; }
261
        -re ".*  61      A130" { set x [expr $x+1]; exp_continue; }
262
        -re ".*  62              " {
263
            if [expr $x == 4] then {
264
                pass "$testname: subx.b @er3-, ..."
265
            } else {
266
                fail "$testname: subx.b @er3-, ... ($x)"
267
            }
268
        }
269
        default { fail "$testname: subx.b @er3-, ... ($x)" }
270
    }
271
 
272
    set x 0
273
    expect {
274
        -re ".*  63 00d8 01517931" { set x [expr $x+1]; exp_continue; }
275
        -re ".*  63      1234" { set x [expr $x+1]; exp_continue; }
276
        -re ".*  64 00de 7D917930" { set x [expr $x+1]; exp_continue; }
277
        -re ".*  64      1234" { set x [expr $x+1]; exp_continue; }
278
        -re ".*  65 00e4 01566D19" { set x [expr $x+1]; exp_continue; }
279
        -re ".*  65      79301234" { set x [expr $x+1]; exp_continue; }
280
        -re ".*  66              " {
281
            if [expr $x == 6] then {
282
                pass "$testname: subx.w #0x1234:16, ..."
283
            } else {
284
                fail "$testname: subx.w #0x1234:16, ... ($x)"
285
            }
286
        }
287
        default { fail "$testname: subx.w #0x1234:16, ... ($x)" }
288
    }
289
 
290
    set x 0
291
    expect {
292
        -re ".*  67 00ec 01511931" { set x [expr $x+1]; exp_continue; }
293
        -re ".*  68 00f0 7D911930" { set x [expr $x+1]; exp_continue; }
294
        -re ".*  69 00f4 01566D19" { set x [expr $x+1]; exp_continue; }
295
        -re ".*  69      1930" { set x [expr $x+1]; exp_continue; }
296
        -re ".*  70              " {
297
            if [expr $x == 4] then {
298
                pass "$testname: subx.w r3, ..."
299
            } else {
300
                fail "$testname: subx.w r3, ... ($x)"
301
            }
302
        }
303
        default { fail "$testname: subx.w r3, ... ($x)" }
304
    }
305
 
306
    set x 0
307
    expect {
308
        -re ".*  71 00fa 7CB11901" { set x [expr $x+1]; exp_continue; }
309
        -re ".*  72 00fe 0154693D" { set x [expr $x+1]; exp_continue; }
310
        -re ".*  72      0130" { set x [expr $x+1]; exp_continue; }
311
        -re ".*  73              " {
312
            if [expr $x == 3] then {
313
                pass "$testname: subx.w @er3, ..."
314
            } else {
315
                fail "$testname: subx.w @er3, ... ($x)"
316
            }
317
        }
318
        default { fail "$testname: subx.w @er3, ... ($x)" }
319
    }
320
 
321
    set x 0
322
    expect {
323
        -re ".*  74 0104 01566D31" { set x [expr $x+1]; exp_continue; }
324
        -re ".*  74      1901" { set x [expr $x+1]; exp_continue; }
325
        -re ".*  75 010a 01566D3D" { set x [expr $x+1]; exp_continue; }
326
        -re ".*  75      A130" { set x [expr $x+1]; exp_continue; }
327
        -re ".*  76              " {
328
            if [expr $x == 4] then {
329
                pass "$testname: subx.w @er3-, ..."
330
            } else {
331
                fail "$testname: subx.w @er3-, ... ($x)"
332
            }
333
        }
334
        default { fail "$testname: subx.w @er3-, ... ($x)" }
335
    }
336
 
337
    set x 0
338
    expect {
339
        -re ".*  77 0110 01017A31" { set x [expr $x+1]; exp_continue; }
340
        -re ".*  77      12345678" { set x [expr $x+1]; exp_continue; }
341
        -re ".*  78 0118 01046919" { set x [expr $x+1]; exp_continue; }
342
        -re ".*  78      7A301234" { set x [expr $x+1]; exp_continue; }
343
        -re ".*  78      5678" { set x [expr $x+1]; exp_continue; }
344
        -re ".*  79 0122 01066D19" { set x [expr $x+1]; exp_continue; }
345
        -re ".*  79      7A301234" { set x [expr $x+1]; exp_continue; }
346
        -re ".*  79      5678" { set x [expr $x+1]; exp_continue; }
347
        -re ".*  80              " {
348
            if [expr $x == 8] then {
349
                pass "$testname: subx.l #0x12345678:32, ..."
350
            } else {
351
                fail "$testname: subx.l #0x12345678:32, ... ($x)"
352
            }
353
        }
354
        default { fail "$testname: subx.l #0x12345678:32, ... ($x)" }
355
    }
356
 
357
    set x 0
358
    expect {
359
        -re ".*  81 012c 01011AB1" { set x [expr $x+1]; exp_continue; }
360
        -re ".*  82 0130 01046919" { set x [expr $x+1]; exp_continue; }
361
        -re ".*  82      1AB0" { set x [expr $x+1]; exp_continue; }
362
        -re ".*  83 0136 01066D19" { set x [expr $x+1]; exp_continue; }
363
        -re ".*  83      1AB0" { set x [expr $x+1]; exp_continue; }
364
        -re ".*  84              " {
365
            if [expr $x == 5] then {
366
                pass "$testname: subx.l er3, ..."
367
            } else {
368
                fail "$testname: subx.l er3, ... ($x)"
369
            }
370
        }
371
        default { fail "$testname: subx.l er3, ... ($x)" }
372
    }
373
 
374
    set x 0
375
    expect {
376
        -re ".*  85 013c 01046931" { set x [expr $x+1]; exp_continue; }
377
        -re ".*  85      1A81" { set x [expr $x+1]; exp_continue; }
378
        -re ".*  86 0142 0104693D" { set x [expr $x+1]; exp_continue; }
379
        -re ".*  86      0130" { set x [expr $x+1]; exp_continue; }
380
        -re ".*  87              " {
381
            if [expr $x == 4] then {
382
                pass "$testname: subx.l @er3, ..."
383
            } else {
384
                fail "$testname: subx.l @er3, ... ($x)"
385
            }
386
        }
387
        default { fail "$testname: subx.l @er3, ... ($x)" }
388
    }
389
 
390
    set x 0
391
    expect {
392
        -re ".*  88 0148 01066D31" { set x [expr $x+1]; exp_continue; }
393
        -re ".*  88      1A81" { set x [expr $x+1]; exp_continue; }
394
        -re ".*  89 014e 01066D3D" { set x [expr $x+1]; exp_continue; }
395
        -re ".*  89      A130" { set x [expr $x+1]; exp_continue; }
396
        -re ".*  90              " {
397
            if [expr $x == 4] then {
398
                pass "$testname: subx.l @er3-, ..."
399
            } else {
400
                fail "$testname: subx.l @er3-, ... ($x)"
401
            }
402
        }
403
        default { fail "$testname: subx.l @er3-, ... ($x)" }
404
    }
405
 
406
    set x 0
407
    expect {
408
        -re ".*  91 0154 0A01" { set x [expr $x+1]; exp_continue; }
409
        -re ".*  92 0156 0B51" { set x [expr $x+1]; exp_continue; }
410
        -re ".*  93 0158 0BD1" { set x [expr $x+1]; exp_continue; }
411
        -re ".*  94 015a 0B71" { set x [expr $x+1]; exp_continue; }
412
        -re ".*  95 015c 0BF1" { set x [expr $x+1]; exp_continue; }
413
        -re ".*  96              " {
414
            if [expr $x == 5] then {
415
                pass "$testname: inc"
416
            } else {
417
                fail "$testname: inc ($x)"
418
            }
419
        }
420
        default { fail "$testname: inc ($x)" }
421
    }
422
 
423
    set x 0
424
    expect {
425
        -re ".*  97 015e 1A01" { set x [expr $x+1]; exp_continue; }
426
        -re ".*  98 0160 1B51" { set x [expr $x+1]; exp_continue; }
427
        -re ".*  99 0162 1BD1" { set x [expr $x+1]; exp_continue; }
428
        -re ".* 100 0164 1B71" { set x [expr $x+1]; exp_continue; }
429
        -re ".* 101 0166 1BF1" { set x [expr $x+1]; exp_continue; }
430
        -re ".* 102              " {
431
            if [expr $x == 5] then {
432
                pass "$testname: dec"
433
            } else {
434
                fail "$testname: dec ($x)"
435
            }
436
        }
437
        default { fail "$testname: dec ($x)" }
438
    }
439
 
440
    set x 0
441
    expect {
442
        -re ".* 103 0168 0B01" { set x [expr $x+1]; exp_continue; }
443
        -re ".* 104 016a 0B81" { set x [expr $x+1]; exp_continue; }
444
        -re ".* 105 016c 0B91" { set x [expr $x+1]; exp_continue; }
445
        -re ".* 106              " {
446
            if [expr $x == 3] then {
447
                pass "$testname: adds.l ..., er1"
448
            } else {
449
                fail "$testname: adds.l ..., er1 ($x)"
450
            }
451
        }
452
        default { fail "$testname: adds.l ..., er1 ($x)" }
453
    }
454
 
455
    set x 0
456
    expect {
457
        -re ".* 107 016e 1B01" { set x [expr $x+1]; exp_continue; }
458
        -re ".* 108 0170 1B81" { set x [expr $x+1]; exp_continue; }
459
        -re ".* 109 0172 1B91" { set x [expr $x+1]; exp_continue; }
460
        -re ".* 110              " {
461
            if [expr $x == 3] then {
462
                pass "$testname: subs.l #4,er1"
463
            } else {
464
                fail "$testname: subs.l #4,er1 ($x)"
465
            }
466
        }
467
        default { fail "$testname: subs.l #4,er1 ($x)" }
468
    }
469
 
470
    set x 0
471
    expect {
472
        -re ".* 111 0174 0F01" { set x [expr $x+1]; exp_continue; }
473
        -re ".* 112              " {
474
            if [expr $x == 1] then {
475
                pass "$testname: daa.b r1h"
476
            } else {
477
                fail "$testname: daa.b r1h ($x)"
478
            }
479
        }
480
        default { fail "$testname: daa.b r1h ($x)" }
481
    }
482
 
483
    set x 0
484
    expect {
485
        -re ".* 113 0176 1F01" { set x [expr $x+1]; exp_continue; }
486
        -re ".* 114              " {
487
            if [expr $x == 1] then {
488
                pass "$testname: das.b r1h"
489
            } else {
490
                fail "$testname: das.b r1h ($x)"
491
            }
492
        }
493
        default { fail "$testname: das.b r1h ($x)" }
494
    }
495
 
496
    set x 0
497
    expect {
498
        -re ".* 115 0178 01CC50F1" { set x [expr $x+1]; exp_continue; }
499
        -re ".* 116              " {
500
            if [expr $x == 1] then {
501
                pass "$testname: mulxu.b #0xf:4,r1"
502
            } else {
503
                fail "$testname: mulxu.b #0xf:4,r1 ($x)"
504
            }
505
        }
506
        default { fail "$testname: mulxu.b #0xf:4,r1 ($x)" }
507
    }
508
 
509
    set x 0
510
    expect {
511
        -re ".* 117 017c 5031" { set x [expr $x+1]; exp_continue; }
512
        -re ".* 118              " {
513
            if [expr $x == 1] then {
514
                pass "$testname: mulxu.b r3h,r1"
515
            } else {
516
                fail "$testname: mulxu.b r3h,r1 ($x)"
517
            }
518
        }
519
        default { fail "$testname: mulxu.b r3h,r1 ($x)" }
520
    }
521
 
522
    set x 0
523
    expect {
524
        -re ".* 119 017e 01CC52F1" { set x [expr $x+1]; exp_continue; }
525
        -re ".* 120              " {
526
            if [expr $x == 1] then {
527
                pass "$testname: mulxu.w #0xf:4,er1"
528
            } else {
529
                fail "$testname: mulxu.w #0xf:4,er1 ($x)"
530
            }
531
        }
532
        default { fail "$testname: mulxu.w #0xf:4,er1 ($x)" }
533
    }
534
 
535
    set x 0
536
    expect {
537
        -re ".* 121 0182 5231" { set x [expr $x+1]; exp_continue; }
538
        -re ".* 122              " {
539
            if [expr $x == 1] then {
540
                pass "$testname: mulxu.w r3,er1"
541
            } else {
542
                fail "$testname: mulxu.w r3,er1 ($x)"
543
            }
544
        }
545
        default { fail "$testname: mulxu.w r3,er1 ($x)" }
546
    }
547
 
548
    set x 0
549
    expect {
550
        -re ".* 123 0184 01DC51F1" { set x [expr $x+1]; exp_continue; }
551
        -re ".* 124              " {
552
            if [expr $x == 1] then {
553
                pass "$testname: divxu.b #0xf:4,r1"
554
            } else {
555
                fail "$testname: divxu.b #0xf:4,r1 ($x)"
556
            }
557
        }
558
        default { fail "$testname: divxu.b #0xf:4,r1 ($x)" }
559
    }
560
 
561
    set x 0
562
    expect {
563
        -re ".* 125 0188 5131" { set x [expr $x+1]; exp_continue; }
564
        -re ".* 126              " {
565
            if [expr $x == 1] then {
566
                pass "$testname: divxu.b r3h,r1"
567
            } else {
568
                fail "$testname: divxu.b r3h,r1 ($x)"
569
            }
570
        }
571
        default { fail "$testname: divxu.b r3h,r1 ($x)" }
572
    }
573
 
574
    set x 0
575
    expect {
576
        -re ".* 127 018a 01DC53F1" { set x [expr $x+1]; exp_continue; }
577
        -re ".* 128              " {
578
            if [expr $x == 1] then {
579
                pass "$testname: divxu.w #0xf:4,er1"
580
            } else {
581
                fail "$testname: divxu.w #0xf:4,er1 ($x)"
582
            }
583
        }
584
        default { fail "$testname: divxu.w #0xf:4,er1 ($x)" }
585
    }
586
 
587
    set x 0
588
    expect {
589
        -re ".* 129 018e 5331" { set x [expr $x+1]; exp_continue; }
590
        -re ".* 130              " {
591
            if [expr $x == 1] then {
592
                pass "$testname: divxu.w r3,er1"
593
            } else {
594
                fail "$testname: divxu.w r3,er1 ($x)"
595
            }
596
        }
597
        default { fail "$testname: divxu.w r3,er1 ($x)" }
598
    }
599
 
600
    set x 0
601
    expect {
602
        -re ".* 131 0190 01C450F1" { set x [expr $x+1]; exp_continue; }
603
        -re ".* 132              " {
604
            if [expr $x == 1] then {
605
                pass "$testname: mulxs.b #0xf:4,r1"
606
            } else {
607
                fail "$testname: mulxs.b #0xf:4,r1 ($x)"
608
            }
609
        }
610
        default { fail "$testname: mulxs.b #0xf:4,r1 ($x)" }
611
    }
612
 
613
    set x 0
614
    expect {
615
        -re ".* 133 0194 01C05031" { set x [expr $x+1]; exp_continue; }
616
        -re ".* 134              " {
617
            if [expr $x == 1] then {
618
                pass "$testname: mulxs.b r3h,r1"
619
            } else {
620
                fail "$testname: mulxs.b r3h,r1 ($x)"
621
            }
622
        }
623
        default { fail "$testname: mulxs.b r3h,r1 ($x)" }
624
    }
625
 
626
    set x 0
627
    expect {
628
        -re ".* 135 0198 01C452F1" { set x [expr $x+1]; exp_continue; }
629
        -re ".* 136              " {
630
            if [expr $x == 1] then {
631
                pass "$testname: mulxs.w #0xf:4,er1"
632
            } else {
633
                fail "$testname: mulxs.w #0xf:4,er1 ($x)"
634
            }
635
        }
636
        default { fail "$testname: mulxs.w #0xf:4,er1 ($x)" }
637
    }
638
 
639
    set x 0
640
    expect {
641
        -re ".* 137 019c 01C05231" { set x [expr $x+1]; exp_continue; }
642
        -re ".* 138              " {
643
            if [expr $x == 1] then {
644
                pass "$testname: mulxs.w r3,er1"
645
            } else {
646
                fail "$testname: mulxs.w r3,er1 ($x)"
647
            }
648
        }
649
        default { fail "$testname: mulxs.w r3,er1 ($x)" }
650
    }
651
 
652
    set x 0
653
    expect {
654
        -re ".* 139 01a0 01D451F1" { set x [expr $x+1]; exp_continue; }
655
        -re ".* 140              " {
656
            if [expr $x == 1] then {
657
                pass "$testname: divxs.b #0xf:4,r1"
658
            } else {
659
                fail "$testname: divxs.b #0xf:4,r1 ($x)"
660
            }
661
        }
662
        default { fail "$testname: divxs.b #0xf:4,r1 ($x)" }
663
    }
664
 
665
    set x 0
666
    expect {
667
        -re ".* 141 01a4 01D05131" { set x [expr $x+1]; exp_continue; }
668
        -re ".* 142              " {
669
            if [expr $x == 1] then {
670
                pass "$testname: divxs.b r3h,r1"
671
            } else {
672
                fail "$testname: divxs.b r3h,r1 ($x)"
673
            }
674
        }
675
        default { fail "$testname: divxs.b r3h,r1 ($x)" }
676
    }
677
 
678
    set x 0
679
    expect {
680
        -re ".* 143 01a8 01D453F1" { set x [expr $x+1]; exp_continue; }
681
        -re ".* 144              " {
682
            if [expr $x == 1] then {
683
                pass "$testname: divxs.w #0xf:4,er1"
684
            } else {
685
                fail "$testname: divxs.w #0xf:4,er1 ($x)"
686
            }
687
        }
688
        default { fail "$testname: divxs.w #0xf:4,er1 ($x)" }
689
    }
690
 
691
    set x 0
692
    expect {
693
        -re ".* 145 01ac 01D05331" { set x [expr $x+1]; exp_continue; }
694
        -re ".* 146              " {
695
            if [expr $x == 1] then {
696
                pass "$testname: divxs.w r3,er1"
697
            } else {
698
                fail "$testname: divxs.w r3,er1 ($x)"
699
            }
700
        }
701
        default { fail "$testname: divxs.w r3,er1 ($x)" }
702
    }
703
 
704
    set x 0
705
    expect {
706
        -re ".* 147 01b0 01CE50F1" { set x [expr $x+1]; exp_continue; }
707
        -re ".* 148              " {
708
            if [expr $x == 1] then {
709
                pass "$testname: mulu.w #0xf:4,r1"
710
            } else {
711
                fail "$testname: mulu.w #0xf:4,r1 ($x)"
712
            }
713
        }
714
        default { fail "$testname: mulu.w #0xf:4,r1 ($x)" }
715
    }
716
 
717
    set x 0
718
    expect {
719
        -re ".* 149 01b4 01CA5031" { set x [expr $x+1]; exp_continue; }
720
        -re ".* 150              " {
721
            if [expr $x == 1] then {
722
                pass "$testname: mulu.w r3,r1"
723
            } else {
724
                fail "$testname: mulu.w r3,r1 ($x)"
725
            }
726
        }
727
        default { fail "$testname: mulu.w r3,r1 ($x)" }
728
    }
729
 
730
    set x 0
731
    expect {
732
        -re ".* 151 01b8 01CE52F1" { set x [expr $x+1]; exp_continue; }
733
        -re ".* 152              " {
734
            if [expr $x == 1] then {
735
                pass "$testname: mulu.l #0xf:4,er1"
736
            } else {
737
                fail "$testname: mulu.l #0xf:4,er1 ($x)"
738
            }
739
        }
740
        default { fail "$testname: mulu.l #0xf:4,er1 ($x)" }
741
    }
742
 
743
    set x 0
744
    expect {
745
        -re ".* 153 01bc 01CA5231" { set x [expr $x+1]; exp_continue; }
746
        -re ".* 154              " {
747
            if [expr $x == 1] then {
748
                pass "$testname: mulu.l er3,er1"
749
            } else {
750
                fail "$testname: mulu.l er3,er1 ($x)"
751
            }
752
        }
753
        default { fail "$testname: mulu.l er3,er1 ($x)" }
754
    }
755
 
756
    set x 0
757
    expect {
758
        -re ".* 155 01c0 01CF52F1" { set x [expr $x+1]; exp_continue; }
759
        -re ".* 156              " {
760
            if [expr $x == 1] then {
761
                pass "$testname: mulu/u.l #0xf:4,er1"
762
            } else {
763
                fail "$testname: mulu/u.l #0xf:4,er1 ($x)"
764
            }
765
        }
766
        default { fail "$testname: mulu/u.l #0xf:4,er1 ($x)" }
767
    }
768
 
769
    set x 0
770
    expect {
771
        -re ".* 157 01c4 01CB5231" { set x [expr $x+1]; exp_continue; }
772
        -re ".* 158              " {
773
            if [expr $x == 1] then {
774
                pass "$testname: mulu/u.l er3,er1"
775
            } else {
776
                fail "$testname: mulu/u.l er3,er1 ($x)"
777
            }
778
        }
779
        default { fail "$testname: mulu/u.l er3,er1 ($x)" }
780
    }
781
 
782
    set x 0
783
    expect {
784
        -re ".* 159 01c8 01C650F1" { set x [expr $x+1]; exp_continue; }
785
        -re ".* 160              " {
786
            if [expr $x == 1] then {
787
                pass "$testname: muls.w #0xf:4,r1"
788
            } else {
789
                fail "$testname: muls.w #0xf:4,r1 ($x)"
790
            }
791
        }
792
        default { fail "$testname: muls.w #0xf:4,r1 ($x)" }
793
    }
794
 
795
    set x 0
796
    expect {
797
        -re ".* 161 01cc 01C25031" { set x [expr $x+1]; exp_continue; }
798
        -re ".* 162              " {
799
            if [expr $x == 1] then {
800
                pass "$testname: muls.w r3,r1"
801
            } else {
802
                fail "$testname: muls.w r3,r1 ($x)"
803
            }
804
        }
805
        default { fail "$testname: muls.w r3,r1 ($x)" }
806
    }
807
 
808
    set x 0
809
    expect {
810
        -re ".* 163 01d0 01C652F1" { set x [expr $x+1]; exp_continue; }
811
        -re ".* 164              " {
812
            if [expr $x == 1] then {
813
                pass "$testname: muls.l #0xf:4,er1"
814
            } else {
815
                fail "$testname: muls.l #0xf:4,er1 ($x)"
816
            }
817
        }
818
        default { fail "$testname: muls.l #0xf:4,er1 ($x)" }
819
    }
820
 
821
    set x 0
822
    expect {
823
        -re ".* 165 01d4 01C25231" { set x [expr $x+1]; exp_continue; }
824
        -re ".* 166              " {
825
            if [expr $x == 1] then {
826
                pass "$testname: muls.l er3,er1"
827
            } else {
828
                fail "$testname: muls.l er3,er1 ($x)"
829
            }
830
        }
831
        default { fail "$testname: muls.l er3,er1 ($x)" }
832
    }
833
 
834
    set x 0
835
    expect {
836
        -re ".* 167 01d8 01C752F1" { set x [expr $x+1]; exp_continue; }
837
        -re ".* 168              " {
838
            if [expr $x == 1] then {
839
                pass "$testname: muls/u.l #0xf:4,er1"
840
            } else {
841
                fail "$testname: muls/u.l #0xf:4,er1 ($x)"
842
            }
843
        }
844
        default { fail "$testname: muls/u.l #0xf:4,er1 ($x)" }
845
    }
846
 
847
    set x 0
848
    expect {
849
        -re ".* 169 01dc 01C35231" { set x [expr $x+1]; exp_continue; }
850
        -re ".* 170              " {
851
            if [expr $x == 1] then {
852
                pass "$testname: muls/u.l er3,er1"
853
            } else {
854
                fail "$testname: muls/u.l er3,er1 ($x)"
855
            }
856
        }
857
        default { fail "$testname: muls/u.l er3,er1 ($x)" }
858
    }
859
 
860
    set x 0
861
    expect {
862
        -re ".* 171 01e0 01DE51F1" { set x [expr $x+1]; exp_continue; }
863
        -re ".* 172              " {
864
            if [expr $x == 1] then {
865
                pass "$testname: divu.w #0xf:4,r1"
866
            } else {
867
                fail "$testname: divu.w #0xf:4,r1 ($x)"
868
            }
869
        }
870
        default { fail "$testname: divu.w #0xf:4,r1 ($x)" }
871
    }
872
 
873
    set x 0
874
    expect {
875
        -re ".* 173 01e4 01DA5131" { set x [expr $x+1]; exp_continue; }
876
        -re ".* 174              " {
877
            if [expr $x == 1] then {
878
                pass "$testname: divu.w r3,r1"
879
            } else {
880
                fail "$testname: divu.w r3,r1 ($x)"
881
            }
882
        }
883
        default { fail "$testname: divu.w r3,r1 ($x)" }
884
    }
885
 
886
    set x 0
887
    expect {
888
        -re ".* 175 01e8 01DE53F1" { set x [expr $x+1]; exp_continue; }
889
        -re ".* 176              " {
890
            if [expr $x == 1] then {
891
                pass "$testname: divu.l #0xf:4,er1"
892
            } else {
893
                fail "$testname: divu.l #0xf:4,er1 ($x)"
894
            }
895
        }
896
        default { fail "$testname: divu.l #0xf:4,er1 ($x)" }
897
    }
898
 
899
    set x 0
900
    expect {
901
        -re ".* 177 01ec 01DA5331" { set x [expr $x+1]; exp_continue; }
902
        -re ".* 178              " {
903
            if [expr $x == 1] then {
904
                pass "$testname: divu.l er3,er1"
905
            } else {
906
                fail "$testname: divu.l er3,er1 ($x)"
907
            }
908
        }
909
        default { fail "$testname: divu.l er3,er1 ($x)" }
910
    }
911
 
912
    set x 0
913
    expect {
914
        -re ".* 179 01f0 01D651F1" { set x [expr $x+1]; exp_continue; }
915
        -re ".* 180              " {
916
            if [expr $x == 1] then {
917
                pass "$testname: divs.w #0xf:4,r1"
918
            } else {
919
                fail "$testname: divs.w #0xf:4,r1 ($x)"
920
            }
921
        }
922
        default { fail "$testname: divs.w #0xf:4,r1 ($x)" }
923
    }
924
 
925
    set x 0
926
    expect {
927
        -re ".* 181 01f4 01D25131" { set x [expr $x+1]; exp_continue; }
928
        -re ".* 182              " {
929
            if [expr $x == 1] then {
930
                pass "$testname: divs.w r3,r1"
931
            } else {
932
                fail "$testname: divs.w r3,r1 ($x)"
933
            }
934
        }
935
        default { fail "$testname: divs.w r3,r1 ($x)" }
936
    }
937
 
938
    set x 0
939
    expect {
940
        -re ".* 183 01f8 01D653F1" { set x [expr $x+1]; exp_continue; }
941
        -re ".* 184              " {
942
            if [expr $x == 1] then {
943
                pass "$testname: divs.l #0xf:4,er1"
944
            } else {
945
                fail "$testname: divs.l #0xf:4,er1 ($x)"
946
            }
947
        }
948
        default { fail "$testname: divs.l #0xf:4,er1 ($x)" }
949
    }
950
 
951
    set x 0
952
    expect {
953
        -re ".* 185 01fc 01D25331" { set x [expr $x+1]; exp_continue; }
954
        -re ".* 186              " {
955
            if [expr $x == 1] then {
956
                pass "$testname: divs.l er3,er1"
957
            } else {
958
                fail "$testname: divs.l er3,er1 ($x)"
959
            }
960
        }
961
        default { fail "$testname: divs.l er3,er1 ($x)" }
962
    }
963
 
964
    # This was intended to do any cleanup necessary.
965
    # It kinda looks like it isn't needed, but just
966
    # in case, please keep it in for now.
967
 
968
    gas_finish
969
 
970
}
971
 
972
if [istarget h8300*-*-elf] then {
973
    # Test advanced h8300sx instructions.
974
    do_t06_ari2_test
975
}
976
 

powered by: WebSVN 2.1.0

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