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

asm for inverse trig functions

unlike trig functions, these are easy to do in asm because they do not
involve (arbitrary-precision) argument reduction. fpatan automatically
takes care of domain issues, and in asin and acos, fsqrt takes care of
them for us.
上级 495a52ae
.global acosf
.type acosf,@function
acosf:
flds 4(%esp)
jmp 1f
.global acosl
.type acosl,@function
acosl:
fldt 4(%esp)
jmp 1f
.global acos
.type acos,@function
acos:
fldl 4(%esp)
1: fld %st(0)
fmul %st(0)
fld1
fsubp %st(1)
fsqrt
fxch %st(1)
fpatan
ret
.global asinf
.type asinf,@function
asinf:
flds 4(%esp)
jmp 1f
.global asinl
.type asinl,@function
asinl:
fldt 4(%esp)
jmp 1f
.global asin
.type asin,@function
asin:
fldl 4(%esp)
1: fld %st(0)
fmul %st(0)
fld1
fsubp %st(1)
fsqrt
fpatan
ret
.global atan
.type atan,@function
atan:
fldl 4(%esp)
fld1
fpatan
ret
.global atan2
.type atan2,@function
atan2:
fldl 4(%esp)
fldl 12(%esp)
fpatan
ret
.global atan2f
.type atan2f,@function
atan2f:
flds 4(%esp)
flds 8(%esp)
fpatan
ret
.global atan2l
.type atan2l,@function
atan2l:
fldt 4(%esp)
fldt 16(%esp)
fpatan
ret
.global atanf
.type atanf,@function
atanf:
flds 4(%esp)
fld1
fpatan
ret
.global atanl
.type atanl,@function
atanl:
fldt 4(%esp)
fld1
fpatan
ret
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册