NetBSD/lib/libc/arch/i386/stdlib/ldiv.S

24 lines
406 B
ArmAsm
Raw Normal View History

2001-01-08 18:21:37 +03:00
/* $NetBSD: ldiv.S,v 1.7 2001/01/08 15:21:37 lukem Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
1994-03-12 04:48:26 +03:00
#include <machine/asm.h>
#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 $")
#endif
ENTRY(ldiv)
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)
popl %ebx
2001-01-08 18:21:37 +03:00
ret $4