diff options
Diffstat (limited to 'sysdeps/i386/fpu/e_exp.S')
-rw-r--r-- | sysdeps/i386/fpu/e_exp.S | 44 |
1 files changed, 6 insertions, 38 deletions
diff --git a/sysdeps/i386/fpu/e_exp.S b/sysdeps/i386/fpu/e_exp.S index c00beedfe5..a7e7f13f6f 100644 --- a/sysdeps/i386/fpu/e_exp.S +++ b/sysdeps/i386/fpu/e_exp.S @@ -4,13 +4,9 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> - .section .rodata.cst8,"aM",@progbits,8 - - .p2align 3 - .type dbl_min,@object -dbl_min: .byte 0, 0, 0, 0, 0, 0, 0x10, 0 - ASM_SIZE_DIRECTIVE(dbl_min) +DEFINE_DBL_MIN #ifdef PIC # define MO(op) op##@GOTOFF(%ecx) @@ -46,22 +42,8 @@ ENTRY(__ieee754_exp) faddp /* 2^(fract(x * log2(e))) */ fscale /* e^x */ fstp %st(1) - fldl MO(dbl_min) - fld %st(1) - fucompp - fnstsw - sahf - jnc 3f - subl $8, %esp - cfi_adjust_cfa_offset (8) - fld %st(0) - fmul %st(0) - fstpl (%esp) - fstpl (%esp) - fldl (%esp) - addl $8, %esp - cfi_adjust_cfa_offset (-8) -3: ret + DBL_NARROW_EVAL_UFLOW_NONNEG_NAN + ret 1: testl $0x200, %eax /* Test sign. */ jz 2f /* If positive, jump. */ @@ -86,20 +68,6 @@ ENTRY(__exp_finite) faddp /* 2^(fract(x * log2(e))) */ fscale /* e^x */ fstp %st(1) - fldl MO(dbl_min) - fld %st(1) - fucompp - fnstsw - sahf - jnc 4f - subl $8, %esp - cfi_adjust_cfa_offset (8) - fld %st(0) - fmul %st(0) - fstpl (%esp) - fstpl (%esp) - fldl (%esp) - addl $8, %esp - cfi_adjust_cfa_offset (-8) -4: ret + DBL_NARROW_EVAL_UFLOW_NONNEG + ret END(__exp_finite) |