minix/lib/libc/arch/i386/stdlib/div.S
Lionel Sambuc f14fb60209 Libraries updates and cleanup
* Updating common/lib
 * Updating lib/csu
 * Updating lib/libc
 * Updating libexec/ld.elf_so
 * Corrected test on __minix in featuretest to actually follow the
   meaning of the comment.
 * Cleaned up _REENTRANT-related defintions.
 * Disabled -D_REENTRANT for libfetch
 * Removing some unneeded __NBSD_LIBC defines and tests

Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
2013-01-14 11:36:26 +01:00

24 lines
421 B
ArmAsm

/* $NetBSD: div.S,v 1.9 2011/06/12 20:29:25 plunky Exp $ */
/*
* Written by J.T. Conklin <jtc@NetBSD.org>.
* Public domain.
*/
#include <machine/asm.h>
#if defined(LIBC_SCCS)
RCSID("$NetBSD: div.S,v 1.9 2011/06/12 20:29:25 plunky Exp $")
#endif
ENTRY(div)
pushl %ebx
movl 8(%esp),%ebx
movl 12(%esp),%eax
movl 16(%esp),%ecx
cdq
idiv %ecx
movl %eax,(%ebx)
movl %edx,4(%ebx)
movl %ebx,%eax
popl %ebx
ret $4