1 /* 2 * Written by J.T. Conklin <jtc (at) netbsd.org>. 3 * Public domain. 4 */ 5 6 #include <machine/asm.h> 7 8 #include "abi.h" 9 10 RCSID("$NetBSD: e_acos.S,v 1.7 2001/06/19 00:26:29 fvdl Exp $") 11 12 /* acos = atan (sqrt(1 - x^2) / x) */ 13 ENTRY(__ieee754_acos) 14 XMM_ONE_ARG_DOUBLE_PROLOGUE 15 fldl ARG_DOUBLE_ONE /* x */ 16 fld %st(0) 17 fmul %st(0) /* x^2 */ 18 fld1 19 fsubp /* 1 - x^2 */ 20 fsqrt /* sqrt (1 - x^2) */ 21 fxch %st(1) 22 fpatan 23 XMM_DOUBLE_EPILOGUE 24 ret 25