5 #include <machine/asm.h>
6 #include <i386-math-asm.h>
7 #include <libm-alias-finite.h>
12 # define MO(op) op##@GOTOFF(%ecx)
23 /* I added the following ugly construct because exp(+-Inf) resulted
24 in NaN. The ugliness results from the bright minds at Intel.
25 For the i686 the code can be written better.
26 -- drepper@cygnus.com. */
27 fxam /* Is NaN or +-Inf? */
32 je 1f /* Is +-Inf, jump. */
35 fsubr %st,%st(1) /* fract(x) */
37 f2xm1 /* 2^(fract(x)) - 1 */
39 faddp /* 2^(fract(x)) */
42 DBL_NARROW_EVAL_UFLOW_NONNEG_NAN
45 1: testl $0x200, %eax /* Test sign. */
46 jz 2f /* If positive, jump. */
48 fldz /* Set result to 0. */
51 libm_alias_finite (__ieee754_exp2, __exp2)