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