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