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