subxi.cgs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # frv testcase for subxi $GRi,$GRj,$GRk,$ICCi_1
  2. # mach: all
  3. .include "testutils.inc"
  4. start
  5. .global subxi
  6. subxi:
  7. set_gr_immed 2,gr8
  8. set_icc 0x0e,0 ; Make sure carry is off
  9. subxi gr8,1,gr8,icc0
  10. test_icc 1 1 1 0 icc0
  11. test_gr_immed 1,gr8
  12. set_gr_limmed 0x8000,0x0000,gr8
  13. set_icc 0x0c,0 ; Make sure carry is off
  14. subxi gr8,1,gr8,icc0
  15. test_icc 1 1 0 0 icc0
  16. test_gr_limmed 0x7fff,0xffff,gr8
  17. set_gr_immed 0x1ff,gr8
  18. set_icc 0x0a,0 ; Make sure carry is off
  19. subxi gr8,0x1ff,gr8,icc0
  20. test_icc 1 0 1 0 icc0
  21. test_gr_immed 0,gr8
  22. set_icc 0x06,0 ; Make sure carry is off
  23. subxi gr8,1,gr8,icc0
  24. test_icc 0 1 1 0 icc0
  25. test_gr_limmed 0xffff,0xffff,gr8
  26. set_gr_immed 3,gr8
  27. set_icc 0x0f,0 ; Make sure carry is on
  28. subxi gr8,1,gr8,icc0
  29. test_icc 1 1 1 1 icc0
  30. test_gr_immed 1,gr8
  31. set_gr_limmed 0x8000,0x0000,gr8
  32. set_icc 0x0d,0 ; Make sure carry is on
  33. subxi gr8,0,gr8,icc0
  34. test_icc 1 1 0 1 icc0
  35. test_gr_limmed 0x7fff,0xffff,gr8
  36. set_gr_immed 0x200,gr8
  37. set_icc 0x0b,0 ; Make sure carry is on
  38. subxi gr8,0x1ff,gr8,icc0
  39. test_icc 1 0 1 1 icc0
  40. test_gr_immed 0,gr8
  41. set_icc 0x07,0 ; Make sure carry is on
  42. subxi gr8,0,gr8,icc0
  43. test_icc 0 1 1 1 icc0
  44. test_gr_limmed 0xffff,0xffff,gr8
  45. set_icc 0x07,0 ; Make sure carry is on
  46. subxi gr8,-512,gr8,icc0
  47. test_icc 0 1 1 1 icc0
  48. test_gr_immed 510,gr8
  49. pass