1 /* This is an assembly language implementation of mulsi3
, divsi3
, and modsi3
2 for the sparclite processor.
4 These routines are all from the SPARClite User
's Guide, slightly edited
5 to match the desired calling convention, and also to optimize them. */
13 wr %g0,%g0,%y ! Not a delayed write for sparclite
56 wr %g0,%g0,%y ! Not a delayed write for sparclite
103 ! ??? This routine could be made faster if was optimized, and if it was
104 ! rewritten to only calculate the quotient.
106 wr %g0,%g0,%y ! Not a delayed write for sparclite
114 2: divscc %o0,%o4,%g1
170 mov %g1,%o0 ! Quotient is in %g1.
178 ! ??? This routine could be made faster if was optimized, and if it was
179 ! rewritten to only calculate the remainder.
181 wr %g0,%g0,%y ! Not a delayed write for sparclite
189 2: divscc %o0,%o4,%g1
245 mov %o3,%o0 ! Remainder is in %o3.