2012-11-15 12:06:41 +01:00
|
|
|
/* $NetBSD: ldiv.S,v 1.9 2011/06/12 20:29:25 plunky Exp $ */
|
2011-02-14 20:36:03 +01:00
|
|
|
/*
|
|
|
|
* Written by J.T. Conklin <jtc@NetBSD.org>.
|
|
|
|
* Public domain.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <machine/asm.h>
|
|
|
|
|
|
|
|
#if defined(LIBC_SCCS)
|
2012-11-15 12:06:41 +01:00
|
|
|
RCSID("$NetBSD: ldiv.S,v 1.9 2011/06/12 20:29:25 plunky Exp $")
|
2011-02-14 20:36:03 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
ENTRY(ldiv)
|
|
|
|
pushl %ebx
|
|
|
|
movl 8(%esp),%ebx
|
|
|
|
movl 12(%esp),%eax
|
|
|
|
movl 16(%esp),%ecx
|
|
|
|
cdq
|
|
|
|
idiv %ecx
|
|
|
|
movl %eax,(%ebx)
|
|
|
|
movl %edx,4(%ebx)
|
2012-11-15 12:06:41 +01:00
|
|
|
movl %ebx,%eax
|
2011-02-14 20:36:03 +01:00
|
|
|
popl %ebx
|
|
|
|
ret $4
|