Merge branch 'vendor/BZIP'
[dragonfly.git] / lib / libm / arch / i386 / e_asin.S
1 /*
2  * Written by J.T. Conklin <jtc@NetBSD.org>.
3  * Public domain.
4  *
5  * $NetBSD: e_asin.S,v 1.7 2003/07/26 19:24:58 salo Exp $
6  * $DragonFly: src/lib/libm/arch/i386/e_asin.S,v 1.1 2005/07/26 21:15:19 joerg Exp $
7  */
8
9 #include <machine/asm.h>
10
11 #include "abi.h"
12
13 /* asin = atan (x / sqrt(1 - x^2)) */
14 ENTRY(asin)
15         XMM_ONE_ARG_DOUBLE_PROLOGUE
16         fldl    ARG_DOUBLE_ONE          /* x */
17         fld     %st(0)
18         fmul    %st(0)                  /* x^2 */
19         fld1
20         fsubp                           /* 1 - x^2 */
21         fsqrt                           /* sqrt (1 - x^2) */
22         fpatan
23         XMM_DOUBLE_EPILOGUE
24         ret