xref: /minix/lib/libc/arch/x86_64/stdlib/div.S (revision ebfedea0)
1/*	$NetBSD: div.S,v 1.1 2001/06/19 00:25:04 fvdl Exp $	*/
2/*
3 * Written by Frank van der Linden (fvdl@wasabisystems.com)
4 * Public domain.
5 */
6
7#include <machine/asm.h>
8
9#if defined(LIBC_SCCS)
10RCSID("$NetBSD: div.S,v 1.1 2001/06/19 00:25:04 fvdl Exp $")
11#endif
12
13ENTRY(div)
14	movl	%edi, %eax
15	cltd
16	idivl	%esi
17	salq	$32, %rdx
18	orq	%rdx,%rax
19	ret
20