提交 b9351477 编写于 作者: R Rich Felker

assembly optimizations for fmod/remainder functions

上级 8d9e9486
.global fmod
.type fmod,@function
fmod:
fldl 12(%esp)
fldl 4(%esp)
1: fprem
fstsw %ax
sahf
jp 1b
fstp %st(1)
ret
.global fmodf
.type fmodf,@function
fmodf:
flds 8(%esp)
flds 4(%esp)
1: fprem
fstsw %ax
sahf
jp 1b
fstp %st(1)
ret
.global fmodl
.type fmodl,@function
fmodl:
fldt 16(%esp)
fldt 4(%esp)
1: fprem
fstsw %ax
sahf
jp 1b
fstp %st(1)
ret
.global remainder
.type remainder,@function
remainder:
fldl 12(%esp)
fldl 4(%esp)
1: fprem1
fstsw %ax
sahf
jp 1b
fstp %st(1)
ret
.global remainderf
.type remainderf,@function
remainderf:
flds 8(%esp)
flds 4(%esp)
1: fprem1
fstsw %ax
sahf
jp 1b
fstp %st(1)
ret
.global remainderl
.type remainderl,@function
remainderl:
fldt 16(%esp)
fldt 4(%esp)
1: fprem1
fstsw %ax
sahf
jp 1b
fstp %st(1)
ret
.global fmodl
.type fmodl,@function
fmodl:
fldt 24(%rsp)
fldt 8(%rsp)
1: fprem
fstsw %ax
sahf
jp 1b
fstp %st(1)
ret
.global remainderl
.type remainderl,@function
remainderl:
fldt 24(%rsp)
fldt 8(%rsp)
1: fprem1
fstsw %ax
sahf
jp 1b
fstp %st(1)
ret
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册