mulv32.ms 708 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # mach: crisv32
  2. # output: fffffffe\n
  3. # output: ffffffff\n
  4. # output: fffffffe\n
  5. # output: 1\n
  6. # output: fffffffe\n
  7. # output: ffffffff\n
  8. # output: fffffffe\n
  9. # output: 1\n
  10. ; Check that carry is not modified on v32.
  11. .include "testutils.inc"
  12. start
  13. moveq -1,r3
  14. moveq 2,r4
  15. setf c
  16. muls.d r4,r3
  17. test_cc 1 0 0 1
  18. dumpr3 ; fffffffe
  19. move mof,r3
  20. dumpr3 ; ffffffff
  21. moveq -1,r3
  22. moveq 2,r4
  23. setf c
  24. mulu.d r4,r3
  25. test_cc 0 0 1 1
  26. dumpr3 ; fffffffe
  27. move mof,r3
  28. dumpr3 ; 1
  29. moveq -1,r3
  30. moveq 2,r4
  31. clearf c
  32. muls.d r4,r3
  33. test_cc 1 0 0 0
  34. dumpr3 ; fffffffe
  35. move mof,r3
  36. dumpr3 ; ffffffff
  37. moveq -1,r3
  38. moveq 2,r4
  39. clearf c
  40. mulu.d r4,r3
  41. test_cc 0 0 1 0
  42. dumpr3 ; fffffffe
  43. move mof,r3
  44. dumpr3 ; 1
  45. quit