xref: /freebsd/lib/msun/amd64/e_fmodf.S (revision 1d386b48a555f61cb7325543adbbb5c3f3407a66)
1*83e449a4SBruce Evans/*
2*83e449a4SBruce Evans * Based on the i387 version written by J.T. Conklin <jtc@netbsd.org>.
3*83e449a4SBruce Evans * Public domain.
4*83e449a4SBruce Evans */
5*83e449a4SBruce Evans
6*83e449a4SBruce Evans#include <machine/asm.h>
7*83e449a4SBruce EvansENTRY(fmodf)
8*83e449a4SBruce Evans	movss	%xmm0,-4(%rsp)
9*83e449a4SBruce Evans	movss	%xmm1,-8(%rsp)
10*83e449a4SBruce Evans	flds	-8(%rsp)
11*83e449a4SBruce Evans	flds	-4(%rsp)
12*83e449a4SBruce Evans1:	fprem
13*83e449a4SBruce Evans	fstsw	%ax
14*83e449a4SBruce Evans	testw	$0x400,%ax
15*83e449a4SBruce Evans	jne	1b
16*83e449a4SBruce Evans	fstps	-4(%rsp)
17*83e449a4SBruce Evans	movss	-4(%rsp),%xmm0
18*83e449a4SBruce Evans	fstp	%st
19*83e449a4SBruce Evans	ret
20*83e449a4SBruce EvansEND(fmodf)
21*83e449a4SBruce Evans
22*83e449a4SBruce Evans	.section .note.GNU-stack,"",%progbits
23