Home | History | Annotate | Line # | Download | only in emuspeed
      1  1.1  itohy /*	$NetBSD: mul64.S,v 1.1 1999/12/09 09:08:00 itohy Exp $	*/
      2  1.1  itohy 
      3  1.1  itohy #include <m68k/asm.h>
      4  1.1  itohy 
      5  1.1  itohy /*
      6  1.1  itohy  * stack:
      7  1.1  itohy  * + 8: count
      8  1.1  itohy  * + 4: retads
      9  1.1  itohy  * + 0: d2
     10  1.1  itohy  */
     11  1.1  itohy 
     12  1.1  itohy ENTRY_NOPROFILE(mul64ureg)
     13  1.1  itohy 	movl	%d2,%sp@-
     14  1.1  itohy 	movl	%sp@(8),%d2
     15  1.1  itohy L1:
     16  1.1  itohy 	mulul	%d2,%d1:%d0
     17  1.1  itohy 	subql	#1,%d2
     18  1.1  itohy 	jne	L1
     19  1.1  itohy 	movl	%sp@+,%d2
     20  1.1  itohy 	rts
     21  1.1  itohy 
     22  1.1  itohy ENTRY_NOPROFILE(mul64sreg)
     23  1.1  itohy 	movl	%d2,%sp@-
     24  1.1  itohy 	movl	%sp@(8),%d2
     25  1.1  itohy L2:
     26  1.1  itohy 	mulsl	%d2,%d1:%d0
     27  1.1  itohy 	subql	#1,%d2
     28  1.1  itohy 	jne	L2
     29  1.1  itohy 	movl	%sp@+,%d2
     30  1.1  itohy 	rts
     31  1.1  itohy 
     32  1.1  itohy ENTRY_NOPROFILE(mul64umem)
     33  1.1  itohy 	movl	%d2,%sp@-
     34  1.1  itohy 	movl	%sp@(8),%d2
     35  1.1  itohy L3:
     36  1.1  itohy 	mulul	%sp@(8),%d1:%d0
     37  1.1  itohy 	subql	#1,%d2
     38  1.1  itohy 	jne	L3
     39  1.1  itohy 	movl	%sp@+,%d2
     40  1.1  itohy 	rts
     41  1.1  itohy 
     42  1.1  itohy ENTRY_NOPROFILE(mul64smem)
     43  1.1  itohy 	movl	%d2,%sp@-
     44  1.1  itohy 	movl	%sp@(8),%d2
     45  1.1  itohy L4:
     46  1.1  itohy 	mulsl	%sp@(8),%d1:%d0
     47  1.1  itohy 	subql	#1,%d2
     48  1.1  itohy 	jne	L4
     49  1.1  itohy 	movl	%sp@+,%d2
     50  1.1  itohy 	rts
     51