subx.cgs 1.4 KB

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