提交 1bf4dad3 编写于 作者: R Rich Felker

asm for modf functions

上级 0b70a1e9
.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
.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
.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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册