1 | /* |
2 | * Public domain. |
3 | */ |
4 | |
5 | #include <machine/asm.h> |
6 | #include <i386-math-asm.h> |
7 | #include <libm-alias-finite.h> |
8 | |
9 | RCSID("$NetBSD: $" ) |
10 | |
11 | .section .rodata.cst4,"aM" ,@progbits,4 |
12 | |
13 | DEFINE_FLT_MIN |
14 | |
15 | #ifdef PIC |
16 | # define MO(op) op##@GOTOFF(%ecx) |
17 | #else |
18 | # define MO(op) op |
19 | #endif |
20 | |
21 | .text |
22 | |
23 | /* asin = atan (x / sqrt(1 - x^2)) */ |
24 | ENTRY(__ieee754_asinf) |
25 | #ifdef PIC |
26 | LOAD_PIC_REG (cx) |
27 | #endif |
28 | flds 4(%esp) /* x */ |
29 | fld %st |
30 | fmul %st(0) /* x^2 */ |
31 | fld1 |
32 | fsubp /* 1 - x^2 */ |
33 | fsqrt /* sqrt (1 - x^2) */ |
34 | fpatan |
35 | FLT_CHECK_FORCE_UFLOW |
36 | ret |
37 | END (__ieee754_asinf) |
38 | libm_alias_finite (__ieee754_asinf, __asinf) |
39 | |