1 1.1 christos # cr16 testcase for popret 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 popret1 9 1.1 christos popret1: 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 $ok, (r3,r2) # jump to ok 19 1.1 christos lshd $-1, (r3,r2) 20 1.1 christos stord (r3,r2), 0x1006 21 1.1 christos 22 1.1 christos popret $3,r5, RA 23 1.1 christos 24 1.1 christos ok: 25 1.1 christos cmpw $0x2f50,r5 26 1.1 christos beq ok1 27 1.1 christos br not_ok 28 1.1 christos not_ok: 29 1.1 christos fail 30 1.1 christos ok1: 31 1.1 christos cmpw $0x107e,r6 32 1.1 christos beq ok2 33 1.1 christos br not_ok 34 1.1 christos ok2: 35 1.1 christos cmpw $0x35ec,r7 36 1.1 christos beq ok3 37 1.1 christos br not_ok 38 1.1 christos 39 1.1 christos ok3: 40 1.1 christos pass 41