diff options
Diffstat (limited to 'sysdeps/i386')
-rw-r--r-- | sysdeps/i386/configure | 7 | ||||
-rw-r--r-- | sysdeps/i386/fpu/e_log10f.S | 66 | ||||
-rw-r--r-- | sysdeps/i386/fpu/libm-test-ulps | 116 | ||||
-rw-r--r-- | sysdeps/i386/fpu/s_expm1f.S | 112 | ||||
-rw-r--r-- | sysdeps/i386/fpu/s_log1pf.S | 66 | ||||
-rw-r--r-- | sysdeps/i386/i686/fpu/multiarch/libm-test-ulps | 98 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/s_fma-fma.c | 2 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/s_fma.c | 2 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/s_fmaf-fma.c | 2 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/s_fmaf.c | 2 |
10 files changed, 193 insertions, 280 deletions
diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure index 84656cef6e..a618692adf 100644 --- a/sysdeps/i386/configure +++ b/sysdeps/i386/configure @@ -61,8 +61,8 @@ printf %s "checking for linker static PIE support... " >&6; } if test ${libc_cv_ld_static_pie+y} then : printf %s "(cached) " >&6 -else $as_nop - cat > conftest.s <<\EOF +else case e in #( + e) cat > conftest.s <<\EOF .text .global _start _start: @@ -80,7 +80,8 @@ EOF libc_cv_ld_static_pie=yes fi fi -rm -f conftest* +rm -f conftest* ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ld_static_pie" >&5 printf "%s\n" "$libc_cv_ld_static_pie" >&6; } diff --git a/sysdeps/i386/fpu/e_log10f.S b/sysdeps/i386/fpu/e_log10f.S deleted file mode 100644 index 47f82e1993..0000000000 --- a/sysdeps/i386/fpu/e_log10f.S +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Public domain. - */ - -#include <machine/asm.h> -#include <libm-alias-finite.h> - - .section .rodata.cst8,"aM",@progbits,8 - - .p2align 3 - .type one,@object -one: .double 1.0 - ASM_SIZE_DIRECTIVE(one) - /* It is not important that this constant is precise. It is only - a value which is known to be on the safe side for using the - fyl2xp1 instruction. */ - .type limit,@object -limit: .double 0.29 - ASM_SIZE_DIRECTIVE(limit) - - -#ifdef PIC -# define MO(op) op##@GOTOFF(%edx) -#else -# define MO(op) op -#endif - - .text -ENTRY(__ieee754_log10f) - fldlg2 // log10(2) - flds 4(%esp) // x : log10(2) -#ifdef PIC - LOAD_PIC_REG (dx) -#endif - fxam - fnstsw - fld %st // x : x : log10(2) - sahf - jc 3f // in case x is NaN or ħInf -4: fsubl MO(one) // x-1 : x : log10(2) - fld %st // x-1 : x-1 : x : log10(2) - fabs // |x-1| : x-1 : x : log10(2) - fcompl MO(limit) // x-1 : x : log10(2) - fnstsw // x-1 : x : log10(2) - andb $0x45, %ah - jz 2f - fxam - fnstsw - andb $0x45, %ah - cmpb $0x40, %ah - jne 5f - fabs // log10(1) is +0 in all rounding modes. -5: fstp %st(1) // x-1 : log10(2) - fyl2xp1 // log10(x) - ret - -2: fstp %st(0) // x : log10(2) - fyl2x // log10(x) - ret - -3: jp 4b // in case x is ħInf - fstp %st(1) - fstp %st(1) - ret -END (__ieee754_log10f) -libm_alias_finite (__ieee754_log10f, __log10f) diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps index f2139fc172..a77ded2648 100644 --- a/sysdeps/i386/fpu/libm-test-ulps +++ b/sysdeps/i386/fpu/libm-test-ulps @@ -1024,7 +1024,7 @@ ldouble: 3 Function: Imaginary part of "ctan_upward": double: 2 -float: 1 +float: 2 float128: 5 ldouble: 3 @@ -1153,6 +1153,26 @@ float: 1 float128: 3 ldouble: 2 +Function: "exp10m1": +double: 3 +float128: 3 +ldouble: 4 + +Function: "exp10m1_downward": +double: 3 +float128: 6 +ldouble: 6 + +Function: "exp10m1_towardzero": +double: 2 +float128: 6 +ldouble: 5 + +Function: "exp10m1_upward": +double: 5 +float128: 6 +ldouble: 6 + Function: "exp2": double: 1 float128: 1 @@ -1172,6 +1192,26 @@ float: 1 float128: 2 ldouble: 1 +Function: "exp2m1": +double: 2 +float128: 2 +ldouble: 3 + +Function: "exp2m1_downward": +double: 3 +float128: 3 +ldouble: 6 + +Function: "exp2m1_towardzero": +double: 3 +float128: 4 +ldouble: 5 + +Function: "exp2m1_upward": +double: 3 +float128: 5 +ldouble: 6 + Function: "exp_downward": double: 1 float: 1 @@ -1194,19 +1234,16 @@ ldouble: 3 Function: "expm1_downward": double: 1 -float: 1 float128: 2 ldouble: 4 Function: "expm1_towardzero": double: 1 -float: 1 float128: 4 ldouble: 4 Function: "expm1_upward": double: 1 -float: 1 float128: 3 ldouble: 4 @@ -1258,13 +1295,13 @@ float128: 2 ldouble: 8 Function: "j0_downward": -double: 5 +double: 6 float: 9 float128: 9 ldouble: 6 Function: "j0_towardzero": -double: 6 +double: 7 float: 9 float128: 9 ldouble: 6 @@ -1375,6 +1412,26 @@ float: 1 float128: 1 ldouble: 1 +Function: "log10p1": +double: 1 +float128: 3 +ldouble: 4 + +Function: "log10p1_downward": +double: 2 +float128: 4 +ldouble: 8 + +Function: "log10p1_towardzero": +double: 2 +float128: 3 +ldouble: 8 + +Function: "log10p1_upward": +double: 2 +float128: 4 +ldouble: 6 + Function: "log1p": double: 1 float128: 3 @@ -1382,19 +1439,16 @@ ldouble: 2 Function: "log1p_downward": double: 1 -float: 1 float128: 3 ldouble: 4 Function: "log1p_towardzero": double: 1 -float: 1 float128: 3 ldouble: 4 Function: "log1p_upward": double: 1 -float: 1 float128: 2 ldouble: 3 @@ -1421,6 +1475,26 @@ float: 1 float128: 1 ldouble: 1 +Function: "log2p1": +double: 1 +float128: 3 +ldouble: 4 + +Function: "log2p1_downward": +double: 2 +float128: 3 +ldouble: 3 + +Function: "log2p1_towardzero": +double: 2 +float128: 2 +ldouble: 3 + +Function: "log2p1_upward": +double: 2 +float128: 3 +ldouble: 5 + Function: "log_downward": double: 1 float128: 1 @@ -1436,6 +1510,26 @@ double: 1 float128: 1 ldouble: 1 +Function: "logp1": +double: 1 +float128: 3 +ldouble: 2 + +Function: "logp1_downward": +double: 1 +float128: 3 +ldouble: 4 + +Function: "logp1_towardzero": +double: 1 +float128: 3 +ldouble: 4 + +Function: "logp1_upward": +double: 1 +float128: 2 +ldouble: 3 + Function: "pow": double: 1 float128: 2 @@ -1580,25 +1674,21 @@ ldouble: 4 Function: "tgamma": double: 9 -float: 8 float128: 4 ldouble: 5 Function: "tgamma_downward": double: 9 -float: 7 float128: 5 ldouble: 6 Function: "tgamma_towardzero": double: 9 -float: 7 float128: 5 ldouble: 6 Function: "tgamma_upward": double: 9 -float: 8 float128: 4 ldouble: 5 diff --git a/sysdeps/i386/fpu/s_expm1f.S b/sysdeps/i386/fpu/s_expm1f.S deleted file mode 100644 index a1cb5bf0ab..0000000000 --- a/sysdeps/i386/fpu/s_expm1f.S +++ /dev/null @@ -1,112 +0,0 @@ -/* ix87 specific implementation of exp(x)-1. - Copyright (C) 1996-2024 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - - /* Using: e^x - 1 = 2^(x * log2(e)) - 1 */ - -#include <sysdep.h> -#include <machine/asm.h> -#include <i386-math-asm.h> -#include <libm-alias-float.h> - - .section .rodata - - .align ALIGNARG(4) - .type minus1,@object -minus1: .double -1.0 - ASM_SIZE_DIRECTIVE(minus1) - .type one,@object -one: .double 1.0 - ASM_SIZE_DIRECTIVE(one) - .type l2e,@object -l2e: .quad 0xb8aa3b295c17f0bc /* 1.442695040888963407359924681002 */ - .short 0x3fff - ASM_SIZE_DIRECTIVE(l2e) - -DEFINE_FLT_MIN - -#ifdef PIC -#define MO(op) op##@GOTOFF(%edx) -#else -#define MO(op) op -#endif - - .text -ENTRY(__expm1f) - movzwl 4+2(%esp), %eax - xorb $0x80, %ah // invert sign bit (now 1 is "positive") - cmpl $0xc2b1, %eax // is num >= 88.5? - jae HIDDEN_JUMPTARGET (__expf) - - flds 4(%esp) // x - fxam // Is NaN, +-Inf or +-0? - xorb $0x80, %ah - cmpl $0xc190, %eax // is num <= -18.0? - fstsw %ax - movb $0x45, %ch - jb 4f - - // Below -18.0 (may be -NaN or -Inf). - andb %ah, %ch -#ifdef PIC - LOAD_PIC_REG (dx) -#endif - cmpb $0x01, %ch - je 5f // If -NaN, jump. - jmp 2f // -large, possibly -Inf. - -4: // In range -18.0 to 88.5 (may be +-0 but not NaN or +-Inf). - andb %ah, %ch - cmpb $0x40, %ch - je 3f // If +-0, jump. -#ifdef PIC - LOAD_PIC_REG (dx) -#endif - -5: fldt MO(l2e) // log2(e) : x - fmulp // log2(e)*x - fld %st // log2(e)*x : log2(e)*x - // Set round-to-nearest temporarily. - subl $8, %esp - cfi_adjust_cfa_offset (8) - fstcw 4(%esp) - movl $0xf3ff, %ecx - andl 4(%esp), %ecx - movl %ecx, (%esp) - fldcw (%esp) - frndint // int(log2(e)*x) : log2(e)*x - fldcw 4(%esp) - addl $8, %esp - cfi_adjust_cfa_offset (-8) - fsubr %st, %st(1) // int(log2(e)*x) : fract(log2(e)*x) - fxch // fract(log2(e)*x) : int(log2(e)*x) - f2xm1 // 2^fract(log2(e)*x)-1 : int(log2(e)*x) - fscale // 2^(log2(e)*x)-2^int(log2(e)*x) : int(log2(e)*x) - fxch // int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) - fldl MO(one) // 1 : int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) - fscale // 2^int(log2(e)*x) : int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) - fsubrl MO(one) // 1-2^int(log2(e)*x) : int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) - fstp %st(1) // 1-2^int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) - fsubrp %st, %st(1) // 2^(log2(e)*x) - FLT_CHECK_FORCE_UFLOW - ret - -2: fstp %st - fldl MO(minus1) // Set result to -1.0. -3: ret -END(__expm1f) -libm_alias_float (__expm1, expm1) diff --git a/sysdeps/i386/fpu/s_log1pf.S b/sysdeps/i386/fpu/s_log1pf.S deleted file mode 100644 index 82a3f448db..0000000000 --- a/sysdeps/i386/fpu/s_log1pf.S +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Public domain. - */ - -#include <machine/asm.h> -#include <i386-math-asm.h> - -RCSID("$NetBSD: s_log1pf.S,v 1.4 1995/05/09 00:13:05 jtc Exp $") - - .section .rodata - - .align ALIGNARG(4) - /* The fyl2xp1 can only be used for values in - -1 + sqrt(2) / 2 <= x <= 1 - sqrt(2) / 2 - 0.29 is a safe value. - */ -limit: .float 0.29 -one: .float 1.0 - -DEFINE_FLT_MIN - -#ifdef PIC -# define MO(op) op##@GOTOFF(%edx) -#else -# define MO(op) op -#endif - -/* - * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29, - * otherwise fyl2x with the needed extra computation. - */ - .text -ENTRY(__log1pf) - fldln2 - - flds 4(%esp) - -#ifdef PIC - LOAD_PIC_REG (dx) -#endif - - fxam - fnstsw - fld %st - sahf - jc 3f // in case x is NaN or ħInf -4: fabs - fcomps MO(limit) - fnstsw - sahf - jc 2f - - fadds MO(one) - fyl2x - ret - -2: fyl2xp1 - FLT_CHECK_FORCE_UFLOW_NONNAN - ret - -3: jp 4b // in case x is ħInf - fstp %st(1) - fstp %st(1) - ret - -END (__log1pf) diff --git a/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps b/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps index b892c43e59..a9cd01bf03 100644 --- a/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps +++ b/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps @@ -1156,6 +1156,26 @@ float: 1 float128: 3 ldouble: 2 +Function: "exp10m1": +double: 3 +float128: 3 +ldouble: 4 + +Function: "exp10m1_downward": +double: 3 +float128: 6 +ldouble: 6 + +Function: "exp10m1_towardzero": +double: 2 +float128: 6 +ldouble: 5 + +Function: "exp10m1_upward": +double: 5 +float128: 6 +ldouble: 6 + Function: "exp2": double: 1 float128: 1 @@ -1175,6 +1195,26 @@ float: 1 float128: 2 ldouble: 1 +Function: "exp2m1": +double: 2 +float128: 2 +ldouble: 3 + +Function: "exp2m1_downward": +double: 3 +float128: 3 +ldouble: 6 + +Function: "exp2m1_towardzero": +double: 3 +float128: 4 +ldouble: 6 + +Function: "exp2m1_upward": +double: 3 +float128: 5 +ldouble: 6 + Function: "exp_downward": double: 1 float: 1 @@ -1197,19 +1237,16 @@ ldouble: 3 Function: "expm1_downward": double: 1 -float: 1 float128: 2 ldouble: 4 Function: "expm1_towardzero": double: 1 -float: 1 float128: 4 ldouble: 4 Function: "expm1_upward": double: 1 -float: 1 float128: 3 ldouble: 4 @@ -1378,6 +1415,26 @@ float: 1 float128: 1 ldouble: 1 +Function: "log10p1": +double: 1 +float128: 3 +ldouble: 4 + +Function: "log10p1_downward": +double: 2 +float128: 4 +ldouble: 8 + +Function: "log10p1_towardzero": +double: 2 +float128: 3 +ldouble: 8 + +Function: "log10p1_upward": +double: 2 +float128: 4 +ldouble: 6 + Function: "log1p": double: 1 float128: 3 @@ -1385,19 +1442,16 @@ ldouble: 2 Function: "log1p_downward": double: 1 -float: 1 float128: 3 ldouble: 4 Function: "log1p_towardzero": double: 1 -float: 1 float128: 3 ldouble: 4 Function: "log1p_upward": double: 1 -float: 1 float128: 2 ldouble: 3 @@ -1426,26 +1480,22 @@ ldouble: 1 Function: "log2p1": double: 1 -float: 1 float128: 3 -ldouble: 2 +ldouble: 4 Function: "log2p1_downward": double: 2 -float: 2 float128: 3 ldouble: 4 Function: "log2p1_towardzero": double: 2 -float: 2 float128: 2 ldouble: 4 Function: "log2p1_upward": double: 1 -float: 2 -float128: 2 +float128: 3 ldouble: 5 Function: "log_downward": @@ -1463,6 +1513,26 @@ double: 1 float128: 1 ldouble: 1 +Function: "logp1": +double: 1 +float128: 3 +ldouble: 2 + +Function: "logp1_downward": +double: 1 +float128: 3 +ldouble: 4 + +Function: "logp1_towardzero": +double: 1 +float128: 3 +ldouble: 4 + +Function: "logp1_upward": +double: 1 +float128: 2 +ldouble: 3 + Function: "pow": double: 1 float128: 2 @@ -1606,25 +1676,21 @@ ldouble: 4 Function: "tgamma": double: 9 -float: 8 float128: 4 ldouble: 5 Function: "tgamma_downward": double: 9 -float: 7 float128: 5 ldouble: 6 Function: "tgamma_towardzero": double: 9 -float: 7 float128: 5 ldouble: 6 Function: "tgamma_upward": double: 8 -float: 8 float128: 4 ldouble: 5 diff --git a/sysdeps/i386/i686/multiarch/s_fma-fma.c b/sysdeps/i386/i686/multiarch/s_fma-fma.c index 9d17f67a10..6c3fbc0290 100644 --- a/sysdeps/i386/i686/multiarch/s_fma-fma.c +++ b/sysdeps/i386/i686/multiarch/s_fma-fma.c @@ -9,7 +9,7 @@ The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public diff --git a/sysdeps/i386/i686/multiarch/s_fma.c b/sysdeps/i386/i686/multiarch/s_fma.c index 978345bda5..3ae111aac5 100644 --- a/sysdeps/i386/i686/multiarch/s_fma.c +++ b/sysdeps/i386/i686/multiarch/s_fma.c @@ -9,7 +9,7 @@ The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public diff --git a/sysdeps/i386/i686/multiarch/s_fmaf-fma.c b/sysdeps/i386/i686/multiarch/s_fmaf-fma.c index f049a60f57..aff92fa5b6 100644 --- a/sysdeps/i386/i686/multiarch/s_fmaf-fma.c +++ b/sysdeps/i386/i686/multiarch/s_fmaf-fma.c @@ -9,7 +9,7 @@ The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public diff --git a/sysdeps/i386/i686/multiarch/s_fmaf.c b/sysdeps/i386/i686/multiarch/s_fmaf.c index e92ebb19a7..c9be68257f 100644 --- a/sysdeps/i386/i686/multiarch/s_fmaf.c +++ b/sysdeps/i386/i686/multiarch/s_fmaf.c @@ -9,7 +9,7 @@ The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public |