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