Override elf_nacl.xr linker script so that libc_pic.os links correctly
[glibc/nacl-glibc.git] / sysdeps / i386 / fpu / e_acos.S
blob070147f415328e9e9b1755c081d4808b1428c887
1 /*
2  * Written by J.T. Conklin <jtc@netbsd.org>.
3  * Public domain.
4  */
6 #include <machine/asm.h>
8 RCSID("$NetBSD: e_acos.S,v 1.4 1995/05/08 23:44:37 jtc Exp $")
10 /* acos = atan (sqrt(1 - x^2) / x) */
11 ENTRY(__ieee754_acos)
12         fldl    4(%esp)                 /* x */
13         fld     %st                     /* x : x */
14         fmul    %st(0)                  /* x^2 : x */
15         fld1                            /* 1 : x^2 : x */
16         fsubp                           /* 1 - x^2 : x */
17         fsqrt                           /* sqrt (1 - x^2) : x */
18         fxch    %st(1)                  /* x : sqrt (1 - x^2) */
19         fpatan                          /* atan (sqrt(1 - x^2) / x) */
20         popl %ecx; nacljmp %ecx
21 END (__ieee754_acos)