sdiv.S 277 B

123456789101112131415161718
  1. /*
  2. * Sparc v9 has divide.
  3. * As divx takes 68 cycles and sdivcc only 36,
  4. * we use sdivcc eventhough it is deprecated.
  5. */
  6. .text
  7. .align 32
  8. ENTRY(.div)
  9. sra %o0, 31, %o2
  10. wr %o2, 0, %y
  11. sdivcc %o0, %o1, %o0
  12. xnor %o0, %g0, %o2
  13. retl
  14. movvs %icc, %o2, %o0
  15. END(.div)