]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.disasm/h8300s.exp
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.disasm / h8300s.exp
CommitLineData
6aba47ca 1# Copyright (C) 2000, 2007 Free Software Foundation, Inc.
8afc772b
AC
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
17# Please email any bugs, comments, and/or additions to this file to:
18# bug-gdb@prep.ai.mit.edu
19
20# This file was written by Kazu Hirata. (kazu@hxi.com)
21
22if $tracelevel then {
23 strace $tracelevel
24}
25
26if ![istarget "h8300*-*-*"] {
27 verbose "Tests ignored for all but h8300s based targets."
28 return
29}
30
31set prms_id 0
32set bug_id 0
33
34set testfile "h8300s"
35set srcfile ${srcdir}/${subdir}/${testfile}.s
36set binfile ${objdir}/${subdir}/${testfile}
37if { [gdb_compile "${srcfile}" "${binfile}" executable {debug additional_flags=-ms}] != "" } {
b60f0898
JB
38 untested h8300s.exp
39 return -1
8afc772b
AC
40}
41
42proc all_set_machine_h8300s { } {
43 global gdb_prompt
44 global hex
45 global decimal
46
47 send_gdb "set machine h8300s\n"
48 gdb_expect {
49 -re "$gdb_prompt $" {}
50 }
51}
52
53proc all_movb_tests { } {
54 global gdb_prompt
55 global hex
56 global decimal
57
58 send_gdb "x/9i movb_tests\n"
59 gdb_expect {
60 -re "
61.*mov.b\tr0l,r0h.*
62.*mov.b\t#0x12,r1l.*
63.*mov.b\t@er0,r1h.*
64.*mov.b\t@\\(0x1234:16,er0\\),r2l.*
65.*mov.b\t@\\(0x12345678:32,er0\\),r2h.*
66.*mov.b\t@er0\\+,r3l.*
67.*mov.b\t@0x12:8,r3h.*
68.*mov.b\t@0x1234:16,r4l.*
69.*mov.b\t@0x12345678:32,r4h.*
70.*$gdb_prompt $" { pass "movb_tests" }
71 -re "$gdb_prompt $" { fail "movb_tests" }
72 timeout { fail "(timeout) movb_tests" }
73 }
74}
75
76proc all_movw_tests { } {
77 global gdb_prompt
78 global hex
79 global decimal
80
81 send_gdb "x/8i movw_tests\n"
82 gdb_expect {
83 -re "
84.*mov.w\te0,r0.*
85.*mov.w\t#0x1234,r1.*
86.*mov.w\t@er0,r2.*
87.*mov.w\t@\\(0x1234:16,er0\\),r3.*
88.*mov.w\t@\\(0x12345678:32,er0\\),r4.*
89.*mov.w\t@er0\\+,r5.*
90.*mov.w\t@0x1234:16,r6.*
91.*mov.w\t@0x12345678:32,r7.*
92.*$gdb_prompt $" { pass "movw_tests" }
93 -re "$gdb_prompt $" { fail "movw_tests" }
94 timeout { fail "(timeout) movw_tests" }
95 }
96}
97
98proc all_movl_tests { } {
99 global gdb_prompt
100 global hex
101 global decimal
102
103 send_gdb "x/8i movl_tests\n"
104 gdb_expect {
105 -re "
106.*mov.l\ter0,er1.*
107.*mov.l\t#0x12345678,er1.*
108.*mov.l\t@er0,er2.*
109.*mov.l\t@\\(0x1234:16,er0\\),er3.*
110.*mov.l\t@\\(0x12345678:32,er0\\),er4.*
111.*mov.l\t@er0\\+,er5.*
112.*mov.l\t@0x1234:16,er6.*
113.*mov.l\t@0x12345678:32,er7.*
114.*$gdb_prompt $" { pass "movl_tests" }
115 -re "$gdb_prompt $" { fail "movl_tests" }
116 timeout { fail "(timeout) movl_tests" }
117 }
118}
119
120proc all_ldm_stm_tests { } {
121 global gdb_prompt
122 global hex
123 global decimal
124
125 send_gdb "x/6i ldm_stm_tests\n"
126 gdb_expect {
127 -re "
128.*ldm.l\t@sp\\+,er0-er1.*
129.*ldm.l\t@sp\\+,er0-er2.*
130.*ldm.l\t@sp\\+,er0-er3.*
131.*stm.l\ter0\\-er1,@-sp.*
132.*stm.l\ter0\\-er2,@-sp.*
133.*stm.l\ter0\\-er3,@-sp.*
134.*$gdb_prompt $" { pass "ldm_stm_tests" }
135 -re "$gdb_prompt $" { fail "ldm_stm_tests" }
136 timeout { fail "(timeout) ldm_stm_tests" }
137 }
138}
139
140proc all_movfpe_movtpe_tests { } {
141 global gdb_prompt
142 global hex
143 global decimal
144
145 send_gdb "x/2i movfpe_movtpe_tests\n"
146 gdb_expect {
147 -re "
148.*movfpe\t@0x1234:16,r2l.*
149.*movtpe\tr2l,@0x1234:16.*
150.*$gdb_prompt $" { pass "movfpe_movtpe_tests" }
151 -re "$gdb_prompt $" { fail "movfpe_movtpe_tests" }
152 timeout { fail "(timeout) movfpe_movtpe_tests" }
153 }
154}
155
156proc all_add_sub_addx_subx_tests { } {
157 global gdb_prompt
158 global hex
159 global decimal
160
161 send_gdb "x/15i add_sub_addx_subx_tests\n"
162 gdb_expect {
163 -re "
164.*add.b\t#0x12,r0l.*
165.*add.b\tr1l,r1h.*
166.*add.w\t#0x1234,r2.*
167.*add.w\tr3,r4.*
168.*add.l\t#0x12345678,er5.*
169.*add.l\ter6,er7.*
170.*sub.b\tr1l,r1h.*
171.*sub.w\t#0x1234,r2.*
172.*sub.w\tr3,r4.*
173.*sub.l\t#0x12345678,er5.*
174.*sub.l\ter6,er7.*
175.*addx\t#0x12,r0l.*
176.*addx\tr1l,r1h.*
177.*subx\t#0x12,r0l.*
178.*subx\tr1l,r1h.*
179.*$gdb_prompt $" { pass "add_sub_addx_subx_tests" }
180 -re "$gdb_prompt $" { fail "add_sub_addx_subx_tests" }
181 timeout { fail "(timeout) add_sub_addx_subx_tests" }
182 }
183}
184
185proc all_inc_dec_adds_subs_tests { } {
186 global gdb_prompt
187 global hex
188 global decimal
189
190 send_gdb "x/16i inc_dec_adds_subs_tests\n"
191 gdb_expect {
192 -re "
3d67be83
MS
193.*inc(.b|)\tr0l.*
194.*inc.w\t#(0x|)1,r4.*
195.*inc.w\t#(0x|)2,r3.*
196.*inc.l\t#(0x|)1,er2.*
197.*inc.l\t#(0x|)2,er1.*
8afc772b 198.*dec.b\tr0l.*
3d67be83
MS
199.*dec.w\t#(0x|)1,r4.*
200.*dec.w\t#(0x|)2,r3.*
201.*dec.l\t#(0x|)1,er2.*
202.*dec.l\t#(0x|)2,er1.*
203.*adds\t#(0x|)1,er7.*
204.*adds\t#(0x|)2,er6.*
205.*adds\t#(0x|)4,er5.*
206.*subs\t#(0x|)1,er7.*
207.*subs\t#(0x|)2,er6.*
208.*subs\t#(0x|)4,er5.*
8afc772b
AC
209.*$gdb_prompt $" { pass "inc_dec_adds_subs_tests" }
210 -re "$gdb_prompt $" { fail "inc_dec_adds_subs_tests" }
211 timeout { fail "(timeout) inc_dec_adds_subs_tests" }
212 }
213}
214
215proc all_daa_das_tests { } {
216 global gdb_prompt
217 global hex
218 global decimal
219
220 send_gdb "x/2i daa_das_tests\n"
221 gdb_expect {
222 -re "
223.*daa\tr0l.*
224.*das\tr0h.*
225.*$gdb_prompt $" { pass "daa_das_tests" }
226 -re "$gdb_prompt $" { fail "daa_das_tests" }
227 timeout { fail "(timeout) daa_das_tests" }
228 }
229}
230
231proc all_mul_div_tests { } {
232 global gdb_prompt
233 global hex
234 global decimal
235
236 send_gdb "x/8i mul_div_tests\n"
237 gdb_expect {
238 -re "
239.*mulxs.b\tr0l,r1.*
240.*mulxs.w\tr2,er3.*
241.*mulxu.b\tr0l,e1.*
242.*mulxu.w\te2,er3.*
243.*divxs.b\tr0l,r1.*
244.*divxs.w\tr2,er3.*
245.*divxu.b\tr0l,e1.*
246.*divxu.w\te2,er3.*
247.*$gdb_prompt $" { pass "mul_div_tests" }
248 -re "$gdb_prompt $" { fail "mul_div_tests" }
249 timeout { fail "(timeout) mul_div_tests" }
250 }
251}
252
253proc all_cmp_tests { } {
254 global gdb_prompt
255 global hex
256 global decimal
257
258 send_gdb "x/8i cmp_tests\n"
259 gdb_expect {
260 -re "
261.*cmp.b\t#0x12,r0l.*
262.*cmp.b\tr1l,r1h.*
263.*cmp.w\t#0x1234,r2.*
264.*cmp.w\tr3,e3.*
265.*cmp.l\t#0x12345678,er4.*
266.*cmp.l\ter5,er6.*
267.*$gdb_prompt $" { pass "cmp_tests" }
268 -re "$gdb_prompt $" { fail "cmp_tests" }
269 timeout { fail "(timeout) cmp_tests" }
270 }
271}
272
273proc all_neg_tests { } {
274 global gdb_prompt
275 global hex
276 global decimal
277
278 send_gdb "x/3i neg_tests\n"
279 gdb_expect {
280 -re "
281.*neg.b\tr0l.*
282.*neg.w\tr2.*
283.*neg.l\ter3.*
284.*$gdb_prompt $" { pass "neg_tests" }
285 -re "$gdb_prompt $" { fail "neg_tests" }
286 timeout { fail "(timeout) neg_tests" }
287 }
288}
289
290proc all_ext_tests { } {
291 global gdb_prompt
292 global hex
293 global decimal
294
295 send_gdb "x/4i ext_tests\n"
296 gdb_expect {
297 -re "
298.*exts.w\tr0.*
299.*exts.l\ter1.*
300.*extu.w\tr2.*
301.*extu.l\ter3.*
302.*$gdb_prompt $" { pass "ext_tests" }
303 -re "$gdb_prompt $" { fail "ext_tests" }
304 timeout { fail "(timeout) ext_tests" }
305 }
306}
307
308proc all_tas_mac_tests { } {
309 global gdb_prompt
310 global hex
311 global decimal
312
313 send_gdb "x/7i tas_mac_tests\n"
314 gdb_expect {
315 -re "
316.*tas\t@er0.*
3d67be83 317.*mac\t@er1\\+,@er2\\+.*
8afc772b
AC
318.*clrmac.*
319.*ldmac\ter4,mach.*
320.*ldmac\ter5,macl.*
321.*stmac\tmach,er6.*
322.*stmac\tmacl,er7.*
323.*$gdb_prompt $" { pass "tas_mac_tests" }
324 -re "$gdb_prompt $" { fail "tas_mac_tests" }
325 timeout { fail "(timeout) tas_mac_tests" }
326 }
327}
328
329proc all_logic_operations_tests { } {
330 global gdb_prompt
331 global hex
332 global decimal
333
334 send_gdb "x/21i logic_operations_tests\n"
335 gdb_expect {
336 -re "
337.*and.b\t#0x12,r0l.*
338.*and.b\tr1l,r2h.*
339.*and.w\t#0x1234,r0.*
340.*and.w\tr1,r2.*
341.*and.l\t#0x12345678,er0.*
342.*and.l\ter1,er2.*
343.*or.b\t#0x12,r0l.*
344.*or.b\tr1l,r2h.*
345.*or.w\t#0x1234,r0.*
346.*or.w\tr1,r2.*
347.*or.l\t#0x12345678,er0.*
348.*or.l\ter1,er2.*
3d67be83
MS
349.*xor(.b|)\t#0x12,r0l.*
350.*xor(.b|)\tr1l,r2h.*
8afc772b
AC
351.*xor.w\t#0x1234,r0.*
352.*xor.w\tr1,r2.*
353.*xor.l\t#0x12345678,er0.*
354.*xor.l\ter1,er2.*
355.*not.b\tr0l.*
356.*not.w\tr1.*
357.*not.l\ter2.*
358.*$gdb_prompt $" { pass "logic_operations_tests" }
359 -re "$gdb_prompt $" { fail "logic_operations_tests" }
360 timeout { fail "(timeout) logic_operations_tests" }
361 }
362}
363
364proc all_sha_shl_tests { } {
365 global gdb_prompt
366 global hex
367 global decimal
368
369 send_gdb "x/12i sha_shl_tests\n"
370 gdb_expect {
371 -re "
3d67be83
MS
372.*shal(.b|)\tr0l.*
373.*shal(.w|)\tr1.*
374.*shal(.l|)\ter2.*
375.*shar(.b|)\tr3l.*
376.*shar(.w|)\tr4.*
377.*shar(.l|)\ter5.*
378.*shll(.b|)\tr0l.*
379.*shll(.w|)\tr1.*
380.*shll(.l|)\ter2.*
381.*shlr(.b|)\tr3l.*
382.*shlr(.w|)\tr4.*
383.*shlr(.l|)\ter5.*
8afc772b
AC
384.*$gdb_prompt $" { pass "sha_shl_tests" }
385 -re "$gdb_prompt $" { fail "sha_shl_tests" }
386 timeout { fail "(timeout) sha_shl_tests" }
387 }
388}
389
390proc all_rot_rotx_tests { } {
391 global gdb_prompt
392 global hex
393 global decimal
394
395 send_gdb "x/12i rot_rotx_tests\n"
396 gdb_expect {
397 -re "
3d67be83
MS
398.*rotl(.b|)\tr0l.*
399.*rotl(.w|)\tr1.*
400.*rotl(.l|)\ter2.*
401.*rotr(.b|)\tr3l.*
402.*rotr(.w|)\tr4.*
403.*rotr(.l|)\ter5.*
404.*rotxl(.b|)\tr0l.*
405.*rotxl(.w|)\tr1.*
406.*rotxl(.l|)\ter2.*
407.*rotxr(.b|)\tr3l.*
408.*rotxr(.w|)\tr4.*
409.*rotxr(.l|)\ter5.*
8afc772b
AC
410.*$gdb_prompt $" { pass "rot_rotx_tests" }
411 -re "$gdb_prompt $" { fail "rot_rotx_tests" }
412 timeout { fail "(timeout) rot_rotx_tests" }
413 }
414}
415
416proc all_bset_bclr_tests { } {
417 global gdb_prompt
418 global hex
419 global decimal
420
421 send_gdb "x/20i bset_bclr_tests\n"
422 gdb_expect {
423 -re "
424.*bset\t#0x7,r0l.*
425.*bset\t#0x6,@er1.*
426.*bset\t#0x5,@0x12:8.*
427.*bset\t#0x4,@0x1234:16.*
428.*bset\t#0x3,@0x12345678:32.*
429.*bset\tr7l,r0h.*
430.*bset\tr6l,@er1.*
431.*bset\tr5l,@0x12:8.*
432.*bset\tr4l,@0x1234:16.*
433.*bset\tr3l,@0x12345678:32.*
434.*bclr\t#0x7,r0l.*
435.*bclr\t#0x6,@er1.*
436.*bclr\t#0x5,@0x12:8.*
437.*bclr\t#0x4,@0x1234:16.*
438.*bclr\t#0x3,@0x12345678:32.*
439.*bclr\tr7h,r0h.*
440.*bclr\tr6h,@er1.*
441.*bclr\tr5h,@0x12:8.*
442.*bclr\tr4h,@0x1234:16.*
443.*bclr\tr3h,@0x12345678:32.*
444.*$gdb_prompt $" { pass "bset_bclr_tests" }
445 -re "$gdb_prompt $" { fail "bset_bclr_tests" }
446 timeout { fail "(timeout) bset_bclr_tests" }
447 }
448}
449
450proc all_bnot_btst_tests { } {
451 global gdb_prompt
452 global hex
453 global decimal
454
455 send_gdb "x/20i bnot_btst_tests\n"
456 gdb_expect {
457 -re "
458.*bnot\t#0x7,r0l.*
459.*bnot\t#0x6,@er1.*
460.*bnot\t#0x5,@0x12:8.*
461.*bnot\t#0x4,@0x1234:16.*
462.*bnot\t#0x3,@0x12345678:32.*
463.*bnot\tr7l,r0h.*
464.*bnot\tr6l,@er1.*
465.*bnot\tr5l,@0x12:8.*
466.*bnot\tr4l,@0x1234:16.*
467.*bnot\tr3l,@0x12345678:32.*
468.*btst\t#0x7,r0l.*
469.*btst\t#0x6,@er1.*
470.*btst\t#0x5,@0x12:8.*
471.*btst\t#0x4,@0x1234:16.*
472.*btst\t#0x3,@0x12345678:32.*
473.*btst\tr7h,r0h.*
474.*btst\tr6h,@er1.*
475.*btst\tr5h,@0x12:8.*
476.*btst\tr4h,@0x1234:16.*
477.*btst\tr3h,@0x12345678:32.*
478.*$gdb_prompt $" { pass "bnot_btst_tests" }
479 -re "$gdb_prompt $" { fail "bnot_btst_tests" }
480 timeout { fail "(timeout) bnot_btst_tests" }
481 }
482}
483
484proc all_band_bor_bxor_tests { } {
485 global gdb_prompt
486 global hex
487 global decimal
488
489 send_gdb "x/15i band_bor_bxor_tests\n"
490 gdb_expect {
491 -re "
492.*band\t#0x7,r0l.*
493.*band\t#0x6,@er1.*
494.*band\t#0x5,@0x12:8.*
495.*band\t#0x4,@0x1234:16.*
496.*band\t#0x3,@0x12345678:32.*
497.*bor\t#0x7,r0l.*
498.*bor\t#0x6,@er1.*
499.*bor\t#0x5,@0x12:8.*
500.*bor\t#0x4,@0x1234:16.*
501.*bor\t#0x3,@0x12345678:32.*
502.*bxor\t#0x7,r0l.*
503.*bxor\t#0x6,@er1.*
504.*bxor\t#0x5,@0x12:8.*
505.*bxor\t#0x4,@0x1234:16.*
506.*bxor\t#0x3,@0x12345678:32.*
507.*$gdb_prompt $" { pass "band_bor_bxor_tests" }
508 -re "$gdb_prompt $" { fail "band_bor_bxor_tests" }
509 timeout { fail "(timeout) band_bor_bxor_tests" }
510 }
511}
512
513proc all_bld_bst_tests { } {
514 global gdb_prompt
515 global hex
516 global decimal
517
518 send_gdb "x/20i bld_bst_tests\n"
519 gdb_expect {
520 -re "
521.*bld\t#0x7,r0l.*
522.*bld\t#0x6,@er1.*
523.*bld\t#0x5,@0x12:8.*
524.*bld\t#0x4,@0x1234:16.*
525.*bld\t#0x3,@0x12345678:32.*
526.*bild\t#0x7,r0l.*
527.*bild\t#0x6,@er1.*
528.*bild\t#0x5,@0x12:8.*
529.*bild\t#0x4,@0x1234:16.*
530.*bild\t#0x3,@0x12345678:32.*
531.*bst\t#0x7,r0l.*
532.*bst\t#0x6,@er1.*
533.*bst\t#0x5,@0x12:8.*
534.*bst\t#0x4,@0x1234:16.*
535.*bst\t#0x3,@0x12345678:32.*
536.*bist\t#0x7,r0l.*
537.*bist\t#0x6,@er1.*
538.*bist\t#0x5,@0x12:8.*
539.*bist\t#0x4,@0x1234:16.*
540.*bist\t#0x3,@0x12345678:32.*
541.*$gdb_prompt $" { pass "bld_bst_tests" }
542 -re "$gdb_prompt $" { fail "bld_bst_tests" }
543 timeout { fail "(timeout) bld_bst_tests" }
544 }
545}
546
547proc all_branch_tests { } {
548 global gdb_prompt
549 global hex
550 global decimal
551
552 send_gdb "x/25i branch_tests\n"
553 gdb_expect {
554 -re "
3d67be83
MS
555.*bra\t(branch_tests|.-2 ).*
556.*brn\t(branch_tests|.-4 ).*
557.*bhi\t(branch_tests|.-6 ).*
558.*bls\t(branch_tests|.-8 ).*
559.*bcc\t(branch_tests|.-10 ).*
560.*bcs\t(branch_tests|.-12 ).*
561.*bne\t(branch_tests|.-14 ).*
562.*beq\t(branch_tests|.-16 ).*
563.*bvc\t(branch_tests|.-18 ).*
564.*bvs\t(branch_tests|.-20 ).*
565.*bpl\t(branch_tests|.-22 ).*
566.*bmi\t(branch_tests|.-24 ).*
567.*bge\t(branch_tests|.-26 ).*
568.*blt\t(branch_tests|.-28 ).*
569.*bgt\t(branch_tests|.-30 ).*
570.*ble\t(branch_tests|.-32 ).*
8afc772b 571.*jmp\t@er0.*
3d67be83
MS
572.*jmp\t@(branch_tests|0x).*
573.*jmp\t@@0 \\((0x|)0\\).*
574.*bsr\t(branch_tests|.-42 ).*
575.*bsr\t(branch_tests|.-46 ).*
8afc772b 576.*jsr\t@er0.*
3d67be83
MS
577.*jsr\t@(branch_tests|0x).*
578.*jsr\t@@0 \\((0x|)0\\).*
8afc772b
AC
579.*rts.*
580.*$gdb_prompt $" { pass "branch_tests" }
581 -re "$gdb_prompt $" { fail "branch_tests" }
582 timeout { fail "(timeout) branch_tests" }
583 }
584}
585
586proc all_system_control_tests { } {
587 global gdb_prompt
588 global hex
589 global decimal
590
591 send_gdb "x/40i system_control_tests\n"
592 gdb_expect {
593 -re "
594.*trapa\t#0x2.*
595.*rte.*
596.*sleep.*
597.*ldc\t#0x12,ccr*.
598.*ldc\tr3l,ccr.*
599.*ldc\t@er0,ccr.*
600.*ldc\t@\\(0x1234:16,er0\\),ccr.*
601.*ldc\t@\\(0x12345678:32,er0\\),ccr.*
602.*ldc\t@er1\\+,ccr.*
603.*ldc\t@0x1234:16,ccr.*
604.*ldc\t@0x12345678:32,ccr.*
605.*stc\tccr,r3l.*
606.*stc\tccr,@er0.*
607.*stc\tccr,@\\(0x1234:16,er0\\).*
608.*stc\tccr,@\\(0x12345678:32,er0\\).*
609.*stc\tccr,@\\-er1.*
610.*stc\tccr,@0x1234:16.*
611.*stc\tccr,@0x12345678:32.*
612.*andc\t#0x12,ccr.*
613.*orc\t#0x34,ccr.*
614.*xorc\t#0x56,ccr.*
615.*ldc\t#0x12,exr*.
616.*ldc\tr3l,exr.*
617.*ldc\t@er0,exr.*
618.*ldc\t@\\(0x1234:16,er0\\),exr.*
619.*ldc\t@\\(0x12345678:32,er0\\),exr.*
620.*ldc\t@er1\\+,exr.*
621.*ldc\t@0x1234:16,exr.*
622.*ldc\t@0x12345678:32,exr.*
623.*stc\texr,r3l.*
624.*stc\texr,@er0.*
625.*stc\texr,@\\(0x1234:16,er0\\).*
626.*stc\texr,@\\(0x12345678:32,er0\\).*
627.*stc\texr,@\\-er1.*
628.*stc\texr,@0x1234:16.*
629.*stc\texr,@0x12345678:32.*
630.*andc\t#0x12,exr.*
631.*orc\t#0x34,exr.*
632.*xorc\t#0x56,exr.*
633.*nop.*
634.*$gdb_prompt $" { pass "system_control_tests" }
635 -re "$gdb_prompt $" { fail "system_control_tests" }
636 timeout { fail "(timeout) system_control_tests" }
637 }
638}
639
640proc all_block_data_transfer_tests { } {
641 global gdb_prompt
642 global hex
643 global decimal
644
645 send_gdb "x/2i block_data_transfer_tests\n"
646 gdb_expect {
647 -re "
648.*eepmov.b.*
649.*eepmov.w.*
650.*$gdb_prompt $" { pass "block_data_transfer_tests" }
651 -re "$gdb_prompt $" { fail "block_data_transfer_tests" }
652 timeout { fail "(timeout) block_data_transfer_tests" }
653 }
654}
655
656gdb_exit
657gdb_start
658gdb_reinitialize_dir $srcdir/$subdir
659all_set_machine_h8300s
660gdb_load $binfile
661
662# Data transfer
663all_movb_tests
664all_movw_tests
665all_movl_tests
666all_ldm_stm_tests
667all_movfpe_movtpe_tests
668
669# Arithmetic operations
670all_add_sub_addx_subx_tests
671all_inc_dec_adds_subs_tests
672all_daa_das_tests
673all_mul_div_tests
674all_cmp_tests
675all_neg_tests
676all_ext_tests
677all_tas_mac_tests
678
679# Logic operations
680all_logic_operations_tests
681
682# Shift
683all_sha_shl_tests
684all_rot_rotx_tests
685
686# Bit manipulation
687all_bset_bclr_tests
688all_bnot_btst_tests
689all_band_bor_bxor_tests
690all_bld_bst_tests
691
692# Branch
693all_branch_tests
694
695# System control
696all_system_control_tests
697
698# Block data transfer
699all_block_data_transfer_tests