1/*
2 * Public domain.
3 */
4
5#include <machine/asm.h>
6#include <i386-math-asm.h>
7#include <libm-alias-finite.h>
8
9RCSID("$NetBSD: e_asin.S,v 1.4 1995/05/08 23:45:40 jtc Exp $")
10
11DEFINE_DBL_MIN
12
13#ifdef PIC
14# define MO(op) op##@GOTOFF(%ecx)
15#else
16# define MO(op) op
17#endif
18
19 .text
20
21/* asin = atan (x / sqrt((1-x) (1+x))) */
22ENTRY(__ieee754_asin)
23#ifdef PIC
24 LOAD_PIC_REG (cx)
25#endif
26 fldl 4(%esp) /* x */
27 fld %st
28 fld1 /* 1 : x : x */
29 fsubp /* 1 - x : x */
30 fld1 /* 1 : 1 - x : x */
31 fadd %st(2) /* 1 + x : 1 - x : x */
32 fmulp /* 1 - x^2 */
33 fsqrt /* sqrt (1 - x^2) */
34 fpatan
35 DBL_CHECK_FORCE_UFLOW
36 ret
37END (__ieee754_asin)
38libm_alias_finite (__ieee754_asin, __asin)
39

source code of glibc/sysdeps/i386/fpu/e_asin.S