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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.disasm/] [am33.exp] - Blame information for rev 853

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
 
2
# Copyright 1997, 1998, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3
 
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 3 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program.  If not, see .
16
 
17
# This file was written by Jeff Law. (law@cygnus.com)
18
 
19
if $tracelevel then {
20
        strace $tracelevel
21
}
22
 
23
if ![istarget "mn10300*-*-*"] {
24
    verbose "Tests ignored for all but mn10300 based targets."
25
    return
26
}
27
 
28
global exec_output
29
set prms_id 0
30
set bug_id 0
31
 
32
set testfile "am33"
33
set srcfile ${srcdir}/${subdir}/${testfile}.s
34
set binfile ${objdir}/${subdir}/${testfile}
35
if  { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } {
36
     untested am33.exp
37
     return -1
38
}
39
 
40
proc call_tests { } {
41
    global gdb_prompt
42
    global hex
43
    global decimal
44
 
45
    send_gdb "x/8i call_tests\n"
46
    gdb_expect {
47
        -re "
48
.*call  .*,.a2,a3,exreg0.,9.*
49
.*call  .*,.a2,a3,exreg1.,9.*
50
.*call  .*,.a2,a3,exother.,9.*
51
.*call  .*,.d2,d3,a2,a3,other,exreg0,exreg1,exother.,9.*
52
.*call  .*,.a2,a3,exreg0.,9.*
53
.*call  .*,.a2,a3,exreg1.,9.*
54
.*call  .*,.a2,a3,exother.,9.*
55
.*call  .*,.d2,d3,a2,a3,other,exreg0,exreg1,exother.,9.*
56
.*$gdb_prompt $" { pass "call tests" }
57
        -re "$gdb_prompt $" { fail "call tests" }
58
        timeout { fail "(timeout) call tests" }
59
    }
60
}
61
 
62
proc movm_tests { } {
63
    global gdb_prompt
64
    global hex
65
    global decimal
66
 
67
    send_gdb "x/16i movm_tests\n"
68
    gdb_expect {
69
        -re "
70
.*movm  \\(sp\\),.a2,a3,exreg0.*
71
.*movm  \\(sp\\),.a2,a3,exreg1.*
72
.*movm  \\(sp\\),.a2,a3,exother.*
73
.*movm  \\(sp\\),.d2,d3,a2,a3,other,exreg0,exreg1,exother.*
74
.*movm  .a2,a3,exreg0.,\\(sp\\).*
75
.*movm  .a2,a3,exreg1.,\\(sp\\).*
76
.*movm  .a2,a3,exother.,\\(sp\\).*
77
.*movm  .d2,d3,a2,a3,other,exreg0,exreg1,exother.,\\(sp\\).*
78
.*movm  \\(usp\\),.a2,a3,exreg0.*
79
.*movm  \\(usp\\),.a2,a3,exreg1.*
80
.*movm  \\(usp\\),.a2,a3,exother.*
81
.*movm  \\(usp\\),.d2,d3,a2,a3,other,exreg0,exreg1,exother.*
82
.*movm  .a2,a3,exreg0.,\\(usp\\).*
83
.*movm  .a2,a3,exreg1.,\\(usp\\).*
84
.*movm  .a2,a3,exother.,\\(usp\\).*
85
.*movm  .d2,d3,a2,a3,other,exreg0,exreg1,exother.,\\(usp\\).*
86
.*$gdb_prompt $" { pass "movm tests" }
87
        -re "$gdb_prompt $" { fail "movm tests" }
88
        timeout { fail "(timeout) movm tests" }
89
    }
90
}
91
 
92
proc misc_tests { } {
93
    global gdb_prompt
94
    global hex
95
    global decimal
96
 
97
    send_gdb "x/11i misc_tests\n"
98
    gdb_expect {
99
        -re "
100
.*syscall       4.*
101
.*mcst9 d0.*
102
.*mcst48        d1.*
103
.*getchx        d0.*
104
.*getclx        d1.*
105
.*clr   a1.*
106
.*sat16 a1,a0.*
107
.*mcste r7,r6.*
108
.*swap  r5,r4.*
109
.*swaph r3,r2.*
110
.*swhw  r1,r0.*
111
.*$gdb_prompt $" { pass "misc tests" }
112
        -re "$gdb_prompt $" { fail "misc tests" }
113
        timeout { fail "(timeout) misc tests" }
114
    }
115
}
116
 
117
proc mov_tests { } {
118
    global gdb_prompt
119
    global hex
120
    global decimal
121
 
122
    send_gdb "x/45i mov_tests\n"
123
    gdb_expect {
124
        -re "
125
.*mov   r0,r1.*
126
.*mov   sp,r1.*
127
.*mov   r1,xr2.*
128
.*mov   \\(r1\\),r2.*
129
.*mov   r3,\\(r4\\).*
130
.*mov   \\(sp\\),r5.*
131
.*mov   r6,\\(sp\\).*
132
.*mov   16,r1.*
133
.*mov   16,xr1.*
134
.*mov   \\(16,r1\\),r2.*
135
.*mov   r2,\\(16,r1\\).*
136
.*mov   \\(16,sp\\),r2.*
137
.*mov   r2,\\(16,sp\\).*
138
.*mov   2096895,r2.*
139
.*mov   2096895,xr2.*
140
.*mov   \\(2096895,r1\\),r2.*
141
.*mov   r2,\\(2096895,r1\\).*
142
.*mov   \\(2096895,sp\\),r2.*
143
.*mov   r2,\\(2096895,sp\\).*
144
.*mov   \\(0x1ffeff\\),r2.*
145
.*mov   r2,\\(0x1ffeff\\).*
146
.*mov   2147417596,r2.*
147
.*mov   2147417596,xr2.*
148
.*mov   \\(2147417596,r1\\),r2.*
149
.*mov   r2,\\(2147417596,r1\\).*
150
.*mov   \\(2147417596,sp\\),r2.*
151
.*mov   r2,\\(2147417596,sp\\).*
152
.*mov   \\(0x7ffefdfc\\),r2.*
153
.*mov   r2,\\(0x7ffefdfc\\).*
154
.*movu  16,r1.*
155
.*movu  2096895,r2.*
156
.*movu  2147417596,r2.*
157
.*mov   usp,a0.*
158
.*mov   ssp,a1.*
159
.*mov   msp,a2.*
160
.*mov   pc,a3.*
161
.*mov   a0,usp.*
162
.*mov   a1,ssp.*
163
.*mov   a2,msp.*
164
.*mov   epsw,d0.*
165
.*mov   d1,epsw.*
166
.*mov   a0,r1.*
167
.*mov   d2,r3.*
168
.*mov   r5,a1.*
169
.*mov   r7,d3.*
170
.*$gdb_prompt $" { pass "mov tests" }
171
        -re "$gdb_prompt $" { fail "mov tests" }
172
        timeout { fail "(timeout) mov tests" }
173
    }
174
}
175
 
176
proc ext_tests { } {
177
    global gdb_prompt
178
    global hex
179
    global decimal
180
 
181
    send_gdb "x/5i ext_tests\n"
182
    gdb_expect {
183
        -re "
184
.*ext   r2.*
185
.*extb  r3,r4.*
186
.*extbu r4,r5.*
187
.*exth  r6,r7.*
188
.*exthu r7,a0.*
189
.*$gdb_prompt $" { pass "ext tests" }
190
        -re "$gdb_prompt $" { fail "ext tests" }
191
        timeout { fail "(timeout) ext tests" }
192
    }
193
}
194
 
195
proc add_tests { } {
196
    global gdb_prompt
197
    global hex
198
    global decimal
199
 
200
    send_gdb "x/11i add_tests\n"
201
    gdb_expect {
202
        -re "
203
.*add   a2,a3.*
204
.*add   16,r1.*
205
.*add   2096895,r2.*
206
.*add   2147417596,r2.*
207
.*add   r1,r2,r3.*
208
.*addc  d0,d1.*
209
.*addc  16,r1.*
210
.*addc  2096895,r2.*
211
.*addc  2147417596,r2.*
212
.*inc   d1.*
213
.*inc4  d0.*
214
.*$gdb_prompt $" { pass "add tests" }
215
        -re "$gdb_prompt $" { fail "add tests" }
216
        timeout { fail "(timeout) add tests" }
217
    }
218
}
219
 
220
proc sub_tests { } {
221
    global gdb_prompt
222
    global hex
223
    global decimal
224
 
225
    send_gdb "x/8i sub_tests\n"
226
    gdb_expect {
227
        -re "
228
.*sub   d2,d3.*
229
.*sub   16,r1.*
230
.*sub   2096895,r2.*
231
.*sub   2147417596,r2.*
232
.*subc  d3,d2.*
233
.*subc  16,r1.*
234
.*subc  2096895,r2.*
235
.*subc  2147417596,r2.*
236
.*$gdb_prompt $" { pass "sub tests" }
237
        -re "$gdb_prompt $" { fail "sub tests" }
238
        timeout { fail "(timeout) sub tests" }
239
    }
240
}
241
 
242
proc cmp_tests { } {
243
    global gdb_prompt
244
    global hex
245
    global decimal
246
 
247
    send_gdb "x/4i cmp_tests\n"
248
    gdb_expect {
249
        -re "
250
.*cmp   a3,a2.*
251
.*cmp   16,r1.*
252
.*cmp   2096895,r2.*
253
.*cmp   2147417596,r2.*
254
.*$gdb_prompt $" { pass "cmp tests" }
255
        -re "$gdb_prompt $" { fail "cmp tests" }
256
        timeout { fail "(timeout) cmp tests" }
257
    }
258
}
259
 
260
proc logical_tests { } {
261
    global gdb_prompt
262
    global hex
263
    global decimal
264
 
265
    send_gdb "x/15i logical_tests\n"
266
    gdb_expect {
267
        -re "
268
.*and   r0,r1.*
269
.*or    r2,r3.*
270
.*xor   r4,r5.*
271
.*not   r6.*
272
.*and   16,r1.*
273
.*or    16,r1.*
274
.*xor   16,r1.*
275
.*and   2096895,r2.*
276
.*or    2096895,r2.*
277
.*xor   2096895,r2.*
278
.*and   2147417596,r2.*
279
.*or    2147417596,r2.*
280
.*xor   2147417596,r2.*
281
.*and   131072,epsw.*
282
.*or    65535,epsw.*
283
.*$gdb_prompt $" { pass "logical tests" }
284
        -re "$gdb_prompt $" { fail "logical tests" }
285
        timeout { fail "(timeout) logical tests" }
286
    }
287
}
288
 
289
proc shift_tests { } {
290
    global gdb_prompt
291
    global hex
292
    global decimal
293
 
294
    send_gdb "x/15i shift_tests\n"
295
    gdb_expect {
296
        -re "
297
.*asr   r7,a0.*
298
.*lsr   a1,a2.*
299
.*asl   a3,d0.*
300
.*asl2  d1.*
301
.*ror   d2.*
302
.*rol   d3.*
303
.*asr   16,r1.*
304
.*lsr   16,r1.*
305
.*asl   16,r1.*
306
.*asr   2096895,r2.*
307
.*lsr   2096895,r2.*
308
.*asl   2096895,r2.*
309
.*asr   2147417596,r2.*
310
.*lsr   2147417596,r2.*
311
.*asl   2147417596,r2.*
312
.*$gdb_prompt $" { pass "shift tests" }
313
        -re "$gdb_prompt $" { fail "shift tests" }
314
        timeout { fail "(timeout) shift tests" }
315
    }
316
}
317
 
318
proc muldiv_tests { } {
319
    global gdb_prompt
320
    global hex
321
    global decimal
322
 
323
    send_gdb "x/16i muldiv_tests\n"
324
    gdb_expect {
325
        -re "
326
.*mul   r1,r2.*
327
.*mulu  r3,r4.*
328
.*mul   16,r1.*
329
.*mulu  16,r1.*
330
.*mul   2096895,r2.*
331
.*mulu  2096895,r2.*
332
.*mul   2147417596,r2.*
333
.*mulu  2147417596,r2.*
334
.*div   r5,r6.*
335
.*divu  r7,a0.*
336
.*dmulh d1,d0.*
337
.*dmulhu        a3,a2.*
338
.*dmulh 2147417596,r2.*
339
.*dmulhu        2147417596,r2.*
340
.*mul   r1,r2,r3,r4.*
341
.*mulu  r1,r2,r3,r4.*
342
.*$gdb_prompt $" { pass "muldiv tests" }
343
        -re "$gdb_prompt $" { fail "muldiv tests" }
344
        timeout { fail "(timeout) muldiv tests" }
345
    }
346
}
347
 
348
proc movbu_tests { } {
349
    global gdb_prompt
350
    global hex
351
    global decimal
352
 
353
    send_gdb "x/20i movbu_tests\n"
354
    gdb_expect {
355
        -re "
356
.*movbu \\(r5\\),r6.*
357
.*movbu r7,\\(a0\\).*
358
.*movbu \\(sp\\),r7.*
359
.*movbu a0,\\(sp\\).*
360
.*movbu \\(16,r1\\),r2.*
361
.*movbu r2,\\(16,r1\\).*
362
.*movbu \\(16,sp\\),r2.*
363
.*movbu r2,\\(16,sp\\).*
364
.*movbu \\(2096895,r1\\),r2.*
365
.*movbu r2,\\(2096895,r1\\).*
366
.*movbu \\(2096895,sp\\),r2.*
367
.*movbu r2,\\(2096895,sp\\).*
368
.*movbu \\(0x1ffeff\\),r2.*
369
.*movbu r2,\\(0x1ffeff\\).*
370
.*movbu \\(2147417596,r1\\),r2.*
371
.*movbu r2,\\(2147417596,r1\\).*
372
.*movbu \\(2147417596,sp\\),r2.*
373
.*movbu r2,\\(2147417596,sp\\).*
374
.*movbu \\(0x7ffefdfc\\),r2.*
375
.*movbu r2,\\(0x7ffefdfc\\).*
376
.*$gdb_prompt $" { pass "movbu tests" }
377
        -re "$gdb_prompt $" { fail "movbu tests" }
378
        timeout { fail "(timeout) movbu tests" }
379
    }
380
}
381
 
382
proc movhu_tests { } {
383
    global gdb_prompt
384
    global hex
385
    global decimal
386
 
387
    send_gdb "x/20i movhu_tests\n"
388
    gdb_expect {
389
        -re "
390
.*movhu \\(a1\\),a2.*
391
.*movhu a3,\\(d0\\).*
392
.*movhu \\(sp\\),a1.*
393
.*movhu a2,\\(sp\\).*
394
.*movhu \\(16,r1\\),r2.*
395
.*movhu r2,\\(16,r1\\).*
396
.*movhu \\(16,sp\\),r2.*
397
.*movhu r2,\\(16,sp\\).*
398
.*movhu \\(2096895,r1\\),r2.*
399
.*movhu r2,\\(2096895,r1\\).*
400
.*movhu \\(2096895,sp\\),r2.*
401
.*movhu r2,\\(2096895,sp\\).*
402
.*movhu \\(0x1ffeff\\),r2.*
403
.*movhu r2,\\(0x1ffeff\\).*
404
.*movhu \\(2147417596,r1\\),r2.*
405
.*movhu r2,\\(2147417596,r1\\).*
406
.*movhu \\(2147417596,sp\\),r2.*
407
.*movhu r2,\\(2147417596,sp\\).*
408
.*movhu \\(0x7ffefdfc\\),r2.*
409
.*movhu r2,\\(0x7ffefdfc\\).*
410
.*$gdb_prompt $" { pass "movhu tests" }
411
        -re "$gdb_prompt $" { fail "movhu tests" }
412
        timeout { fail "(timeout) movhu tests" }
413
    }
414
}
415
 
416
proc mac_tests { } {
417
    global gdb_prompt
418
    global hex
419
    global decimal
420
 
421
    send_gdb "x/28i mac_tests\n"
422
    gdb_expect {
423
        -re "
424
.*mac   r1,r2.*
425
.*macu  r3,r4.*
426
.*macb  r5,r6.*
427
.*macbu r7,a0.*
428
.*mach  a1,a2.*
429
.*machu a3,d0.*
430
.*dmach d1,d2.*
431
.*dmachu        d3,d2.*
432
.*mac   16,r1.*
433
.*macu  16,r1.*
434
.*macb  16,r1.*
435
.*macbu 16,r1.*
436
.*mach  16,r1.*
437
.*machu 16,r1.*
438
.*mac   2096895,r2.*
439
.*macu  2096895,r2.*
440
.*macb  2096895,r2.*
441
.*macbu 2096895,r2.*
442
.*mach  2096895,r2.*
443
.*machu 2096895,r2.*
444
.*mac   2147417596,r2.*
445
.*macu  2147417596,r2.*
446
.*macb  2147417596,r2.*
447
.*macbu 2147417596,r2.*
448
.*mach  2147417596,r2.*
449
.*machu 2147417596,r2.*
450
.*dmach 2147417596,r2.*
451
.*dmachu        2147417596,r2.*
452
.*$gdb_prompt $" { pass "mac tests" }
453
        -re "$gdb_prompt $" { fail "mac tests" }
454
        timeout { fail "(timeout) mac tests" }
455
    }
456
}
457
 
458
proc bit_tests { } {
459
    global gdb_prompt
460
    global hex
461
    global decimal
462
 
463
    send_gdb "x/4i bit_tests\n"
464
    gdb_expect {
465
        -re "
466
.*bsch  r1,r2.*
467
.*btst  16,r1.*
468
.*btst  2096895,r2.*
469
.*btst  2147417596,r2.*
470
.*$gdb_prompt $" { pass "bit tests" }
471
        -re "$gdb_prompt $" { fail "bit tests" }
472
        timeout { fail "(timeout) bit tests" }
473
    }
474
}
475
 
476
proc dsp_add_tests { } {
477
    global gdb_prompt
478
    global hex
479
    global decimal
480
 
481
    send_gdb "x/28i dsp_add_tests\n"
482
    gdb_expect {
483
        -re "
484
.*add_add       r4,r1,r2,r3.*
485
.*add_add       r4,r1,2,r3.*
486
.*add_sub       r4,r1,r2,r3.*
487
.*add_sub       r4,r1,2,r3.*
488
.*add_cmp       r4,r1,r2,r3.*
489
.*add_cmp       r4,r1,2,r3.*
490
.*add_mov       r4,r1,r2,r3.*
491
.*add_mov       r4,r1,2,r3.*
492
.*add_asr       r4,r1,r2,r3.*
493
.*add_asr       r4,r1,2,r3.*
494
.*add_lsr       r4,r1,r2,r3.*
495
.*add_lsr       r4,r1,2,r3.*
496
.*add_asl       r4,r1,r2,r3.*
497
.*add_asl       r4,r1,2,r3.*
498
.*add_add       4,r1,r2,r3.*
499
.*add_add       4,r1,2,r3.*
500
.*add_sub       4,r1,r2,r3.*
501
.*add_sub       4,r1,2,r3.*
502
.*add_cmp       4,r1,r2,r3.*
503
.*add_cmp       4,r1,2,r3.*
504
.*add_mov       4,r1,r2,r3.*
505
.*add_mov       4,r1,2,r3.*
506
.*add_asr       4,r1,r2,r3.*
507
.*add_asr       4,r1,2,r3.*
508
.*add_lsr       4,r1,r2,r3.*
509
.*add_lsr       4,r1,2,r3.*
510
.*add_asl       4,r1,r2,r3.*
511
.*add_asl       4,r1,2,r3.*
512
.*$gdb_prompt $" { pass "dsp_add tests" }
513
        -re "$gdb_prompt $" { fail "dsp_add tests" }
514
        timeout { fail "(timeout) dsp_add tests" }
515
    }
516
}
517
 
518
proc dsp_cmp_tests { } {
519
    global gdb_prompt
520
    global hex
521
    global decimal
522
 
523
    send_gdb "x/24i dsp_cmp_tests\n"
524
    gdb_expect {
525
        -re "
526
.*cmp_add       r4,r1,r2,r3.*
527
.*cmp_add       r4,r1,2,r3.*
528
.*cmp_sub       r4,r1,r2,r3.*
529
.*cmp_sub       r4,r1,2,r3.*
530
.*cmp_mov       r4,r1,r2,r3.*
531
.*cmp_mov       r4,r1,2,r3.*
532
.*cmp_asr       r4,r1,r2,r3.*
533
.*cmp_asr       r4,r1,2,r3.*
534
.*cmp_lsr       r4,r1,r2,r3.*
535
.*cmp_lsr       r4,r1,2,r3.*
536
.*cmp_asl       r4,r1,r2,r3.*
537
.*cmp_asl       r4,r1,2,r3.*
538
.*cmp_add       4,r1,r2,r3.*
539
.*cmp_add       4,r1,2,r3.*
540
.*cmp_sub       4,r1,r2,r3.*
541
.*cmp_sub       4,r1,2,r3.*
542
.*cmp_mov       4,r1,r2,r3.*
543
.*cmp_mov       4,r1,2,r3.*
544
.*cmp_asr       4,r1,r2,r3.*
545
.*cmp_asr       4,r1,2,r3.*
546
.*cmp_lsr       4,r1,r2,r3.*
547
.*cmp_lsr       4,r1,2,r3.*
548
.*cmp_asl       4,r1,r2,r3.*
549
.*cmp_asl       4,r1,2,r3.*
550
.*$gdb_prompt $" { pass "dsp_cmp tests" }
551
        -re "$gdb_prompt $" { fail "dsp_cmp tests" }
552
        timeout { fail "(timeout) dsp_cmp tests" }
553
    }
554
}
555
 
556
proc dsp_sub_tests { } {
557
    global gdb_prompt
558
    global hex
559
    global decimal
560
 
561
    send_gdb "x/28i dsp_sub_tests\n"
562
    gdb_expect {
563
        -re "
564
.*sub_add       r4,r1,r2,r3.*
565
.*sub_add       r4,r1,2,r3.*
566
.*sub_sub       r4,r1,r2,r3.*
567
.*sub_sub       r4,r1,2,r3.*
568
.*sub_cmp       r4,r1,r2,r3.*
569
.*sub_cmp       r4,r1,2,r3.*
570
.*sub_mov       r4,r1,r2,r3.*
571
.*sub_mov       r4,r1,2,r3.*
572
.*sub_asr       r4,r1,r2,r3.*
573
.*sub_asr       r4,r1,2,r3.*
574
.*sub_lsr       r4,r1,r2,r3.*
575
.*sub_lsr       r4,r1,2,r3.*
576
.*sub_asl       r4,r1,r2,r3.*
577
.*sub_asl       r4,r1,2,r3.*
578
.*sub_add       4,r1,r2,r3.*
579
.*sub_add       4,r1,2,r3.*
580
.*sub_sub       4,r1,r2,r3.*
581
.*sub_sub       4,r1,2,r3.*
582
.*sub_cmp       4,r1,r2,r3.*
583
.*sub_cmp       4,r1,2,r3.*
584
.*sub_mov       4,r1,r2,r3.*
585
.*sub_mov       4,r1,2,r3.*
586
.*sub_asr       4,r1,r2,r3.*
587
.*sub_asr       4,r1,2,r3.*
588
.*sub_lsr       4,r1,r2,r3.*
589
.*sub_lsr       4,r1,2,r3.*
590
.*sub_asl       4,r1,r2,r3.*
591
.*sub_asl       4,r1,2,r3.*
592
.*$gdb_prompt $" { pass "dsp_sub tests" }
593
        -re "$gdb_prompt $" { fail "dsp_sub tests" }
594
        timeout { fail "(timeout) dsp_sub tests" }
595
    }
596
}
597
 
598
proc dsp_mov_tests { } {
599
    global gdb_prompt
600
    global hex
601
    global decimal
602
 
603
    send_gdb "x/28i dsp_mov_tests\n"
604
    gdb_expect {
605
        -re "
606
.*mov_add       r4,r1,r2,r3.*
607
.*mov_add       r4,r1,2,r3.*
608
.*mov_sub       r4,r1,r2,r3.*
609
.*mov_sub       r4,r1,2,r3.*
610
.*mov_cmp       r4,r1,r2,r3.*
611
.*mov_cmp       r4,r1,2,r3.*
612
.*mov_mov       r4,r1,r2,r3.*
613
.*mov_mov       r4,r1,2,r3.*
614
.*mov_asr       r4,r1,r2,r3.*
615
.*mov_asr       r4,r1,2,r3.*
616
.*mov_lsr       r4,r1,r2,r3.*
617
.*mov_lsr       r4,r1,2,r3.*
618
.*mov_asl       r4,r1,r2,r3.*
619
.*mov_asl       r4,r1,2,r3.*
620
.*mov_add       4,r1,r2,r3.*
621
.*mov_add       4,r1,2,r3.*
622
.*mov_sub       4,r1,r2,r3.*
623
.*mov_sub       4,r1,2,r3.*
624
.*mov_cmp       4,r1,r2,r3.*
625
.*mov_cmp       4,r1,2,r3.*
626
.*mov_mov       4,r1,r2,r3.*
627
.*mov_mov       4,r1,2,r3.*
628
.*mov_asr       4,r1,r2,r3.*
629
.*mov_asr       4,r1,2,r3.*
630
.*mov_lsr       4,r1,r2,r3.*
631
.*mov_lsr       4,r1,2,r3.*
632
.*mov_asl       4,r1,r2,r3.*
633
.*mov_asl       4,r1,2,r3.*
634
.*$gdb_prompt $" { pass "dsp_mov tests" }
635
        -re "$gdb_prompt $" { fail "dsp_mov tests" }
636
        timeout { fail "(timeout) dsp_mov tests" }
637
    }
638
}
639
 
640
proc dsp_logical_tests { } {
641
    global gdb_prompt
642
    global hex
643
    global decimal
644
 
645
    send_gdb "x/42i dsp_logical_tests\n"
646
    gdb_expect {
647
        -re "
648
.*and_add       r4,r1,r2,r3.*
649
.*and_add       r4,r1,2,r3.*
650
.*and_sub       r4,r1,r2,r3.*
651
.*and_sub       r4,r1,2,r3.*
652
.*and_cmp       r4,r1,r2,r3.*
653
.*and_cmp       r4,r1,2,r3.*
654
.*and_mov       r4,r1,r2,r3.*
655
.*and_mov       r4,r1,2,r3.*
656
.*and_asr       r4,r1,r2,r3.*
657
.*and_asr       r4,r1,2,r3.*
658
.*and_lsr       r4,r1,r2,r3.*
659
.*and_lsr       r4,r1,2,r3.*
660
.*and_asl       r4,r1,r2,r3.*
661
.*and_asl       r4,r1,2,r3.*
662
.*xor_add       r4,r1,r2,r3.*
663
.*xor_add       r4,r1,2,r3.*
664
.*xor_sub       r4,r1,r2,r3.*
665
.*xor_sub       r4,r1,2,r3.*
666
.*xor_cmp       r4,r1,r2,r3.*
667
.*xor_cmp       r4,r1,2,r3.*
668
.*xor_mov       r4,r1,r2,r3.*
669
.*xor_mov       r4,r1,2,r3.*
670
.*xor_asr       r4,r1,r2,r3.*
671
.*xor_asr       r4,r1,2,r3.*
672
.*xor_lsr       r4,r1,r2,r3.*
673
.*xor_lsr       r4,r1,2,r3.*
674
.*xor_asl       r4,r1,r2,r3.*
675
.*xor_asl       r4,r1,2,r3.*
676
.*or_add        r4,r1,r2,r3.*
677
.*or_add        r4,r1,2,r3.*
678
.*or_sub        r4,r1,r2,r3.*
679
.*or_sub        r4,r1,2,r3.*
680
.*or_cmp        r4,r1,r2,r3.*
681
.*or_cmp        r4,r1,2,r3.*
682
.*or_mov        r4,r1,r2,r3.*
683
.*or_mov        r4,r1,2,r3.*
684
.*or_asr        r4,r1,r2,r3.*
685
.*or_asr        r4,r1,2,r3.*
686
.*or_lsr        r4,r1,r2,r3.*
687
.*or_lsr        r4,r1,2,r3.*
688
.*or_asl        r4,r1,r2,r3.*
689
.*or_asl        r4,r1,2,r3.*
690
.*$gdb_prompt $" { pass "dsp_logical tests" }
691
        -re "$gdb_prompt $" { fail "dsp_logical tests" }
692
        timeout { fail "(timeout) dsp_logical tests" }
693
    }
694
}
695
 
696
proc dsp_misc_tests { } {
697
    global gdb_prompt
698
    global hex
699
    global decimal
700
 
701
    send_gdb "x/42i dsp_misc_tests\n"
702
    gdb_expect {
703
        -re "
704
.*dmach_add     r4,r1,r2,r3.*
705
.*dmach_add     r4,r1,2,r3.*
706
.*dmach_sub     r4,r1,r2,r3.*
707
.*dmach_sub     r4,r1,2,r3.*
708
.*dmach_cmp     r4,r1,r2,r3.*
709
.*dmach_cmp     r4,r1,2,r3.*
710
.*dmach_mov     r4,r1,r2,r3.*
711
.*dmach_mov     r4,r1,2,r3.*
712
.*dmach_asr     r4,r1,r2,r3.*
713
.*dmach_asr     r4,r1,2,r3.*
714
.*dmach_lsr     r4,r1,r2,r3.*
715
.*dmach_lsr     r4,r1,2,r3.*
716
.*dmach_asl     r4,r1,r2,r3.*
717
.*dmach_asl     r4,r1,2,r3.*
718
.*swhw_add      r4,r1,r2,r3.*
719
.*swhw_add      r4,r1,2,r3.*
720
.*swhw_sub      r4,r1,r2,r3.*
721
.*swhw_sub      r4,r1,2,r3.*
722
.*swhw_cmp      r4,r1,r2,r3.*
723
.*swhw_cmp      r4,r1,2,r3.*
724
.*swhw_mov      r4,r1,r2,r3.*
725
.*swhw_mov      r4,r1,2,r3.*
726
.*swhw_asr      r4,r1,r2,r3.*
727
.*swhw_asr      r4,r1,2,r3.*
728
.*swhw_lsr      r4,r1,r2,r3.*
729
.*swhw_lsr      r4,r1,2,r3.*
730
.*swhw_asl      r4,r1,r2,r3.*
731
.*swhw_asl      r4,r1,2,r3.*
732
.*sat16_add     r4,r1,r2,r3.*
733
.*sat16_add     r4,r1,2,r3.*
734
.*sat16_sub     r4,r1,r2,r3.*
735
.*sat16_sub     r4,r1,2,r3.*
736
.*sat16_cmp     r4,r1,r2,r3.*
737
.*sat16_cmp     r4,r1,2,r3.*
738
.*sat16_mov     r4,r1,r2,r3.*
739
.*sat16_mov     r4,r1,2,r3.*
740
.*sat16_asr     r4,r1,r2,r3.*
741
.*sat16_asr     r4,r1,2,r3.*
742
.*sat16_lsr     r4,r1,r2,r3.*
743
.*sat16_lsr     r4,r1,2,r3.*
744
.*sat16_asl     r4,r1,r2,r3.*
745
.*sat16_asl     r4,r1,2,r3.*
746
.*$gdb_prompt $" { pass "dsp_misc tests" }
747
        -re "$gdb_prompt $" { fail "dsp_misc tests" }
748
        timeout { fail "(timeout) dsp_misc tests" }
749
    }
750
}
751
 
752
proc autoincrement_tests { } {
753
    global gdb_prompt
754
    global hex
755
    global decimal
756
 
757
    send_gdb "x/16i autoincrement_tests\n"
758
    gdb_expect {
759
        -re "
760
.*mov   \\(r1\\+\\),r2.*
761
.*mov   r3,\\(r4\\+\\).*
762
.*movhu \\(r6\\+\\),r7.*
763
.*movhu a0,\\(a1\\+\\).*
764
.*mov   \\(r1\\+,64\\),r2.*
765
.*mov   r1,\\(r2\\+,64\\).*
766
.*movhu \\(r1\\+,64\\),r2.*
767
.*movhu r1,\\(r2\\+,64\\).*
768
.*mov   \\(r1\\+,131055\\),r2.*
769
.*mov   r1,\\(r2\\+,131055\\).*
770
.*movhu \\(r1\\+,131055\\),r2.*
771
.*movhu r1,\\(r2\\+,131055\\).*
772
.*mov   \\(r1\\+,2147417596\\),r2.*
773
.*mov   r1,\\(r2\\+,2147417596\\).*
774
.*movhu \\(r1\\+,2147417596\\),r2.*
775
.*movhu r1,\\(r2\\+,2147417596\\).*
776
.*$gdb_prompt $" { pass "autoincrement tests" }
777
        -re "$gdb_prompt $" { fail "autoincrement tests" }
778
        timeout { fail "(timeout) autoincrement tests" }
779
    }
780
}
781
 
782
proc dsp_autoincrement_tests { } {
783
    global gdb_prompt
784
    global hex
785
    global decimal
786
 
787
    send_gdb "x/11i dsp_autoincrement_tests\n"
788
    gdb_expect {
789
        -re "
790
.*mov_llt       \\(r1\\+,4\\),r2.*
791
.*mov_lgt       \\(r1\\+,4\\),r2.*
792
.*mov_lge       \\(r1\\+,4\\),r2.*
793
.*mov_lle       \\(r1\\+,4\\),r2.*
794
.*mov_lcs       \\(r1\\+,4\\),r2.*
795
.*mov_lhi       \\(r1\\+,4\\),r2.*
796
.*mov_lcc       \\(r1\\+,4\\),r2.*
797
.*mov_lls       \\(r1\\+,4\\),r2.*
798
.*mov_leq       \\(r1\\+,4\\),r2.*
799
.*mov_lne       \\(r1\\+,4\\),r2.*
800
.*mov_lra       \\(r1\\+,4\\),r2.*
801
.*$gdb_prompt $" { pass "autoincrement tests" }
802
        -re "$gdb_prompt $" { fail "autoincrement tests" }
803
        timeout { fail "(timeout) autoincrement tests" }
804
    }
805
}
806
 
807
# Start with a fresh gdb.
808
 
809
gdb_exit
810
gdb_start
811
gdb_reinitialize_dir $srcdir/$subdir
812
gdb_load $binfile
813
 
814
call_tests
815
movm_tests
816
misc_tests
817
mov_tests
818
ext_tests
819
add_tests
820
sub_tests
821
cmp_tests
822
logical_tests
823
shift_tests
824
muldiv_tests
825
movbu_tests
826
movhu_tests
827
mac_tests
828
bit_tests
829
dsp_add_tests
830
dsp_cmp_tests
831
dsp_sub_tests
832
dsp_mov_tests
833
dsp_logical_tests
834
autoincrement_tests
835
dsp_autoincrement_tests

powered by: WebSVN 2.1.0

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