summaryrefslogtreecommitdiff
path: root/src/math/i386/asin.s
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-03-19 04:56:07 -0400
committerRich Felker <dalias@aerifal.cx>2012-03-19 04:56:07 -0400
commitbc33e617040166e971ec1e6822ac1cc417eb6c9c (patch)
tree984dfc67487f0759fa5cceca0e9e53e28ad05b99 /src/math/i386/asin.s
parent495a52ae7bb581aac2942d7cb095cca2ff53ca3c (diff)
downloadmusl-bc33e617040166e971ec1e6822ac1cc417eb6c9c.tar.gz
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.
Diffstat (limited to 'src/math/i386/asin.s')
-rw-r--r--src/math/i386/asin.s23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/math/i386/asin.s b/src/math/i386/asin.s
new file mode 100644
index 00000000..cab7bfc8
--- /dev/null
+++ b/src/math/i386/asin.s
@@ -0,0 +1,23 @@
+.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