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