blob: dc22db5dea254603a04a6e520b74a4abe84bdacb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* $OpenBSD: e_asin.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
/*
* Written by J.T. Conklin <jtc@NetBSD.org>.
* Public domain.
*/
#include <machine/asm.h>
#include "abi.h"
/* 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
|