xref: /freebsd/lib/msun/amd64/e_fmodf.S (revision d37eb51047221dc3322b34db1038ff3aa533883f)
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>
7ENTRY(fmodf)
8	movss	%xmm0,-4(%rsp)
9	movss	%xmm1,-8(%rsp)
10	flds	-8(%rsp)
11	flds	-4(%rsp)
121:	fprem
13	fstsw	%ax
14	testw	$0x400,%ax
15	jne	1b
16	fstps	-4(%rsp)
17	movss	-4(%rsp),%xmm0
18	fstp	%st
19	ret
20END(fmodf)
21
22	.section .note.GNU-stack,"",%progbits
23