urem.S 251 B

1234567891011121314151617
  1. /*
  2. * Sparc v9 has divide.
  3. * As divx takes 68 cycles and udiv only 37,
  4. * we use udiv eventhough it is deprecated.
  5. */
  6. .text
  7. .align 32
  8. ENTRY(.urem)
  9. wr %g0, 0, %y
  10. udiv %o0, %o1, %o2
  11. umul %o2, %o1, %o2
  12. retl
  13. sub %o0, %o2, %o0
  14. END(.urem)