summaryrefslogtreecommitdiff
path: root/src/math/i386/modff.s
blob: d29b4b601b114dc9848bd8053078d84a30bd1559 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.global modff
.type modff,@function
modff:
	mov 8(%esp),%eax
	flds 4(%esp)
	fld1
	fld %st(1)
1:	fprem
	fstsw %ax
	sahf
	jp 1b
	fstp %st(1)
	fsubr %st(1)
	fstps (%eax)
	ret