about summary refs log tree commit diff
path: root/src/math/i386/modf.s
blob: b88e7841449ef2db128fab30e4f673e65eb3d29d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.global modf
.type modf,@function
modf:
	mov 12(%esp),%eax
	fldl 4(%esp)
	fld1
	fld %st(1)
1:	fprem
	fstsw %ax
	sahf
	jp 1b
	fstp %st(1)
	fsubr %st(1)
	fstpl (%eax)
	ret