xref: /dragonfly/lib/libc/x86_64/stdlib/div.S (revision 25a2db75)
1/*	$NetBSD: div.S,v 1.1 2001/06/19 00:25:04 fvdl Exp $	*/
2
3/*-
4 * Written by Frank van der Linden (fvdl@wasabisystems.com)
5 * Public domain.
6 *
7 * $FreeBSD: src/lib/libc/amd64/stdlib/div.S,v 1.2 2008/11/02 01:10:54 peter Exp $
8 */
9
10#include <machine/asm.h>
11
12ENTRY(div)
13	movl	%edi,%eax
14	cltd
15	idivl	%esi
16	salq	$32,%rdx
17	orq	%rdx,%rax
18	ret
19END(div)
20