diff options
Diffstat (limited to 'sysdeps/x86_64/fpu/e_exp2l.S')
-rw-r--r-- | sysdeps/x86_64/fpu/e_exp2l.S | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/sysdeps/x86_64/fpu/e_exp2l.S b/sysdeps/x86_64/fpu/e_exp2l.S index d634ad38f8..0e059b7565 100644 --- a/sysdeps/x86_64/fpu/e_exp2l.S +++ b/sysdeps/x86_64/fpu/e_exp2l.S @@ -6,13 +6,9 @@ */ #include <machine/asm.h> +#include <x86_64-math-asm.h> - .section .rodata.cst16,"aM",@progbits,16 - .p2align 4 - .type ldbl_min,@object -ldbl_min: .byte 0, 0, 0, 0, 0, 0, 0, 0x80, 0x1, 0 - .byte 0, 0, 0, 0, 0, 0 - ASM_SIZE_DIRECTIVE(ldbl_min) +DEFINE_LDBL_MIN #ifdef PIC # define MO(op) op##(%rip) @@ -50,16 +46,8 @@ ENTRY(__ieee754_exp2l) faddp /* 2^(fract(x)) */ fscale /* e^x */ fstp %st(1) - /* Ensure underflow for tiny result. */ - fldt MO(ldbl_min) - fld %st(1) - fucomip %st(1), %st - fstp %st - jnc 4f - fld %st - fmul %st - fstp %st -4: ret + LDBL_CHECK_FORCE_UFLOW_NONNEG_NAN + ret 1: testl $0x200, %eax /* Test sign. */ jz 2f /* If positive, jump. */ |