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