xref: /netbsd-src/external/gpl3/gdb/dist/sim/testsuite/cr16/addi.cgs (revision 4b169a6ba595ae283ca507b26b15fdff40495b1c)
1# cr16 testcase for addi $imm8, $dr
2# mach(): cr16
3
4	.include "testutils.inc"
5
6	start
7
8	.global addi
9addi:
10
11	movb $1, r4
12	addb $2, r4
13
14        cmpb $3,r4
15	bne not_ok
16
17	movw $0x1234, r5
18	addw $0x1234, r5
19	test_h_gr r5, 0x2468
20
21	pass
22
23	movd $0x12345678, (r5,r4)
24	addd $0x12345678, (r5,r4)
25	test_h_grp "(r5,r4)", 0x2468acf0
26
27	pass
28
29not_ok:
30	fail
31