xref: /freebsd/lib/libc/amd64/stdlib/div.S (revision aa24f48b361effe51163877d84f1b70d32b77e04)
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
8#include <machine/asm.h>
9__FBSDID("$FreeBSD$");
10
11ENTRY(div)
12	movl	%edi,%eax
13	cltd
14	idivl	%esi
15	salq	$32,%rdx
16	orq	%rdx,%rax
17	ret
18END(div)
19
20	.section .note.GNU-stack,"",%progbits
21