muldi.s 816 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. |muldi3 routine copyright (C) 2002, Kevin Kofler
  2. .xdef __muldi3
  3. .text
  4. __muldi3:
  5. move.w 18(%a7),%d0
  6. mulu 4(%a7),%d0
  7. move.w 16(%a7),%d2
  8. mulu 6(%a7),%d2
  9. add.w %d2,%d0
  10. move.w 14(%a7),%d2
  11. mulu 8(%a7),%d2
  12. add.w %d2,%d0
  13. move.w 12(%a7),%d2
  14. mulu 10(%a7),%d2
  15. add.w %d2,%d0
  16. swap %d0
  17. clr.w %d0
  18. move.w 18(%a7),%d2
  19. mulu 6(%a7),%d2
  20. add.l %d2,%d0
  21. move.w 16(%a7),%d2
  22. mulu 8(%a7),%d2
  23. add.l %d2,%d0
  24. move.w 14(%a7),%d2
  25. mulu 10(%a7),%d2
  26. add.l %d2,%d0
  27. move.w 18(%a7),%d1
  28. mulu 8(%a7),%d1
  29. swap %d1
  30. add.w %d1,%d0
  31. clr.w %d1
  32. swap %d0
  33. addx.w %d1,%d0
  34. swap %d0
  35. move.w 16(%a7),%d2
  36. mulu 10(%a7),%d2
  37. swap %d2
  38. add.w %d2,%d0
  39. clr.w %d2
  40. swap %d0
  41. addx.w %d2,%d0
  42. swap %d0
  43. add.l %d2,%d1
  44. moveq.l #0,%d2
  45. addx.l %d2,%d0
  46. move.w 18(%a7),%d2
  47. mulu 10(%a7),%d2
  48. add.l %d2,%d1
  49. moveq.l #0,%d2
  50. addx.l %d2,%d0
  51. rts