pop1.cgs revision 1.1 1 1.1 christos # cr16 testcase for pop count reg RA insns.
2 1.1 christos # mach: cr16
3 1.1 christos
4 1.1 christos .include "testutils.inc"
5 1.1 christos
6 1.1 christos start
7 1.1 christos
8 1.1 christos .global pop1
9 1.1 christos pop1:
10 1.1 christos movd $0x1000, (sp)
11 1.1 christos movw $0x2f50, r3
12 1.1 christos storw r3, 0x1000
13 1.1 christos movw $0x107e, r3
14 1.1 christos storw r3, 0x1002
15 1.1 christos movw $0x35ec, r3
16 1.1 christos storw r3, 0x1004
17 1.1 christos
18 1.1 christos movd $0xabcd, (r3,r2)
19 1.1 christos stord (r3,r2), 0x1006
20 1.1 christos
21 1.1 christos pop $3,r5, RA
22 1.1 christos
23 1.1 christos cmpw $0x2f50,r5
24 1.1 christos beq ok1
25 1.1 christos br not_ok
26 1.1 christos not_ok:
27 1.1 christos fail
28 1.1 christos ok1:
29 1.1 christos cmpw $0x107e,r6
30 1.1 christos beq ok2
31 1.1 christos br not_ok
32 1.1 christos ok2:
33 1.1 christos cmpw $0x35ec,r7
34 1.1 christos beq ok3
35 1.1 christos br not_ok
36 1.1 christos
37 1.1 christos ok3:
38 1.1 christos cmpd $0xabcd, (ra)
39 1.1 christos beq ok4
40 1.1 christos br not_ok
41 1.1 christos ok4:
42 1.1 christos pass
43