From bc33e617040166e971ec1e6822ac1cc417eb6c9c Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 19 Mar 2012 04:56:07 -0400 Subject: 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. --- src/math/i386/acos.s | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/math/i386/acos.s (limited to 'src/math/i386/acos.s') diff --git a/src/math/i386/acos.s b/src/math/i386/acos.s new file mode 100644 index 00000000..6f9ef7f0 --- /dev/null +++ b/src/math/i386/acos.s @@ -0,0 +1,24 @@ +.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 -- cgit v1.2.3