2001-01-08 18:21:37 +03:00
|
|
|
/* $NetBSD: ldiv.S,v 1.7 2001/01/08 15:21:37 lukem Exp $ */
|
1993-10-09 02:57:13 +03:00
|
|
|
/*
|
1995-04-29 02:59:46 +04:00
|
|
|
* Written by J.T. Conklin <jtc@netbsd.org>.
|
|
|
|
* Public domain.
|
1993-10-09 02:57:13 +03:00
|
|
|
*/
|
|
|
|
|
1994-03-12 04:48:26 +03:00
|
|
|
#include <machine/asm.h>
|
|
|
|
|
1993-10-21 04:39:55 +03:00
|
|
|
#if defined(LIBC_SCCS)
|
2001-01-08 18:21:37 +03:00
|
|
|
RCSID("$NetBSD: ldiv.S,v 1.7 2001/01/08 15:21:37 lukem Exp $")
|
1993-10-21 04:39:55 +03:00
|
|
|
#endif
|
1993-10-09 02:57:13 +03:00
|
|
|
|
|
|
|
ENTRY(ldiv)
|
2001-01-08 17:36:41 +03:00
|
|
|
pushl %ebx
|
|
|
|
movl 8(%esp),%ebx
|
2001-01-08 18:21:37 +03:00
|
|
|
movl 12(%esp),%eax
|
|
|
|
movl 16(%esp),%ecx
|
|
|
|
cdq
|
|
|
|
idiv %ecx
|
|
|
|
movl %eax,(%ebx)
|
|
|
|
movl %edx,4(%ebx)
|
2001-01-08 17:36:41 +03:00
|
|
|
popl %ebx
|
2001-01-08 18:21:37 +03:00
|
|
|
ret $4
|