diff options
Diffstat (limited to 'lib/libm/arch/x86_64/e_asin.S')
-rw-r--r-- | lib/libm/arch/x86_64/e_asin.S | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/libm/arch/x86_64/e_asin.S b/lib/libm/arch/x86_64/e_asin.S new file mode 100644 index 00000000000..43bea55a236 --- /dev/null +++ b/lib/libm/arch/x86_64/e_asin.S @@ -0,0 +1,23 @@ +/* + * Written by J.T. Conklin <jtc@NetBSD.org>. + * Public domain. + */ + +#include <machine/asm.h> + +#include "abi.h" + +RCSID("$NetBSD: e_asin.S,v 1.7 2003/07/26 19:24:58 salo Exp $") + +/* asin = atan (x / sqrt(1 - x^2)) */ +ENTRY(__ieee754_asin) + XMM_ONE_ARG_DOUBLE_PROLOGUE + fldl ARG_DOUBLE_ONE /* x */ + fld %st(0) + fmul %st(0) /* x^2 */ + fld1 + fsubp /* 1 - x^2 */ + fsqrt /* sqrt (1 - x^2) */ + fpatan + XMM_DOUBLE_EPILOGUE + ret |