subicc.cgs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # frv testcase for subicc $GRi,$GRj,$GRk
  2. # mach: all
  3. .include "testutils.inc"
  4. start
  5. .global subicc
  6. subicc:
  7. set_gr_immed 2,gr8
  8. set_icc 0x0f,0 ; Set mask opposite of expected
  9. subicc gr8,1,gr8,icc0
  10. test_icc 0 0 0 0 icc0
  11. test_gr_immed 1,gr8
  12. set_gr_limmed 0x8000,0x0000,gr8
  13. set_icc 0x0d,0 ; Set mask opposite of expected
  14. subicc gr8,1,gr8,icc0
  15. test_icc 0 0 1 0 icc0
  16. test_gr_limmed 0x7fff,0xffff,gr8
  17. set_gr_immed 0x1ff,gr8
  18. set_icc 0x0b,0 ; Set mask opposite of expected
  19. subicc gr8,0x1ff,gr8,icc0
  20. test_icc 0 1 0 0 icc0
  21. test_gr_immed 0,gr8
  22. set_icc 0x06,0 ; Set mask opposite of expected
  23. subicc gr8,1,gr8,icc0
  24. test_icc 1 0 0 1 icc0
  25. test_gr_limmed 0xffff,0xffff,gr8
  26. set_gr_immed 2,gr8
  27. set_icc 0x0e,0 ; Set mask opposite of expected
  28. subicc gr8,-1,gr8,icc0
  29. test_icc 0 0 0 1 icc0
  30. test_gr_immed 3,gr8
  31. set_gr_limmed 0x8000,0x0000,gr8
  32. set_icc 0x06,0 ; Set mask opposite of expected
  33. subicc gr8,-1,gr8,icc0
  34. test_icc 1 0 0 1 icc0
  35. test_gr_limmed 0x8000,0x0001,gr8
  36. set_gr_immed -512,gr8
  37. set_icc 0x0b,0 ; Set mask opposite of expected
  38. subicc gr8,-512,gr8,icc0
  39. test_icc 0 1 0 0 icc0
  40. test_gr_immed 0,gr8
  41. set_icc 0x0e,0 ; Set mask opposite of expected
  42. subicc gr8,-1,gr8,icc0
  43. test_icc 0 0 0 1 icc0
  44. test_gr_immed 1,gr8
  45. pass