summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/i386/stdlib/ldiv.S
blob: 71894e688db8d201149c444b8ad5b241dec9499e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * Written by J.T. Conklin <jtc@netbsd.org>.
 * Public domain.
 */

#include <machine/asm.h>

ENTRY(ldiv)
	movl	4(%esp),%eax
	movl	8(%esp),%ecx
	cdq
	idiv	%ecx
	movl	%eax,4(%esp)
	movl	%edx,8(%esp)
	ret