Home | History | Annotate | Line # | Download | only in cr16
      1 # cr16 testcase for pop count reg insns.
      2 # mach:	 cr16
      3 
      4 	.include "testutils.inc"
      5 
      6 	start
      7 
      8 	.global pop2
      9 pop2:
     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 	pop $3,r5
     19 
     20 	cmpw $0x2f50,r5
     21 	beq ok1
     22 	br not_ok
     23 not_ok:
     24 	fail
     25 ok1:
     26 	cmpw $0x107e,r6
     27 	beq ok2
     28 	br not_ok
     29 ok2:
     30 	cmpw $0x35ec,r7
     31 	beq ok3
     32 	br not_ok
     33 
     34 ok3:
     35 	pass
     36