diff options
Diffstat (limited to 'sysdeps/i386/fpu/e_expf.S')
-rw-r--r-- | sysdeps/i386/fpu/e_expf.S | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sysdeps/i386/fpu/e_expf.S b/sysdeps/i386/fpu/e_expf.S index 4e4f6a0df7..65cb4ec204 100644 --- a/sysdeps/i386/fpu/e_expf.S +++ b/sysdeps/i386/fpu/e_expf.S @@ -5,10 +5,22 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> +DEFINE_FLT_MIN +#ifdef PIC +# define MO(op) op##@GOTOFF(%ecx) +#else +# define MO(op) op +#endif + + .text /* e^x = 2^(x * log2(e)) */ ENTRY(__ieee754_expf) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif flds 4(%esp) /* I added the following ugly construct because exp(+-Inf) resulted in NaN. The ugliness results from the bright minds at Intel. @@ -31,6 +43,7 @@ ENTRY(__ieee754_expf) faddp /* 2^(fract(x * log2(e))) */ fscale /* e^x */ fstp %st(1) + FLT_NARROW_EVAL_UFLOW_NONNEG_NAN ret 1: testl $0x200, %eax /* Test sign. */ @@ -42,6 +55,9 @@ END (__ieee754_expf) ENTRY(__expf_finite) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif fldl2e fmuls 4(%esp) /* x * log2(e) */ fld %st @@ -53,5 +69,6 @@ ENTRY(__expf_finite) faddp /* 2^(fract(x * log2(e))) */ fscale /* e^x */ fstp %st(1) + FLT_NARROW_EVAL_UFLOW_NONNEG ret END(__expf_finite) |