xref: /netbsd-src/external/gpl3/gdb/dist/sim/testsuite/cr16/push1.cgs (revision 4b169a6ba595ae283ca507b26b15fdff40495b1c)
1# cr16 testcase for push count reg RA insns.
2# mach:	 cr16
3
4	.include "testutils.inc"
5
6	start
7
8	.global push1
9push1:
10	movd $0x100a, (sp)
11	movd $0xabcd, (ra)
12	movw $0x2f50, r5
13	movw $0x107e, r6
14	movw $0x35ed, r7
15	push $3,r5,RA
16
17	loadw 0x1000, r3
18	cmpw r3,r5
19	beq ok1
20	br not_ok
21not_ok:
22	fail
23ok1:
24	loadw 0x1002, r3
25	cmpw r3,r6
26	beq ok2
27	br not_ok
28ok2:
29	loadw 0x1004, r3
30	cmpw r3,r7
31	beq ok3
32	br not_ok
33
34ok3:
35	loadd 0x1006, (r3,r2)
36	cmpd (r3,r2), (ra)
37	beq ok4
38	br not_ok
39
40ok4:
41	pass
42