Home | History | Annotate | Line # | Download | only in stdlib
div.S revision 1.6
      1  1.1   jtc /*
      2  1.5   jtc  * Written by J.T. Conklin <jtc (at) netbsd.org>.
      3  1.5   jtc  * Public domain.
      4  1.1   jtc  */
      5  1.1   jtc 
      6  1.4   jtc #include <machine/asm.h>
      7  1.4   jtc 
      8  1.2   jtc #if defined(LIBC_SCCS)
      9  1.6  fvdl RCSID("$NetBSD: div.S,v 1.6 2001/01/08 14:36:41 fvdl Exp $")
     10  1.2   jtc #endif
     11  1.1   jtc 
     12  1.1   jtc ENTRY(div)
     13  1.6  fvdl 	pushl   %ebx
     14  1.6  fvdl 	movl	8(%esp),%ebx
     15  1.6  fvdl 	movl	12(%esp),%eax
     16  1.6  fvdl 	movl	16(%esp),%ecx
     17  1.6  fvdl 	cdq
     18  1.6  fvdl 	idiv	%ecx
     19  1.6  fvdl 	movl	%eax,(%ebx)
     20  1.6  fvdl 	movl	%edx,4(%ebx)
     21  1.6  fvdl 	popl	%ebx
     22  1.6  fvdl 	ret $4
     23