xref: /freebsd/lib/libc/amd64/stdlib/div.S (revision 834063202a16592e1ef5c3a9fbd04ca5f1df3ed0)
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