Rich Felker
13 سال پیش
|
@@ -0,0 +1,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
|
|
@@ -0,0 +1,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
|
|
@@ -0,0 +1,15 @@
|
|
|
+.global modfl
|
|
|
+.type modfl,@function
|
|
|
+modfl:
|
|
|
+ mov 16(%esp),%eax
|
|
|
+ fldt 4(%esp)
|
|
|
+ fld1
|
|
|
+ fld %st(1)
|
|
|
+1: fprem
|
|
|
+ fstsw %ax
|
|
|
+ sahf
|
|
|
+ jp 1b
|
|
|
+ fstp %st(1)
|
|
|
+ fsubr %st(1)
|
|
|
+ fstpt (%eax)
|
|
|
+ ret
|