popret2.cgs 471 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # cr16 testcase for popret count reg insns.
  2. # mach: cr16
  3. .include "testutils.inc"
  4. start
  5. .global popret2
  6. popret2:
  7. movd $0x1000, (sp)
  8. movw $0x2f50, r3
  9. storw r3, 0x1000
  10. movw $0x107e, r3
  11. storw r3, 0x1002
  12. movw $0x35ec, r3
  13. storw r3, 0x1004
  14. movd $ok, (ra)
  15. lshd $-1, (ra)
  16. stord (ra), 0x1006
  17. popret $3,r5
  18. ok:
  19. cmpw $0x2f50,r5
  20. beq ok1
  21. br not_ok
  22. not_ok:
  23. fail
  24. ok1:
  25. cmpw $0x107e,r6
  26. beq ok2
  27. br not_ok
  28. ok2:
  29. cmpw $0x35ec,r7
  30. beq ok3
  31. br not_ok
  32. ok3:
  33. pass