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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gdb-7.2/] [gdb/] [testsuite/] [gdb.disasm/] [am33.exp] - Blame information for rev 861

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

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

powered by: WebSVN 2.1.0

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