aio: Remove support for BROKEN_THREAD_SIGNALS
[glibc.git] / sysdeps / i386 / fpu / s_log1pf.S
blobacaa299d94835fd250961b61586c367aa0fc028a
1 /*
2  * Written by J.T. Conklin <jtc@netbsd.org>.
3  * Public domain.
4  */
6 #include <machine/asm.h>
7 #include <i386-math-asm.h>
9 RCSID("$NetBSD: s_log1pf.S,v 1.4 1995/05/09 00:13:05 jtc Exp $")
11         .section .rodata
13         .align ALIGNARG(4)
14         /* The fyl2xp1 can only be used for values in
15                 -1 + sqrt(2) / 2 <= x <= 1 - sqrt(2) / 2
16            0.29 is a safe value.
17         */
18 limit:  .float 0.29
19 one:    .float 1.0
21 DEFINE_FLT_MIN
23 #ifdef PIC
24 # define MO(op) op##@GOTOFF(%edx)
25 #else
26 # define MO(op) op
27 #endif
30  * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29,
31  * otherwise fyl2x with the needed extra computation.
32  */
33         .text
34 ENTRY(__log1pf)
35         fldln2
37         flds    4(%esp)
39 #ifdef  PIC
40         LOAD_PIC_REG (dx)
41 #endif
43         fxam
44         fnstsw
45         fld     %st
46         sahf
47         jc      3f              // in case x is NaN or ±Inf
48 4:      fabs
49         fcomps  MO(limit)
50         fnstsw
51         sahf
52         jc      2f
54         fadds   MO(one)
55         fyl2x
56         ret
58 2:      fyl2xp1
59         FLT_CHECK_FORCE_UFLOW_NONNAN
60         ret
62 3:      jp      4b              // in case x is ±Inf
63         fstp    %st(1)
64         fstp    %st(1)
65         ret
67 END (__log1pf)