xref: /freebsd/lib/msun/amd64/e_remainderf.S (revision a9fcb51fbb8d2c5b47a35bcae5b4d5fb771c5985)
1/*
2 * Based on the i387 version written by J.T. Conklin <jtc@netbsd.org>.
3 * Public domain.
4 */
5
6#include <machine/asm.h>
7
8RCSID("from: $NetBSD: e_remainderf.S,v 1.2 1995/05/08 23:49:47 jtc Exp $")
9__FBSDID("$FreeBSD$")
10
11ENTRY(remainderf)
12	movss	%xmm0,-4(%rsp)
13	movss	%xmm1,-8(%rsp)
14	flds	-8(%rsp)
15	flds	-4(%rsp)
161:	fprem1
17	fstsw	%ax
18	testw	$0x400,%ax
19	jne	1b
20	fstps	-4(%rsp)
21	movss	-4(%rsp),%xmm0
22	fstp	%st
23	ret
24
25	.section .note.GNU-stack,"",%progbits
26