summaryrefslogtreecommitdiff
path: root/sysdeps/i386/fpu
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/fpu')
-rw-r--r--sysdeps/i386/fpu/e_acosh.S2
-rw-r--r--sysdeps/i386/fpu/e_acoshf.S2
-rw-r--r--sysdeps/i386/fpu/e_acoshl.S2
-rw-r--r--sysdeps/i386/fpu/e_atanh.S2
-rw-r--r--sysdeps/i386/fpu/e_atanhf.S2
-rw-r--r--sysdeps/i386/fpu/e_atanhl.S3
-rw-r--r--sysdeps/i386/fpu/e_exp2f.S52
-rw-r--r--sysdeps/i386/fpu/e_expf.S74
-rw-r--r--sysdeps/i386/fpu/e_expl.S10
-rw-r--r--sysdeps/i386/fpu/e_hypot.S2
-rw-r--r--sysdeps/i386/fpu/e_hypotf.S2
-rw-r--r--sysdeps/i386/fpu/e_log10l.S1
-rw-r--r--sysdeps/i386/fpu/e_log2f.S69
-rw-r--r--sysdeps/i386/fpu/e_log2l.S1
-rw-r--r--sysdeps/i386/fpu/e_logf.S93
-rw-r--r--sysdeps/i386/fpu/e_logl.S1
-rw-r--r--sysdeps/i386/fpu/e_pow.S2
-rw-r--r--sysdeps/i386/fpu/e_powf.S392
-rw-r--r--sysdeps/i386/fpu/e_powl.S41
-rw-r--r--sysdeps/i386/fpu/e_scalbl.S16
-rw-r--r--sysdeps/i386/fpu/fclrexcpt.c4
-rw-r--r--sysdeps/i386/fpu/fedisblxcpt.c4
-rw-r--r--sysdeps/i386/fpu/feenablxcpt.c4
-rw-r--r--sysdeps/i386/fpu/fegetenv.c4
-rw-r--r--sysdeps/i386/fpu/fegetexcept.c2
-rw-r--r--sysdeps/i386/fpu/fegetmode.c (renamed from sysdeps/i386/fpu/s_fdimf.S)51
-rw-r--r--sysdeps/i386/fpu/fegetround.c2
-rw-r--r--sysdeps/i386/fpu/feholdexcpt.c4
-rw-r--r--sysdeps/i386/fpu/fenv_private.h64
-rw-r--r--sysdeps/i386/fpu/fesetenv.c4
-rw-r--r--sysdeps/i386/fpu/fesetexcept.c (renamed from sysdeps/i386/fpu/s_fdim.S)44
-rw-r--r--sysdeps/i386/fpu/fesetmode.c54
-rw-r--r--sysdeps/i386/fpu/fesetround.c4
-rw-r--r--sysdeps/i386/fpu/feupdateenv.c4
-rw-r--r--sysdeps/i386/fpu/fgetexcptflg.c4
-rw-r--r--sysdeps/i386/fpu/fraiseexcpt.c2
-rw-r--r--sysdeps/i386/fpu/fsetexcptflg.c4
-rw-r--r--sysdeps/i386/fpu/ftestexcept.c4
-rw-r--r--sysdeps/i386/fpu/halfulp.c1
-rw-r--r--sysdeps/i386/fpu/i386-math-asm.h2
-rw-r--r--sysdeps/i386/fpu/k_rem_pio2l.c3
-rw-r--r--sysdeps/i386/fpu/libm-test-ulps1396
-rw-r--r--sysdeps/i386/fpu/libm-test-ulps-name1
-rw-r--r--sysdeps/i386/fpu/math-tests.h2
-rw-r--r--sysdeps/i386/fpu/mpexp.c1
-rw-r--r--sysdeps/i386/fpu/mplog.c1
-rw-r--r--sysdeps/i386/fpu/s_asinh.S5
-rw-r--r--sysdeps/i386/fpu/s_asinhf.S5
-rw-r--r--sysdeps/i386/fpu/s_asinhl.S6
-rw-r--r--sysdeps/i386/fpu/s_atan.S3
-rw-r--r--sysdeps/i386/fpu/s_atanf.S3
-rw-r--r--sysdeps/i386/fpu/s_atanl.c3
-rw-r--r--sysdeps/i386/fpu/s_cbrt.S5
-rw-r--r--sysdeps/i386/fpu/s_cbrtf.S5
-rw-r--r--sysdeps/i386/fpu/s_cbrtl.S6
-rw-r--r--sysdeps/i386/fpu/s_ceil.S15
-rw-r--r--sysdeps/i386/fpu/s_ceilf.S15
-rw-r--r--sysdeps/i386/fpu/s_ceill.S20
-rw-r--r--sysdeps/i386/fpu/s_copysign.S3
-rw-r--r--sysdeps/i386/fpu/s_copysignf.S3
-rw-r--r--sysdeps/i386/fpu/s_copysignl.S3
-rw-r--r--sysdeps/i386/fpu/s_expm1.S5
-rw-r--r--sysdeps/i386/fpu/s_expm1f.S5
-rw-r--r--sysdeps/i386/fpu/s_f32xaddf64.c42
-rw-r--r--sysdeps/i386/fpu/s_f32xdivf64.c (renamed from sysdeps/i386/fpu/s_fdiml.S)48
-rw-r--r--sysdeps/i386/fpu/s_f32xmulf64.c29
-rw-r--r--sysdeps/i386/fpu/s_f32xsubf64.c42
-rw-r--r--sysdeps/i386/fpu/s_fabs.S3
-rw-r--r--sysdeps/i386/fpu/s_fabsf.S3
-rw-r--r--sysdeps/i386/fpu/s_fabsl.S3
-rw-r--r--sysdeps/i386/fpu/s_fdim.c48
-rw-r--r--sysdeps/i386/fpu/s_floor.S15
-rw-r--r--sysdeps/i386/fpu/s_floorf.S15
-rw-r--r--sysdeps/i386/fpu/s_floorl.S20
-rw-r--r--sysdeps/i386/fpu/s_fmax.S5
-rw-r--r--sysdeps/i386/fpu/s_fmaxf.S5
-rw-r--r--sysdeps/i386/fpu/s_fmaxl.S35
-rw-r--r--sysdeps/i386/fpu/s_fmin.S5
-rw-r--r--sysdeps/i386/fpu/s_fminf.S5
-rw-r--r--sysdeps/i386/fpu/s_fminl.S45
-rw-r--r--sysdeps/i386/fpu/s_fpclassifyl.c4
-rw-r--r--sysdeps/i386/fpu/s_frexp.S5
-rw-r--r--sysdeps/i386/fpu/s_frexpf.S5
-rw-r--r--sysdeps/i386/fpu/s_frexpl.S14
-rw-r--r--sysdeps/i386/fpu/s_isnanl.c4
-rw-r--r--sysdeps/i386/fpu/s_llrint.S5
-rw-r--r--sysdeps/i386/fpu/s_llrintf.S5
-rw-r--r--sysdeps/i386/fpu/s_llrintl.S5
-rw-r--r--sysdeps/i386/fpu/s_log1pl.S1
-rw-r--r--sysdeps/i386/fpu/s_logb.S3
-rw-r--r--sysdeps/i386/fpu/s_logbf.S3
-rw-r--r--sysdeps/i386/fpu/s_logbl.c3
-rw-r--r--sysdeps/i386/fpu/s_lrint.S5
-rw-r--r--sysdeps/i386/fpu/s_lrintf.S5
-rw-r--r--sysdeps/i386/fpu/s_lrintl.S5
-rw-r--r--sysdeps/i386/fpu/s_nearbyint.S7
-rw-r--r--sysdeps/i386/fpu/s_nearbyintf.S7
-rw-r--r--sysdeps/i386/fpu/s_nearbyintl.S7
-rw-r--r--sysdeps/i386/fpu/s_nextafterl.c10
-rw-r--r--sysdeps/i386/fpu/s_nexttoward.c3
-rw-r--r--sysdeps/i386/fpu/s_nexttowardf.c3
-rw-r--r--sysdeps/i386/fpu/s_remquo.S3
-rw-r--r--sysdeps/i386/fpu/s_remquof.S3
-rw-r--r--sysdeps/i386/fpu/s_remquol.S3
-rw-r--r--sysdeps/i386/fpu/s_rint.S3
-rw-r--r--sysdeps/i386/fpu/s_rintf.S3
-rw-r--r--sysdeps/i386/fpu/s_rintl.c3
-rw-r--r--sysdeps/i386/fpu/s_trunc.S17
-rw-r--r--sysdeps/i386/fpu/s_truncf.S17
-rw-r--r--sysdeps/i386/fpu/s_truncl.S20
-rw-r--r--sysdeps/i386/fpu/slowexp.c1
-rw-r--r--sysdeps/i386/fpu/slowpow.c1
-rw-r--r--sysdeps/i386/fpu/w_sqrt.c4
-rw-r--r--sysdeps/i386/fpu/w_sqrt_compat.c9
114 files changed, 1653 insertions, 1460 deletions
diff --git a/sysdeps/i386/fpu/e_acosh.S b/sysdeps/i386/fpu/e_acosh.S
index f560d255f3..8d37247a2b 100644
--- a/sysdeps/i386/fpu/e_acosh.S
+++ b/sysdeps/i386/fpu/e_acosh.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/sysdeps/i386/fpu/e_acoshf.S b/sysdeps/i386/fpu/e_acoshf.S
index ff6f25371b..964c08603d 100644
--- a/sysdeps/i386/fpu/e_acoshf.S
+++ b/sysdeps/i386/fpu/e_acoshf.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/sysdeps/i386/fpu/e_acoshl.S b/sysdeps/i386/fpu/e_acoshl.S
index 6a353119b5..8c6921eb84 100644
--- a/sysdeps/i386/fpu/e_acoshl.S
+++ b/sysdeps/i386/fpu/e_acoshl.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/sysdeps/i386/fpu/e_atanh.S b/sysdeps/i386/fpu/e_atanh.S
index 2242040499..8cb7bc7c66 100644
--- a/sysdeps/i386/fpu/e_atanh.S
+++ b/sysdeps/i386/fpu/e_atanh.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arctanh function.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/sysdeps/i386/fpu/e_atanhf.S b/sysdeps/i386/fpu/e_atanhf.S
index e338e65981..cf27dbe565 100644
--- a/sysdeps/i386/fpu/e_atanhf.S
+++ b/sysdeps/i386/fpu/e_atanhf.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arctanh function.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/sysdeps/i386/fpu/e_atanhl.S b/sysdeps/i386/fpu/e_atanhl.S
index dc5ca51a4b..bd1f096470 100644
--- a/sysdeps/i386/fpu/e_atanhl.S
+++ b/sysdeps/i386/fpu/e_atanhl.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arctanh function.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -121,6 +121,7 @@ ENTRY(__ieee754_atanhl)
cmpl $0, 4(%esp)
je 7b
6: fldt 4(%esp)
+ fadd %st(0)
ret
END(__ieee754_atanhl)
strong_alias (__ieee754_atanhl, __atanhl_finite)
diff --git a/sysdeps/i386/fpu/e_exp2f.S b/sysdeps/i386/fpu/e_exp2f.S
deleted file mode 100644
index 30623cd850..0000000000
--- a/sysdeps/i386/fpu/e_exp2f.S
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Adapted for exp2 by Ulrich Drepper <drepper@cygnus.com>.
- * Public domain.
- */
-
-#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
-ENTRY(__ieee754_exp2f)
-#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.
- For the i686 the code can be written better.
- -- drepper@cygnus.com. */
- fxam /* Is NaN or +-Inf? */
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 1f /* Is +-Inf, jump. */
- fld %st
- frndint /* int(x) */
- fsubr %st,%st(1) /* fract(x) */
- fxch
- f2xm1 /* 2^(fract(x)) - 1 */
- fld1
- faddp /* 2^(fract(x)) */
- fscale /* e^x */
- fstp %st(1)
- FLT_NARROW_EVAL_UFLOW_NONNEG_NAN
- ret
-
-1: testl $0x200, %eax /* Test sign. */
- jz 2f /* If positive, jump. */
- fstp %st
- fldz /* Set result to 0. */
-2: ret
-END (__ieee754_exp2f)
-strong_alias (__ieee754_exp2f, __exp2f_finite)
diff --git a/sysdeps/i386/fpu/e_expf.S b/sysdeps/i386/fpu/e_expf.S
deleted file mode 100644
index 65cb4ec204..0000000000
--- a/sysdeps/i386/fpu/e_expf.S
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- * Adapted for float type by Ulrich Drepper <drepper@cygnus.com>.
- */
-
-#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.
- For the i686 the code can be written better.
- -- drepper@cygnus.com. */
- fxam /* Is NaN or +-Inf? */
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 1f /* Is +-Inf, jump. */
- fldl2e
- fmulp /* x * log2(e) */
- fld %st
- frndint /* int(x * log2(e)) */
- fsubr %st,%st(1) /* fract(x * log2(e)) */
- fxch
- f2xm1 /* 2^(fract(x * log2(e))) - 1 */
- fld1
- 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. */
- jz 2f /* If positive, jump. */
- fstp %st
- fldz /* Set result to 0. */
-2: ret
-END (__ieee754_expf)
-
-
-ENTRY(__expf_finite)
-#ifdef PIC
- LOAD_PIC_REG (cx)
-#endif
- fldl2e
- fmuls 4(%esp) /* x * log2(e) */
- fld %st
- frndint /* int(x * log2(e)) */
- fsubr %st,%st(1) /* fract(x * log2(e)) */
- fxch
- f2xm1 /* 2^(fract(x * log2(e))) - 1 */
- fld1
- faddp /* 2^(fract(x * log2(e))) */
- fscale /* e^x */
- fstp %st(1)
- FLT_NARROW_EVAL_UFLOW_NONNEG
- ret
-END(__expf_finite)
diff --git a/sysdeps/i386/fpu/e_expl.S b/sysdeps/i386/fpu/e_expl.S
index 64e0d96839..18a627e9da 100644
--- a/sysdeps/i386/fpu/e_expl.S
+++ b/sysdeps/i386/fpu/e_expl.S
@@ -22,6 +22,7 @@
* -- moshier@na-net.ornl.gov
*/
+#include <libm-alias-ldouble.h>
#include <machine/asm.h>
#include <i386-math-asm.h>
@@ -102,7 +103,7 @@ ENTRY(IEEE754_EXPL)
/* Below -64.0 (may be -NaN or -Inf). */
andb %ah, %dh
cmpb $0x01, %dh
- je 2f /* Is +-NaN, jump. */
+ je 6f /* Is +-NaN, jump. */
jmp 1f /* -large, possibly -Inf. */
4: /* In range -64.0 to 64.0 (may be +-0 but not NaN or +-Inf). */
@@ -144,7 +145,7 @@ ENTRY(IEEE754_EXPL)
cmpb $0x05, %dh
je 1f /* Is +-Inf, jump. */
cmpb $0x01, %dh
- je 2f /* Is +-NaN, jump. */
+ je 6f /* Is +-NaN, jump. */
/* Overflow or underflow; saturate. */
fstp %st
fldt MO(csat)
@@ -214,10 +215,13 @@ ENTRY(IEEE754_EXPL)
fldz /* Set result to 0. */
#endif
2: ret
+6: /* NaN argument. */
+ fadd %st
+ ret
END(IEEE754_EXPL)
#ifdef USE_AS_EXPM1L
libm_hidden_def (__expm1l)
-weak_alias (__expm1l, expm1l)
+libm_alias_ldouble (__expm1, expm1)
#else
strong_alias (IEEE754_EXPL, EXPL_FINITE)
#endif
diff --git a/sysdeps/i386/fpu/e_hypot.S b/sysdeps/i386/fpu/e_hypot.S
index 0ca788407f..5b7deb356a 100644
--- a/sysdeps/i386/fpu/e_hypot.S
+++ b/sysdeps/i386/fpu/e_hypot.S
@@ -1,5 +1,5 @@
/* Compute the hypothenuse of X and Y.
- Copyright (C) 1998-2016 Free Software Foundation, Inc.
+ Copyright (C) 1998-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
diff --git a/sysdeps/i386/fpu/e_hypotf.S b/sysdeps/i386/fpu/e_hypotf.S
index 58b883bea8..8e394c9c7f 100644
--- a/sysdeps/i386/fpu/e_hypotf.S
+++ b/sysdeps/i386/fpu/e_hypotf.S
@@ -1,5 +1,5 @@
/* Compute the hypothenuse of X and Y.
- Copyright (C) 1998-2016 Free Software Foundation, Inc.
+ Copyright (C) 1998-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
diff --git a/sysdeps/i386/fpu/e_log10l.S b/sysdeps/i386/fpu/e_log10l.S
index 45b9c6d21d..9326b19796 100644
--- a/sysdeps/i386/fpu/e_log10l.S
+++ b/sysdeps/i386/fpu/e_log10l.S
@@ -65,6 +65,7 @@ ENTRY(__ieee754_log10l)
3: jp 4b // in case x is ħInf
fstp %st(1)
fstp %st(1)
+ fadd %st(0)
ret
END(__ieee754_log10l)
strong_alias (__ieee754_log10l, __log10l_finite)
diff --git a/sysdeps/i386/fpu/e_log2f.S b/sysdeps/i386/fpu/e_log2f.S
deleted file mode 100644
index 344eeb495e..0000000000
--- a/sysdeps/i386/fpu/e_log2f.S
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Adapted for use as log2 by Ulrich Drepper <drepper@cygnus.com>.
- * Public domain.
- *
- * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
- */
-
-#include <machine/asm.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_log2f)
-#ifdef PIC
- LOAD_PIC_REG (dx)
-#endif
- fldl MO(one)
- flds 4(%esp) // x : 1
- fxam
- fnstsw
- fld %st // x : x : 1
- sahf
- jc 3f // in case x is NaN or ħInf
-4: fsub %st(2), %st // x-1 : x : 1
- fld %st // x-1 : x-1 : x : 1
- fabs // |x-1| : x-1 : x : 1
- fcompl MO(limit) // x-1 : x : 1
- fnstsw // x-1 : x : 1
- andb $0x45, %ah
- jz 2f
- fxam
- fnstsw
- andb $0x45, %ah
- cmpb $0x40, %ah
- jne 5f
- fabs // log2(1) is +0 in all rounding modes.
-5: fstp %st(1) // x-1 : 1
- fyl2xp1 // log(x)
- ret
-
-2: fstp %st(0) // x : 1
- fyl2x // log(x)
- ret
-
-3: jp 4b // in case x is ħInf
- fstp %st(1)
- fstp %st(1)
- ret
-END (__ieee754_log2f)
-strong_alias (__ieee754_log2f, __log2f_finite)
diff --git a/sysdeps/i386/fpu/e_log2l.S b/sysdeps/i386/fpu/e_log2l.S
index 0f5f7e5789..73e62ea908 100644
--- a/sysdeps/i386/fpu/e_log2l.S
+++ b/sysdeps/i386/fpu/e_log2l.S
@@ -64,6 +64,7 @@ ENTRY(__ieee754_log2l)
3: jp 4b // in case x is ħInf
fstp %st(1)
fstp %st(1)
+ fadd %st(0)
ret
END (__ieee754_log2l)
strong_alias (__ieee754_log2l, __log2l_finite)
diff --git a/sysdeps/i386/fpu/e_logf.S b/sysdeps/i386/fpu/e_logf.S
deleted file mode 100644
index de967a31f5..0000000000
--- a/sysdeps/i386/fpu/e_logf.S
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- * Adapted for float by Ulrich Drepper <drepper@cygnus.com>.
- *
- * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
- */
-
-#include <machine/asm.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_logf)
- fldln2 // log(2)
- flds 4(%esp) // x : log(2)
- fxam
- fnstsw
-#ifdef PIC
- LOAD_PIC_REG (dx)
-#endif
- fld %st // x : x : log(2)
- sahf
- jc 3f // in case x is NaN or +-Inf
-4: fsubl MO(one) // x-1 : x : log(2)
- fld %st // x-1 : x-1 : x : log(2)
- fabs // |x-1| : x-1 : x : log(2)
- fcompl MO(limit) // x-1 : x : log(2)
- fnstsw // x-1 : x : log(2)
- andb $0x45, %ah
- jz 2f
- fxam
- fnstsw
- andb $0x45, %ah
- cmpb $0x40, %ah
- jne 5f
- fabs // log(1) is +0 in all rounding modes.
-5: fstp %st(1) // x-1 : log(2)
- fyl2xp1 // log(x)
- ret
-
-2: fstp %st(0) // x : log(2)
- fyl2x // log(x)
- ret
-
-3: jp 4b // in case x is +-Inf
- fstp %st(1)
- fstp %st(1)
- ret
-END (__ieee754_logf)
-
-ENTRY(__logf_finite)
- fldln2 // log(2)
- flds 4(%esp) // x : log(2)
-#ifdef PIC
- LOAD_PIC_REG (dx)
-#endif
- fld %st // x : x : log(2)
- fsubl MO(one) // x-1 : x : log(2)
- fld %st // x-1 : x-1 : x : log(2)
- fabs // |x-1| : x-1 : x : log(2)
- fcompl MO(limit) // x-1 : x : log(2)
- fnstsw // x-1 : x : log(2)
- andb $0x45, %ah
- jz 2b
- fxam
- fnstsw
- andb $0x45, %ah
- cmpb $0x40, %ah
- jne 6f
- fabs // log(1) is +0 in all rounding modes.
-6: fstp %st(1) // x-1 : log(2)
- fyl2xp1 // log(x)
- ret
-END(__logf_finite)
diff --git a/sysdeps/i386/fpu/e_logl.S b/sysdeps/i386/fpu/e_logl.S
index 7a6d370e8f..53127d704e 100644
--- a/sysdeps/i386/fpu/e_logl.S
+++ b/sysdeps/i386/fpu/e_logl.S
@@ -67,6 +67,7 @@ ENTRY(__ieee754_logl)
3: jp 4b // in case x is +-Inf
fstp %st(1)
fstp %st(1)
+ fadd %st(0)
ret
END (__ieee754_logl)
diff --git a/sysdeps/i386/fpu/e_pow.S b/sysdeps/i386/fpu/e_pow.S
index 5773394b0e..b11bc9596e 100644
--- a/sysdeps/i386/fpu/e_pow.S
+++ b/sysdeps/i386/fpu/e_pow.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of pow function.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/sysdeps/i386/fpu/e_powf.S b/sysdeps/i386/fpu/e_powf.S
deleted file mode 100644
index ee96c704dc..0000000000
--- a/sysdeps/i386/fpu/e_powf.S
+++ /dev/null
@@ -1,392 +0,0 @@
-/* ix87 specific implementation of pow function.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
- 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
- <http://www.gnu.org/licenses/>. */
-
-#include <machine/asm.h>
-#include <i386-math-asm.h>
-
- .section .rodata.cst8,"aM",@progbits,8
-
- .p2align 3
- .type one,@object
-one: .double 1.0
- ASM_SIZE_DIRECTIVE(one)
- .type limit,@object
-limit: .double 0.29
- ASM_SIZE_DIRECTIVE(limit)
- .type p31,@object
-p31: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x41
- ASM_SIZE_DIRECTIVE(p31)
-
- .section .rodata.cst16,"aM",@progbits,16
-
- .p2align 3
- .type infinity,@object
-inf_zero:
-infinity:
- .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
- ASM_SIZE_DIRECTIVE(infinity)
- .type zero,@object
-zero: .double 0.0
- ASM_SIZE_DIRECTIVE(zero)
- .type minf_mzero,@object
-minf_mzero:
-minfinity:
- .byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff
-mzero:
- .byte 0, 0, 0, 0, 0, 0, 0, 0x80
- ASM_SIZE_DIRECTIVE(minf_mzero)
-DEFINE_FLT_MIN
-
-#ifdef PIC
-# define MO(op) op##@GOTOFF(%ecx)
-# define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
-#else
-# define MO(op) op
-# define MOX(op,x,f) op(,x,f)
-#endif
-
- .text
-ENTRY(__ieee754_powf)
- flds 8(%esp) // y
- fxam
-
-#ifdef PIC
- LOAD_PIC_REG (cx)
-#endif
-
- fnstsw
- movb %ah, %dl
- andb $0x45, %ah
- cmpb $0x40, %ah // is y == 0 ?
- je 11f
-
- cmpb $0x05, %ah // is y == ħinf ?
- je 12f
-
- cmpb $0x01, %ah // is y == NaN ?
- je 30f
-
- flds 4(%esp) // x : y
-
- subl $4, %esp
- cfi_adjust_cfa_offset (4)
-
- fxam
- fnstsw
- movb %ah, %dh
- andb $0x45, %ah
- cmpb $0x40, %ah
- je 20f // x is ħ0
-
- cmpb $0x05, %ah
- je 15f // x is ħinf
-
- cmpb $0x01, %ah
- je 33f // x is NaN
-
- fxch // y : x
-
- /* fistpl raises invalid exception for |y| >= 1L<<31. */
- fld %st // y : y : x
- fabs // |y| : y : x
- fcompl MO(p31) // y : x
- fnstsw
- sahf
- jnc 2f
-
- /* First see whether `y' is a natural number. In this case we
- can use a more precise algorithm. */
- fld %st // y : y : x
- fistpl (%esp) // y : x
- fildl (%esp) // int(y) : y : x
- fucomp %st(1) // y : x
- fnstsw
- sahf
- jne 3f
-
- /* OK, we have an integer value for y. */
- popl %edx
- cfi_adjust_cfa_offset (-4)
- orl $0, %edx
- fstp %st(0) // x
- jns 4f // y >= 0, jump
- fdivrl MO(one) // 1/x (now referred to as x)
- negl %edx
-4: fldl MO(one) // 1 : x
- fxch
-
- /* If y is even, take the absolute value of x. Otherwise,
- ensure all intermediate values that might overflow have the
- sign of x. */
- testb $1, %dl
- jnz 6f
- fabs
-
-6: shrl $1, %edx
- jnc 5f
- fxch
- fabs
- fmul %st(1) // x : ST*x
- fxch
-5: fld %st // x : x : ST*x
- fabs // |x| : x : ST*x
- fmulp // |x|*x : ST*x
- testl %edx, %edx
- jnz 6b
- fstp %st(0) // ST*x
- FLT_NARROW_EVAL_UFLOW_NONNAN
- ret
-
- /* y is ħNAN */
-30: flds 4(%esp) // x : y
- fldl MO(one) // 1.0 : x : y
- fucomp %st(1) // x : y
- fnstsw
- sahf
- je 31f
- fxch // y : x
-31: fstp %st(1)
- ret
-
- cfi_adjust_cfa_offset (4)
- .align ALIGNARG(4)
-2: /* y is a large integer (so even). */
- fxch // x : y
- fabs // |x| : y
- fxch // y : x
- .align ALIGNARG(4)
-3: /* y is a real number. */
- fxch // x : y
- fldl MO(one) // 1.0 : x : y
- fldl MO(limit) // 0.29 : 1.0 : x : y
- fld %st(2) // x : 0.29 : 1.0 : x : y
- fsub %st(2) // x-1 : 0.29 : 1.0 : x : y
- fabs // |x-1| : 0.29 : 1.0 : x : y
- fucompp // 1.0 : x : y
- fnstsw
- fxch // x : 1.0 : y
- sahf
- ja 7f
- fsub %st(1) // x-1 : 1.0 : y
- fyl2xp1 // log2(x) : y
- jmp 8f
-
-7: fyl2x // log2(x) : y
-8: fmul %st(1) // y*log2(x) : y
- fst %st(1) // y*log2(x) : y*log2(x)
- frndint // int(y*log2(x)) : y*log2(x)
- fsubr %st, %st(1) // int(y*log2(x)) : fract(y*log2(x))
- fxch // fract(y*log2(x)) : int(y*log2(x))
- f2xm1 // 2^fract(y*log2(x))-1 : int(y*log2(x))
- faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x))
- fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x))
-32: addl $4, %esp
- cfi_adjust_cfa_offset (-4)
- fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x))
- FLT_NARROW_EVAL_UFLOW_NONNAN
- ret
-
- /* x is NaN. */
- cfi_adjust_cfa_offset (4)
-33: addl $4, %esp
- cfi_adjust_cfa_offset (-4)
- fstp %st(1)
- ret
-
- // pow(x,ħ0) = 1
- .align ALIGNARG(4)
-11: fstp %st(0) // pop y
- fldl MO(one)
- ret
-
- // y == ħinf
- .align ALIGNARG(4)
-12: fstp %st(0) // pop y
- fldl MO(one) // 1
- flds 4(%esp) // x : 1
- fabs // abs(x) : 1
- fucompp // < 1, == 1, or > 1
- fnstsw
- andb $0x45, %ah
- cmpb $0x45, %ah
- je 13f // jump if x is NaN
-
- cmpb $0x40, %ah
- je 14f // jump if |x| == 1
-
- shlb $1, %ah
- xorb %ah, %dl
- andl $2, %edx
- fldl MOX(inf_zero, %edx, 4)
- ret
-
- .align ALIGNARG(4)
-14: fldl MO(one)
- ret
-
- .align ALIGNARG(4)
-13: flds 4(%esp) // load x == NaN
- ret
-
- cfi_adjust_cfa_offset (4)
- .align ALIGNARG(4)
- // x is ħinf
-15: fstp %st(0) // y
- testb $2, %dh
- jz 16f // jump if x == +inf
-
- // fistpl raises invalid exception for |y| >= 1L<<31, so test
- // that (in which case y is certainly even) before testing
- // whether y is odd.
- fld %st // y : y
- fabs // |y| : y
- fcompl MO(p31) // y
- fnstsw
- sahf
- jnc 16f
-
- // We must find out whether y is an odd integer.
- fld %st // y : y
- fistpl (%esp) // y
- fildl (%esp) // int(y) : y
- fucompp // <empty>
- fnstsw
- sahf
- jne 17f
-
- // OK, the value is an integer.
- popl %edx
- cfi_adjust_cfa_offset (-4)
- testb $1, %dl
- jz 18f // jump if not odd
- // It's an odd integer.
- shrl $31, %edx
- fldl MOX(minf_mzero, %edx, 8)
- ret
-
- cfi_adjust_cfa_offset (4)
- .align ALIGNARG(4)
-16: fcompl MO(zero)
- addl $4, %esp
- cfi_adjust_cfa_offset (-4)
- fnstsw
- shrl $5, %eax
- andl $8, %eax
- fldl MOX(inf_zero, %eax, 1)
- ret
-
- cfi_adjust_cfa_offset (4)
- .align ALIGNARG(4)
-17: shll $30, %edx // sign bit for y in right position
- addl $4, %esp
- cfi_adjust_cfa_offset (-4)
-18: shrl $31, %edx
- fldl MOX(inf_zero, %edx, 8)
- ret
-
- cfi_adjust_cfa_offset (4)
- .align ALIGNARG(4)
- // x is ħ0
-20: fstp %st(0) // y
- testb $2, %dl
- jz 21f // y > 0
-
- // x is ħ0 and y is < 0. We must find out whether y is an odd integer.
- testb $2, %dh
- jz 25f
-
- // fistpl raises invalid exception for |y| >= 1L<<31, so test
- // that (in which case y is certainly even) before testing
- // whether y is odd.
- fld %st // y : y
- fabs // |y| : y
- fcompl MO(p31) // y
- fnstsw
- sahf
- jnc 25f
-
- fld %st // y : y
- fistpl (%esp) // y
- fildl (%esp) // int(y) : y
- fucompp // <empty>
- fnstsw
- sahf
- jne 26f
-
- // OK, the value is an integer.
- popl %edx
- cfi_adjust_cfa_offset (-4)
- testb $1, %dl
- jz 27f // jump if not odd
- // It's an odd integer.
- // Raise divide-by-zero exception and get minus infinity value.
- fldl MO(one)
- fdivl MO(zero)
- fchs
- ret
-
- cfi_adjust_cfa_offset (4)
-25: fstp %st(0)
-26: addl $4, %esp
- cfi_adjust_cfa_offset (-4)
-27: // Raise divide-by-zero exception and get infinity value.
- fldl MO(one)
- fdivl MO(zero)
- ret
-
- cfi_adjust_cfa_offset (4)
- .align ALIGNARG(4)
- // x is ħ0 and y is > 0. We must find out whether y is an odd integer.
-21: testb $2, %dh
- jz 22f
-
- // fistpl raises invalid exception for |y| >= 1L<<31, so test
- // that (in which case y is certainly even) before testing
- // whether y is odd.
- fcoml MO(p31) // y
- fnstsw
- sahf
- jnc 22f
-
- fld %st // y : y
- fistpl (%esp) // y
- fildl (%esp) // int(y) : y
- fucompp // <empty>
- fnstsw
- sahf
- jne 23f
-
- // OK, the value is an integer.
- popl %edx
- cfi_adjust_cfa_offset (-4)
- testb $1, %dl
- jz 24f // jump if not odd
- // It's an odd integer.
- fldl MO(mzero)
- ret
-
- cfi_adjust_cfa_offset (4)
-22: fstp %st(0)
-23: addl $4, %esp // Don't use pop.
- cfi_adjust_cfa_offset (-4)
-24: fldl MO(zero)
- ret
-
-END(__ieee754_powf)
-strong_alias (__ieee754_powf, __powf_finite)
diff --git a/sysdeps/i386/fpu/e_powl.S b/sysdeps/i386/fpu/e_powl.S
index 77d2abfaea..51a0c334f0 100644
--- a/sysdeps/i386/fpu/e_powl.S
+++ b/sysdeps/i386/fpu/e_powl.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of pow function.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -26,9 +26,9 @@
.type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- .type p3,@object
-p3: .byte 0, 0, 0, 0, 0, 0, 0x20, 0x40
- ASM_SIZE_DIRECTIVE(p3)
+ .type p2,@object
+p2: .byte 0, 0, 0, 0, 0, 0, 0x10, 0x40
+ ASM_SIZE_DIRECTIVE(p2)
.type p63,@object
p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
ASM_SIZE_DIRECTIVE(p63)
@@ -146,11 +146,11 @@ ENTRY(__ieee754_powl)
jmp 3f
9: /* OK, we have an integer value for y. Unless very small
- (we use < 8), use the algorithm for real exponent to avoid
+ (we use < 4), use the algorithm for real exponent to avoid
accumulation of errors. */
fld %st // y : y : x
fabs // |y| : y : x
- fcompl MO(p3) // y : x
+ fcompl MO(p2) // y : x
fnstsw
sahf
jnc 3f
@@ -201,15 +201,21 @@ ENTRY(__ieee754_powl)
fucomp %st(1) // x : y
fnstsw
sahf
- je 31f
- fxch // y : x
-31: fstp %st(1)
+ je 33f
+31: /* At least one argument NaN, and result should be NaN. */
+ faddp
+ ret
+33: jp 31b
+ /* pow (1, NaN); check if the NaN signaling. */
+ testb $0x40, 23(%esp)
+ jz 31b
+ fstp %st(1)
ret
cfi_adjust_cfa_offset (8)
32: addl $8, %esp
cfi_adjust_cfa_offset (-8)
- fstp %st(1)
+ faddp
ret
cfi_adjust_cfa_offset (8)
@@ -241,12 +247,24 @@ ENTRY(__ieee754_powl)
cfi_adjust_cfa_offset (-36)
ret
- // pow(x,ħ0) = 1
+ // pow(x,ħ0) = 1, unless x is sNaN
.align ALIGNARG(4)
11: fstp %st(0) // pop y
+ fldt 4(%esp) // x
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x01, %ah
+ je 112f // x is NaN
+111: fstp %st(0)
fldl MO(one)
ret
+112: testb $0x40, 11(%esp)
+ jnz 111b
+ fadd %st(0)
+ ret
+
// y == ħinf
.align ALIGNARG(4)
12: fstp %st(0) // pop y
@@ -274,6 +292,7 @@ ENTRY(__ieee754_powl)
.align ALIGNARG(4)
13: fldt 4(%esp) // load x == NaN
+ fadd %st(0)
ret
cfi_adjust_cfa_offset (8)
diff --git a/sysdeps/i386/fpu/e_scalbl.S b/sysdeps/i386/fpu/e_scalbl.S
index d10b22ea83..896f599cb0 100644
--- a/sysdeps/i386/fpu/e_scalbl.S
+++ b/sysdeps/i386/fpu/e_scalbl.S
@@ -45,7 +45,7 @@ ENTRY(__ieee754_scalbl)
fnstsw
andl $0x4500, %eax
cmpl $0x0100, %eax
- je 3f
+ je 2f
fld %st(1)
frndint
fcomp %st(2)
@@ -76,18 +76,8 @@ ENTRY(__ieee754_scalbl)
fldl MOX(zero_nan, %eax, 1)
ret
- /* The result is NaN, but we must not raise an exception.
- So use a variable. */
-2: fstp %st
- fstp %st
-#ifdef PIC
- LOAD_PIC_REG (cx)
-#endif
- fldl MO(nan)
- ret
-
- /* The first parameter is a NaN. Return it. */
-3: fstp %st(1)
+ /* The result is NaN; raise an exception for sNaN arguments. */
+2: faddp
ret
/* Return NaN and raise the invalid exception. */
diff --git a/sysdeps/i386/fpu/fclrexcpt.c b/sysdeps/i386/fpu/fclrexcpt.c
index 68a8f863d6..8463b102e7 100644
--- a/sysdeps/i386/fpu/fclrexcpt.c
+++ b/sysdeps/i386/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -41,7 +41,7 @@ __feclearexcept (int excepts)
__asm__ ("fldenv %0" : : "m" (*&temp));
/* If the CPU supports SSE, we clear the MXCSR as well. */
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ if (HAS_CPU_FEATURE (SSE))
{
unsigned int xnew_exc;
diff --git a/sysdeps/i386/fpu/fedisblxcpt.c b/sysdeps/i386/fpu/fedisblxcpt.c
index 07fd4cfacb..e2738e6d6c 100644
--- a/sysdeps/i386/fpu/fedisblxcpt.c
+++ b/sysdeps/i386/fpu/fedisblxcpt.c
@@ -1,5 +1,5 @@
/* Disable floating-point exceptions.
- Copyright (C) 1999-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1999.
@@ -38,7 +38,7 @@ fedisableexcept (int excepts)
__asm__ ("fldcw %0" : : "m" (*&new_exc));
/* If the CPU supports SSE we set the MXCSR as well. */
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ if (HAS_CPU_FEATURE (SSE))
{
unsigned int xnew_exc;
diff --git a/sysdeps/i386/fpu/feenablxcpt.c b/sysdeps/i386/fpu/feenablxcpt.c
index 0d0377d21a..a4d9862666 100644
--- a/sysdeps/i386/fpu/feenablxcpt.c
+++ b/sysdeps/i386/fpu/feenablxcpt.c
@@ -1,5 +1,5 @@
/* Enable floating-point exceptions.
- Copyright (C) 1999-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1999.
@@ -38,7 +38,7 @@ feenableexcept (int excepts)
__asm__ ("fldcw %0" : : "m" (*&new_exc));
/* If the CPU supports SSE we set the MXCSR as well. */
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ if (HAS_CPU_FEATURE (SSE))
{
unsigned int xnew_exc;
diff --git a/sysdeps/i386/fpu/fegetenv.c b/sysdeps/i386/fpu/fegetenv.c
index b4b384fe19..2a1a8507ba 100644
--- a/sysdeps/i386/fpu/fegetenv.c
+++ b/sysdeps/i386/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -31,7 +31,7 @@ __fegetenv (fenv_t *envp)
would block all exceptions. */
__asm__ ("fldenv %0" : : "m" (*envp));
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ if (HAS_CPU_FEATURE (SSE))
__asm__ ("stmxcsr %0" : "=m" (envp->__eip));
/* Success. */
diff --git a/sysdeps/i386/fpu/fegetexcept.c b/sysdeps/i386/fpu/fegetexcept.c
index 9d3d090a30..bb43a20bc0 100644
--- a/sysdeps/i386/fpu/fegetexcept.c
+++ b/sysdeps/i386/fpu/fegetexcept.c
@@ -1,5 +1,5 @@
/* Get enabled floating-point exceptions.
- Copyright (C) 1999-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1999.
diff --git a/sysdeps/i386/fpu/s_fdimf.S b/sysdeps/i386/fpu/fegetmode.c
index d2bd29a233..86de9f5548 100644
--- a/sysdeps/i386/fpu/s_fdimf.S
+++ b/sysdeps/i386/fpu/fegetmode.c
@@ -1,7 +1,6 @@
-/* Compute positive difference.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Store current floating-point control modes. i386 version.
+ Copyright (C) 2016-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,35 +16,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-
- .text
-ENTRY(__fdimf)
- flds 4(%esp) // x
- flds 8(%esp) // x : y
-
- fucom %st(1)
- fnstsw
- sahf
- jp 1f
-
- jc 3f
-
- fstp %st(1)
- fldz
- jmp 2f
-
-3: fsubrp %st, %st(1)
- ret
-
-1: fxam
- fnstsw
- andb $0x45, %ah
- cmpb $0x01, %ah
- je 2f
-
- fxch
-2: fstp %st(1)
- ret
-END(__fdimf)
-weak_alias (__fdimf, fdimf)
+#include <fenv.h>
+#include <fpu_control.h>
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+
+int
+fegetmode (femode_t *modep)
+{
+ _FPU_GETCW (modep->__control_word);
+ if (HAS_CPU_FEATURE (SSE))
+ __asm__ ("stmxcsr %0" : "=m" (modep->__mxcsr));
+ return 0;
+}
diff --git a/sysdeps/i386/fpu/fegetround.c b/sysdeps/i386/fpu/fegetround.c
index 8c83d8e017..291ad80f5a 100644
--- a/sysdeps/i386/fpu/fegetround.c
+++ b/sysdeps/i386/fpu/fegetround.c
@@ -1,5 +1,5 @@
/* Return current rounding direction.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
diff --git a/sysdeps/i386/fpu/feholdexcpt.c b/sysdeps/i386/fpu/feholdexcpt.c
index a345db3513..270554df31 100644
--- a/sysdeps/i386/fpu/feholdexcpt.c
+++ b/sysdeps/i386/fpu/feholdexcpt.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -30,7 +30,7 @@ __feholdexcept (fenv_t *envp)
__asm__ volatile ("fnstenv %0; fnclex" : "=m" (*envp));
/* If the CPU supports SSE we set the MXCSR as well. */
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ if (HAS_CPU_FEATURE (SSE))
{
unsigned int xwork;
diff --git a/sysdeps/i386/fpu/fenv_private.h b/sysdeps/i386/fpu/fenv_private.h
index e20e1f1662..637dae5f05 100644
--- a/sysdeps/i386/fpu/fenv_private.h
+++ b/sysdeps/i386/fpu/fenv_private.h
@@ -1,39 +1,10 @@
#ifndef FENV_PRIVATE_H
#define FENV_PRIVATE_H 1
+#include <bits/floatn.h>
#include <fenv.h>
#include <fpu_control.h>
-#ifdef __SSE2_MATH__
-# define math_opt_barrier(x) \
- ({ __typeof(x) __x; \
- if (sizeof (x) <= sizeof (double)) \
- __asm ("" : "=x" (__x) : "0" (x)); \
- else \
- __asm ("" : "=t" (__x) : "0" (x)); \
- __x; })
-# define math_force_eval(x) \
- do { \
- if (sizeof (x) <= sizeof (double)) \
- __asm __volatile ("" : : "x" (x)); \
- else \
- __asm __volatile ("" : : "f" (x)); \
- } while (0)
-#else
-# define math_opt_barrier(x) \
- ({ __typeof (x) __x; \
- __asm ("" : "=t" (__x) : "0" (x)); \
- __x; })
-# define math_force_eval(x) \
- do { \
- __typeof (x) __x = (x); \
- if (sizeof (x) <= sizeof (double)) \
- __asm __volatile ("" : : "m" (__x)); \
- else \
- __asm __volatile ("" : : "f" (__x)); \
- } while (0)
-#endif
-
/* This file is used by both the 32- and 64-bit ports. The 64-bit port
has a field in the fenv_t for the mxcsr; the 32-bit port does not.
Instead, we (ab)use the only 32-bit field extant in the struct. */
@@ -322,6 +293,21 @@ libc_feresetround_387 (fenv_t *e)
# define libc_feholdsetround_53bit libc_feholdsetround_387_53bit
#endif
+#ifdef __x86_64__
+/* The SSE rounding mode is used by soft-fp (libgcc and glibc) on
+ x86_64, so that must be set for float128 computations. */
+# define SET_RESTORE_ROUNDF128(RM) \
+ SET_RESTORE_ROUND_GENERIC (RM, libc_feholdsetround_sse, libc_feresetround_sse)
+# define libc_feholdexcept_setroundf128 libc_feholdexcept_setround_sse
+# define libc_feupdateenv_testf128 libc_feupdateenv_test_sse
+#else
+/* The 387 rounding mode is used by soft-fp for 32-bit, but whether
+ 387 or SSE exceptions are used depends on whether libgcc was built
+ for SSE math, which is not known when glibc is being built. */
+# define libc_feholdexcept_setroundf128 default_libc_feholdexcept_setround
+# define libc_feupdateenv_testf128 default_libc_feupdateenv_test
+#endif
+
/* We have support for rounding mode context. */
#define HAVE_RM_CTX 1
@@ -474,11 +460,19 @@ libc_feupdateenv_387_ctx (struct rm_ctx *ctx)
#endif /* __SSE_MATH__ */
#ifdef __SSE2_MATH__
-# define libc_feholdexcept_setround_ctx libc_feholdexcept_setround_sse_ctx
-# define libc_fesetenv_ctx libc_fesetenv_sse_ctx
-# define libc_feupdateenv_ctx libc_feupdateenv_sse_ctx
-# define libc_feholdsetround_ctx libc_feholdsetround_sse_ctx
-# define libc_feresetround_ctx libc_feresetround_sse_ctx
+# if defined (__x86_64__) || !defined (MATH_SET_BOTH_ROUNDING_MODES)
+# define libc_feholdexcept_setround_ctx libc_feholdexcept_setround_sse_ctx
+# define libc_fesetenv_ctx libc_fesetenv_sse_ctx
+# define libc_feupdateenv_ctx libc_feupdateenv_sse_ctx
+# define libc_feholdsetround_ctx libc_feholdsetround_sse_ctx
+# define libc_feresetround_ctx libc_feresetround_sse_ctx
+# else
+# define libc_feholdexcept_setround_ctx default_libc_feholdexcept_setround_ctx
+# define libc_fesetenv_ctx default_libc_fesetenv_ctx
+# define libc_feupdateenv_ctx default_libc_feupdateenv_ctx
+# define libc_feholdsetround_ctx default_libc_feholdsetround_ctx
+# define libc_feresetround_ctx default_libc_feresetround_ctx
+# endif
#else
# define libc_feholdexcept_setround_ctx libc_feholdexcept_setround_387_ctx
# define libc_feupdateenv_ctx libc_feupdateenv_387_ctx
diff --git a/sysdeps/i386/fpu/fesetenv.c b/sysdeps/i386/fpu/fesetenv.c
index 0d8f435f0b..6df6849da4 100644
--- a/sysdeps/i386/fpu/fesetenv.c
+++ b/sysdeps/i386/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -79,7 +79,7 @@ __fesetenv (const fenv_t *envp)
__asm__ ("fldenv %0" : : "m" (temp));
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ if (HAS_CPU_FEATURE (SSE))
{
unsigned int mxcsr;
__asm__ ("stmxcsr %0" : "=m" (mxcsr));
diff --git a/sysdeps/i386/fpu/s_fdim.S b/sysdeps/i386/fpu/fesetexcept.c
index d62069b039..180b93f60b 100644
--- a/sysdeps/i386/fpu/s_fdim.S
+++ b/sysdeps/i386/fpu/fesetexcept.c
@@ -1,7 +1,6 @@
-/* Compute positive difference.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Set given exception flags. i386 version.
+ Copyright (C) 2016-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,35 +16,16 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
+#include <fenv.h>
- .text
-ENTRY(__fdim)
- fldl 4(%esp) // x
- fldl 12(%esp) // x : y
+int
+fesetexcept (int excepts)
+{
+ fenv_t temp;
- fucom %st(1)
- fnstsw
- sahf
- jp 1f
+ __asm__ ("fnstenv %0" : "=m" (*&temp));
+ temp.__status_word |= excepts & FE_ALL_EXCEPT;
+ __asm__ ("fldenv %0" : : "m" (*&temp));
- jc 3f
-
- fstp %st(1)
- fldz
- jmp 2f
-
-3: fsubrp %st, %st(1)
- ret
-
-1: fxam
- fnstsw
- andb $0x45, %ah
- cmpb $0x01, %ah
- je 2f
-
- fxch
-2: fstp %st(1)
- ret
-END(__fdim)
-weak_alias (__fdim, fdim)
+ return 0;
+}
diff --git a/sysdeps/i386/fpu/fesetmode.c b/sysdeps/i386/fpu/fesetmode.c
new file mode 100644
index 0000000000..9aad6ea99f
--- /dev/null
+++ b/sysdeps/i386/fpu/fesetmode.c
@@ -0,0 +1,54 @@
+/* Install given floating-point control modes. i386 version.
+ Copyright (C) 2016-2018 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
+ <http://www.gnu.org/licenses/>. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+
+/* All exceptions, including the x86-specific "denormal operand"
+ exception. */
+#define FE_ALL_EXCEPT_X86 (FE_ALL_EXCEPT | __FE_DENORM)
+
+int
+fesetmode (const femode_t *modep)
+{
+ fpu_control_t cw;
+ if (modep == FE_DFL_MODE)
+ cw = _FPU_DEFAULT;
+ else
+ cw = modep->__control_word;
+ _FPU_SETCW (cw);
+ if (HAS_CPU_FEATURE (SSE))
+ {
+ unsigned int mxcsr;
+ __asm__ ("stmxcsr %0" : "=m" (mxcsr));
+ /* Preserve SSE exception flags but restore other state in
+ MXCSR. */
+ mxcsr &= FE_ALL_EXCEPT_X86;
+ if (modep == FE_DFL_MODE)
+ /* Default MXCSR state has all bits zero except for those
+ masking exceptions. */
+ mxcsr |= FE_ALL_EXCEPT_X86 << 7;
+ else
+ mxcsr |= modep->__mxcsr & ~FE_ALL_EXCEPT_X86;
+ __asm__ ("ldmxcsr %0" : : "m" (mxcsr));
+ }
+ return 0;
+}
diff --git a/sysdeps/i386/fpu/fesetround.c b/sysdeps/i386/fpu/fesetround.c
index 1c1b2fcf26..d260046c65 100644
--- a/sysdeps/i386/fpu/fesetround.c
+++ b/sysdeps/i386/fpu/fesetround.c
@@ -1,5 +1,5 @@
/* Set current rounding direction.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -37,7 +37,7 @@ __fesetround (int round)
__asm__ ("fldcw %0" : : "m" (*&cw));
/* If the CPU supports SSE we set the MXCSR as well. */
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ if (HAS_CPU_FEATURE (SSE))
{
unsigned int xcw;
diff --git a/sysdeps/i386/fpu/feupdateenv.c b/sysdeps/i386/fpu/feupdateenv.c
index 9d225cf8bb..db3ff96dfa 100644
--- a/sysdeps/i386/fpu/feupdateenv.c
+++ b/sysdeps/i386/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -32,7 +32,7 @@ __feupdateenv (const fenv_t *envp)
__asm__ ("fnstsw %0" : "=m" (*&temp));
/* If the CPU supports SSE we test the MXCSR as well. */
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ if (HAS_CPU_FEATURE (SSE))
__asm__ ("stmxcsr %0" : "=m" (*&xtemp));
temp = (temp | xtemp) & FE_ALL_EXCEPT;
diff --git a/sysdeps/i386/fpu/fgetexcptflg.c b/sysdeps/i386/fpu/fgetexcptflg.c
index 1cb1ebb3fb..39d1f7df3a 100644
--- a/sysdeps/i386/fpu/fgetexcptflg.c
+++ b/sysdeps/i386/fpu/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -34,7 +34,7 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
*flagp = temp & excepts & FE_ALL_EXCEPT;
/* If the CPU supports SSE, we clear the MXCSR as well. */
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ if (HAS_CPU_FEATURE (SSE))
{
unsigned int sse_exc;
diff --git a/sysdeps/i386/fpu/fraiseexcpt.c b/sysdeps/i386/fpu/fraiseexcpt.c
index ad980cca32..6c781df218 100644
--- a/sysdeps/i386/fpu/fraiseexcpt.c
+++ b/sysdeps/i386/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
diff --git a/sysdeps/i386/fpu/fsetexcptflg.c b/sysdeps/i386/fpu/fsetexcptflg.c
index cea473e293..21e70251cf 100644
--- a/sysdeps/i386/fpu/fsetexcptflg.c
+++ b/sysdeps/i386/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -41,7 +41,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
__asm__ ("fldenv %0" : : "m" (*&temp));
/* If the CPU supports SSE, we set the MXCSR as well. */
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ if (HAS_CPU_FEATURE (SSE))
{
unsigned int xnew_exc;
diff --git a/sysdeps/i386/fpu/ftestexcept.c b/sysdeps/i386/fpu/ftestexcept.c
index 0f7408fad0..c1b5e90356 100644
--- a/sysdeps/i386/fpu/ftestexcept.c
+++ b/sysdeps/i386/fpu/ftestexcept.c
@@ -1,5 +1,5 @@
/* Test exception in current environment.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -32,7 +32,7 @@ fetestexcept (int excepts)
__asm__ ("fnstsw %0" : "=a" (temp));
/* If the CPU supports SSE we test the MXCSR as well. */
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ if (HAS_CPU_FEATURE (SSE))
__asm__ ("stmxcsr %0" : "=m" (*&xtemp));
return (temp | xtemp) & excepts & FE_ALL_EXCEPT;
diff --git a/sysdeps/i386/fpu/halfulp.c b/sysdeps/i386/fpu/halfulp.c
deleted file mode 100644
index 1cc8931700..0000000000
--- a/sysdeps/i386/fpu/halfulp.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Not needed. */
diff --git a/sysdeps/i386/fpu/i386-math-asm.h b/sysdeps/i386/fpu/i386-math-asm.h
index 20307d3a4a..87025b522e 100644
--- a/sysdeps/i386/fpu/i386-math-asm.h
+++ b/sysdeps/i386/fpu/i386-math-asm.h
@@ -1,5 +1,5 @@
/* Helper macros for x86 libm functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 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
diff --git a/sysdeps/i386/fpu/k_rem_pio2l.c b/sysdeps/i386/fpu/k_rem_pio2l.c
deleted file mode 100644
index 1347b0468c..0000000000
--- a/sysdeps/i386/fpu/k_rem_pio2l.c
+++ /dev/null
@@ -1,3 +0,0 @@
-/* Empty. This file is only meant to avoid compiling the file with the
- same name in the libm-ieee754 directory. The code is not used since
- there is an assembler version for all users of this file. */
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index 84da4753eb..e83bae71b4 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -3,2187 +3,2767 @@
# Maximal error of functions:
Function: "acos":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "acos_downward":
+float128: 1
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "acos_towardzero":
+float128: 1
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "acos_upward":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "acosh":
double: 1
+float128: 2
idouble: 1
+ifloat128: 2
ildouble: 4
ldouble: 2
Function: "acosh_downward":
double: 1
+float128: 3
idouble: 1
+ifloat128: 3
ildouble: 6
ldouble: 4
Function: "acosh_towardzero":
double: 1
+float128: 2
idouble: 1
+ifloat128: 2
ildouble: 6
ldouble: 4
Function: "acosh_upward":
double: 1
+float128: 2
idouble: 1
+ifloat128: 2
ildouble: 4
ldouble: 3
Function: "asin":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "asin_downward":
double: 1
+float128: 2
idouble: 1
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: "asin_towardzero":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "asin_upward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "asinh":
double: 1
+float128: 3
idouble: 1
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: "asinh_downward":
double: 1
float: 1
+float128: 4
idouble: 1
+ifloat: 1
+ifloat128: 4
ildouble: 5
ldouble: 5
Function: "asinh_towardzero":
double: 1
float: 1
+float128: 2
idouble: 1
+ifloat: 1
+ifloat128: 2
ildouble: 4
ldouble: 4
Function: "asinh_upward":
double: 1
float: 1
+float128: 4
idouble: 1
ifloat: 1
+ifloat128: 4
ildouble: 5
ldouble: 5
Function: "atan":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "atan2":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "atan2_downward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "atan2_towardzero":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 1
ldouble: 1
Function: "atan2_upward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "atan_downward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "atan_towardzero":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "atan_upward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "atanh":
double: 1
+float128: 3
idouble: 1
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: "atanh_downward":
double: 1
float: 1
+float128: 4
idouble: 1
ifloat: 1
-ildouble: 3
+ifloat128: 4
+ildouble: 4
ldouble: 4
Function: "atanh_towardzero":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 5
ldouble: 3
Function: "atanh_upward":
double: 1
float: 1
+float128: 4
idouble: 1
ifloat: 1
+ifloat128: 4
ildouble: 5
ldouble: 5
Function: "cabs":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "cabs_downward":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "cabs_towardzero":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "cabs_upward":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Real part of "cacos":
double: 1
-float: 1
+float: 2
+float128: 2
idouble: 1
-ifloat: 1
+ifloat: 2
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Imaginary part of "cacos":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 2
+idouble: 2
+ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Real part of "cacos_downward":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Imaginary part of "cacos_downward":
-double: 4
+double: 5
float: 3
-idouble: 4
+float128: 6
+idouble: 5
ifloat: 3
-ildouble: 5
-ldouble: 5
+ifloat128: 6
+ildouble: 6
+ldouble: 6
Function: Real part of "cacos_towardzero":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Imaginary part of "cacos_towardzero":
double: 4
float: 3
+float128: 5
idouble: 4
ifloat: 3
+ifloat128: 5
ildouble: 5
ldouble: 5
Function: Real part of "cacos_upward":
double: 2
float: 2
+float128: 3
idouble: 2
ifloat: 2
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Imaginary part of "cacos_upward":
-double: 4
-float: 4
-idouble: 4
-ifloat: 4
-ildouble: 5
-ldouble: 5
+double: 7
+float: 7
+float128: 7
+idouble: 7
+ifloat: 7
+ifloat128: 7
+ildouble: 7
+ldouble: 7
Function: Real part of "cacosh":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 2
+idouble: 2
+ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Imaginary part of "cacosh":
double: 1
-float: 1
+float: 2
+float128: 2
idouble: 1
-ifloat: 1
+ifloat: 2
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Real part of "cacosh_downward":
double: 4
float: 3
+float128: 5
idouble: 4
ifloat: 3
+ifloat128: 5
ildouble: 5
ldouble: 5
Function: Imaginary part of "cacosh_downward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 2
-ldouble: 2
+double: 2
+float: 2
+float128: 4
+idouble: 2
+ifloat: 2
+ifloat128: 4
+ildouble: 3
+ldouble: 3
Function: Real part of "cacosh_towardzero":
double: 4
float: 3
+float128: 5
idouble: 4
ifloat: 3
+ifloat128: 5
ildouble: 5
ldouble: 5
Function: Imaginary part of "cacosh_towardzero":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Real part of "cacosh_upward":
-double: 4
+double: 5
float: 4
-idouble: 4
+float128: 6
+idouble: 5
ifloat: 4
+ifloat128: 6
ildouble: 5
ldouble: 5
Function: Imaginary part of "cacosh_upward":
-double: 2
+double: 3
float: 2
-idouble: 2
+float128: 4
+idouble: 3
ifloat: 2
-ildouble: 2
-ldouble: 2
+ifloat128: 4
+ildouble: 3
+ldouble: 3
Function: "carg":
double: 1
+float128: 2
idouble: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "carg_downward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "carg_towardzero":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 1
ldouble: 1
Function: "carg_upward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Real part of "casin":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Imaginary part of "casin":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 2
-ldouble: 2
-
-Function: Real part of "casin_downward":
double: 2
float: 2
+float128: 2
idouble: 2
ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
+Function: Real part of "casin_downward":
+double: 3
+float: 2
+float128: 3
+idouble: 3
+ifloat: 2
+ifloat128: 3
+ildouble: 3
+ldouble: 3
+
Function: Imaginary part of "casin_downward":
-double: 4
+double: 5
float: 3
-idouble: 4
+float128: 6
+idouble: 5
ifloat: 3
-ildouble: 5
-ldouble: 5
+ifloat128: 6
+ildouble: 6
+ldouble: 6
Function: Real part of "casin_towardzero":
-double: 1
+double: 3
float: 1
-idouble: 1
+float128: 3
+idouble: 3
ifloat: 1
-ildouble: 2
-ldouble: 2
+ifloat128: 3
+ildouble: 3
+ldouble: 3
Function: Imaginary part of "casin_towardzero":
double: 4
float: 3
+float128: 5
idouble: 4
ifloat: 3
+ifloat128: 5
ildouble: 5
ldouble: 5
Function: Real part of "casin_upward":
double: 2
float: 2
+float128: 3
idouble: 2
ifloat: 2
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Imaginary part of "casin_upward":
-double: 4
-float: 4
-idouble: 4
-ifloat: 4
-ildouble: 5
-ldouble: 5
+double: 7
+float: 7
+float128: 7
+idouble: 7
+ifloat: 7
+ifloat128: 7
+ildouble: 7
+ldouble: 7
Function: Real part of "casinh":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 2
+idouble: 2
+ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Imaginary part of "casinh":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Real part of "casinh_downward":
-double: 4
+double: 5
float: 3
-idouble: 4
+float128: 6
+idouble: 5
ifloat: 3
-ildouble: 5
-ldouble: 5
+ifloat128: 6
+ildouble: 6
+ldouble: 6
Function: Imaginary part of "casinh_downward":
-double: 2
+double: 3
float: 2
-idouble: 2
+float128: 3
+idouble: 3
ifloat: 2
-ildouble: 2
-ldouble: 2
+ifloat128: 3
+ildouble: 3
+ldouble: 3
Function: Real part of "casinh_towardzero":
double: 4
float: 3
+float128: 5
idouble: 4
ifloat: 3
+ifloat128: 5
ildouble: 5
ldouble: 5
Function: Imaginary part of "casinh_towardzero":
-double: 1
+double: 3
float: 1
-idouble: 1
+float128: 3
+idouble: 3
ifloat: 1
-ildouble: 2
-ldouble: 2
+ifloat128: 3
+ildouble: 3
+ldouble: 3
Function: Real part of "casinh_upward":
-double: 4
-float: 4
-idouble: 4
-ifloat: 4
-ildouble: 5
-ldouble: 5
+double: 7
+float: 7
+float128: 7
+idouble: 7
+ifloat: 7
+ifloat128: 7
+ildouble: 7
+ldouble: 7
Function: Imaginary part of "casinh_upward":
double: 2
float: 2
+float128: 3
idouble: 2
ifloat: 2
+ifloat128: 3
ildouble: 2
ldouble: 2
+Function: Real part of "catan":
+double: 1
+float128: 1
+idouble: 1
+ifloat128: 1
+ildouble: 1
+ldouble: 1
+
Function: Imaginary part of "catan":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Real part of "catan_downward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Imaginary part of "catan_downward":
double: 2
float: 1
+float128: 2
idouble: 2
ifloat: 1
+ifloat128: 2
ildouble: 4
ldouble: 4
Function: Real part of "catan_towardzero":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Imaginary part of "catan_towardzero":
double: 2
float: 1
+float128: 2
idouble: 2
ifloat: 1
+ifloat128: 2
ildouble: 4
ldouble: 4
Function: Real part of "catan_upward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Imaginary part of "catan_upward":
double: 2
float: 2
+float128: 3
idouble: 2
ifloat: 2
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: Real part of "catanh":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "catanh":
+double: 1
+float128: 1
+idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Real part of "catanh_downward":
double: 2
float: 1
+float128: 2
idouble: 2
ifloat: 1
+ifloat128: 2
ildouble: 4
ldouble: 4
Function: Imaginary part of "catanh_downward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Real part of "catanh_towardzero":
double: 2
float: 1
+float128: 2
idouble: 2
ifloat: 1
+ifloat128: 2
ildouble: 4
ldouble: 4
Function: Imaginary part of "catanh_towardzero":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Real part of "catanh_upward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 4
+float: 4
+float128: 4
+idouble: 4
+ifloat: 4
+ifloat128: 4
ildouble: 4
ldouble: 4
Function: Imaginary part of "catanh_upward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "cbrt":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 3
ldouble: 3
Function: "cbrt_downward":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 4
ldouble: 4
Function: "cbrt_towardzero":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 3
ldouble: 3
Function: "cbrt_upward":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 4
ldouble: 4
Function: Real part of "ccos":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Imaginary part of "ccos":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Real part of "ccos_downward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Imaginary part of "ccos_downward":
double: 3
float: 3
+float128: 2
idouble: 3
ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Real part of "ccos_towardzero":
double: 1
-float: 1
+float: 2
+float128: 2
idouble: 1
-ifloat: 1
+ifloat: 2
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Imaginary part of "ccos_towardzero":
double: 3
float: 3
+float128: 2
idouble: 3
ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Real part of "ccos_upward":
double: 2
float: 2
+float128: 3
idouble: 2
ifloat: 2
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Imaginary part of "ccos_upward":
double: 2
float: 2
+float128: 2
idouble: 2
ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Real part of "ccosh":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Imaginary part of "ccosh":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Real part of "ccosh_downward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 2
+idouble: 2
+ifloat: 2
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Imaginary part of "ccosh_downward":
double: 3
float: 3
+float128: 2
idouble: 3
ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Real part of "ccosh_towardzero":
-double: 1
-float: 2
-idouble: 1
-ifloat: 2
+double: 2
+float: 3
+float128: 2
+idouble: 2
+ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Imaginary part of "ccosh_towardzero":
double: 3
float: 3
+float128: 2
idouble: 3
ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Real part of "ccosh_upward":
double: 2
float: 2
+float128: 3
idouble: 2
ifloat: 2
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Imaginary part of "ccosh_upward":
double: 3
float: 2
+float128: 2
idouble: 3
ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Real part of "cexp":
double: 2
float: 1
+float128: 1
idouble: 2
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Imaginary part of "cexp":
double: 1
float: 2
+float128: 1
idouble: 1
ifloat: 2
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Real part of "cexp_downward":
double: 2
float: 2
+float128: 2
idouble: 2
ifloat: 2
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Imaginary part of "cexp_downward":
double: 3
float: 3
+float128: 2
idouble: 3
ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Real part of "cexp_towardzero":
double: 2
float: 2
+float128: 2
idouble: 2
ifloat: 2
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Imaginary part of "cexp_towardzero":
double: 3
float: 3
+float128: 2
idouble: 3
ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Real part of "cexp_upward":
double: 1
float: 2
+float128: 3
idouble: 1
ifloat: 2
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Imaginary part of "cexp_upward":
double: 3
float: 2
+float128: 3
idouble: 3
ifloat: 2
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: Real part of "clog":
double: 2
-float: 1
+float: 3
+float128: 2
idouble: 2
-ifloat: 1
+ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Imaginary part of "clog":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Real part of "clog10":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 3
+float: 4
+float128: 2
+idouble: 3
+ifloat: 4
+ifloat128: 2
ildouble: 4
ldouble: 4
Function: Imaginary part of "clog10":
-double: 1
-idouble: 1
+double: 2
+float: 1
+float128: 2
+idouble: 2
+ifloat: 1
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Real part of "clog10_downward":
-double: 3
-float: 3
-idouble: 3
-ifloat: 3
+double: 4
+float: 4
+float128: 3
+idouble: 4
+ifloat: 4
+ifloat128: 3
ildouble: 8
ldouble: 8
Function: Imaginary part of "clog10_downward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 3
+idouble: 2
+ifloat: 2
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: Real part of "clog10_towardzero":
-double: 3
-float: 3
-idouble: 3
-ifloat: 3
+double: 5
+float: 5
+float128: 4
+idouble: 5
+ifloat: 5
+ifloat128: 4
ildouble: 8
ldouble: 8
Function: Imaginary part of "clog10_towardzero":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 3
+idouble: 2
+ifloat: 2
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: Real part of "clog10_upward":
-double: 3
-float: 3
-idouble: 3
-ifloat: 3
+double: 4
+float: 5
+float128: 4
+idouble: 4
+ifloat: 5
+ifloat128: 4
ildouble: 7
ldouble: 7
Function: Imaginary part of "clog10_upward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 3
+idouble: 2
+ifloat: 2
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: Real part of "clog_downward":
double: 3
float: 3
+float128: 3
idouble: 3
ifloat: 3
+ifloat128: 3
ildouble: 5
ldouble: 5
Function: Imaginary part of "clog_downward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Real part of "clog_towardzero":
double: 3
-float: 3
+float: 4
+float128: 3
idouble: 3
-ifloat: 3
+ifloat: 4
+ifloat128: 3
ildouble: 5
ldouble: 5
Function: Imaginary part of "clog_towardzero":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Real part of "clog_upward":
double: 2
float: 3
+float128: 4
idouble: 2
ifloat: 3
+ifloat128: 4
ildouble: 4
ldouble: 4
Function: Imaginary part of "clog_upward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "cos":
+double: 1
float: 1
+float128: 1
+idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "cos_downward":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: "cos_towardzero":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "cos_upward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: "cosh":
double: 1
float: 1
+float128: 1
idouble: 1
+ifloat: 1
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "cosh_downward":
double: 2
float: 1
-idouble: 1
+float128: 2
+idouble: 2
ifloat: 1
+ifloat128: 1
ildouble: 2
ldouble: 3
Function: "cosh_towardzero":
double: 2
float: 1
-idouble: 1
+float128: 2
+idouble: 2
ifloat: 1
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "cosh_upward":
double: 4
float: 2
-idouble: 1
-ifloat: 1
+float128: 3
+idouble: 4
+ifloat: 2
+ifloat128: 1
ildouble: 2
ldouble: 3
Function: Real part of "cpow":
double: 2
float: 5
+float128: 4
idouble: 2
ifloat: 5
+ifloat128: 4
ildouble: 3
ldouble: 3
Function: Imaginary part of "cpow":
float: 2
+float128: 1
ifloat: 2
+ifloat128: 1
ildouble: 4
ldouble: 4
Function: Real part of "cpow_downward":
double: 5
float: 8
+float128: 6
idouble: 5
ifloat: 8
+ifloat128: 6
ildouble: 7
ldouble: 7
Function: Imaginary part of "cpow_downward":
double: 2
float: 2
+float128: 2
idouble: 2
ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Real part of "cpow_towardzero":
double: 5
float: 8
+float128: 6
idouble: 5
ifloat: 8
+ifloat128: 6
ildouble: 7
ldouble: 7
Function: Imaginary part of "cpow_towardzero":
double: 2
float: 2
+float128: 2
idouble: 2
ifloat: 2
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: Real part of "cpow_upward":
double: 4
float: 1
+float128: 3
idouble: 4
ifloat: 1
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Imaginary part of "cpow_upward":
double: 1
float: 2
+float128: 2
idouble: 1
ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Real part of "csin":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Imaginary part of "csin":
float: 1
+float128: 1
ifloat: 1
+ifloat128: 1
Function: Real part of "csin_downward":
double: 3
float: 3
+float128: 2
idouble: 3
ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Imaginary part of "csin_downward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Real part of "csin_towardzero":
double: 3
float: 3
+float128: 2
idouble: 3
ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Imaginary part of "csin_towardzero":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Real part of "csin_upward":
double: 3
float: 2
+float128: 2
idouble: 3
ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Imaginary part of "csin_upward":
double: 2
float: 2
+float128: 3
idouble: 2
ifloat: 2
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Real part of "csinh":
+float: 1
+float128: 1
+ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Imaginary part of "csinh":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: Real part of "csinh_downward":
-double: 1
+double: 2
float: 1
-idouble: 1
+float128: 2
+idouble: 2
ifloat: 1
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Imaginary part of "csinh_downward":
double: 3
float: 3
+float128: 2
idouble: 3
ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Real part of "csinh_towardzero":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 2
+idouble: 2
+ifloat: 2
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Imaginary part of "csinh_towardzero":
double: 3
float: 3
+float128: 2
idouble: 3
ifloat: 3
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: Real part of "csinh_upward":
double: 2
float: 2
+float128: 3
idouble: 2
ifloat: 2
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Imaginary part of "csinh_upward":
double: 3
float: 2
+float128: 2
idouble: 3
ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Real part of "csqrt":
-double: 1
-idouble: 1
+double: 2
+float: 2
+float128: 2
+idouble: 2
+ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Imaginary part of "csqrt":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 2
+idouble: 2
+ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: Real part of "csqrt_downward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 4
+float: 4
+float128: 4
+idouble: 4
+ifloat: 4
+ifloat128: 4
ildouble: 5
ldouble: 5
Function: Imaginary part of "csqrt_downward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 3
+float: 3
+float128: 3
+idouble: 3
+ifloat: 3
+ifloat128: 3
ildouble: 4
ldouble: 4
Function: Real part of "csqrt_towardzero":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 3
+float: 3
+float128: 3
+idouble: 3
+ifloat: 3
+ifloat128: 3
ildouble: 4
ldouble: 4
Function: Imaginary part of "csqrt_towardzero":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 3
+float: 3
+float128: 3
+idouble: 3
+ifloat: 3
+ifloat128: 3
ildouble: 4
ldouble: 4
Function: Real part of "csqrt_upward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 4
+float: 4
+float128: 4
+idouble: 4
+ifloat: 4
+ifloat128: 4
ildouble: 5
ldouble: 5
Function: Imaginary part of "csqrt_upward":
-double: 1
-float: 2
-idouble: 1
-ifloat: 2
+double: 3
+float: 3
+float128: 3
+idouble: 3
+ifloat: 3
+ifloat128: 3
ildouble: 4
ldouble: 4
Function: Real part of "ctan":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Imaginary part of "ctan":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 3
+idouble: 2
+ifloat: 2
+ifloat128: 3
ildouble: 1
ldouble: 1
Function: Real part of "ctan_downward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 6
+float: 5
+float128: 4
+idouble: 6
+ifloat: 5
+ifloat128: 4
ildouble: 5
ldouble: 5
Function: Imaginary part of "ctan_downward":
double: 2
-float: 1
+float: 2
+float128: 5
idouble: 2
-ifloat: 1
+ifloat: 2
+ifloat128: 5
ildouble: 4
ldouble: 4
Function: Real part of "ctan_towardzero":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
+double: 5
+float: 3
+float128: 4
+idouble: 5
+ifloat: 3
+ifloat128: 4
ildouble: 5
ldouble: 5
Function: Imaginary part of "ctan_towardzero":
double: 2
float: 3
+float128: 5
idouble: 2
ifloat: 3
+ifloat128: 5
ildouble: 4
ldouble: 4
Function: Real part of "ctan_upward":
double: 3
-float: 2
+float: 4
+float128: 5
idouble: 3
-ifloat: 2
+ifloat: 4
+ifloat128: 5
ildouble: 3
ldouble: 3
Function: Imaginary part of "ctan_upward":
double: 2
float: 1
+float128: 5
idouble: 2
ifloat: 1
+ifloat128: 5
ildouble: 3
ldouble: 3
Function: Real part of "ctanh":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 3
+idouble: 2
+ifloat: 2
+ifloat128: 3
ildouble: 1
ldouble: 1
Function: Imaginary part of "ctanh":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 3
+idouble: 2
+ifloat: 2
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: Real part of "ctanh_downward":
double: 2
float: 2
+float128: 5
idouble: 2
ifloat: 2
+ifloat128: 5
ildouble: 4
ldouble: 4
Function: Imaginary part of "ctanh_downward":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
+double: 6
+float: 5
+float128: 4
+idouble: 6
+ifloat: 5
+ifloat128: 4
ildouble: 4
ldouble: 4
Function: Real part of "ctanh_towardzero":
double: 2
float: 3
+float128: 5
idouble: 2
ifloat: 3
+ifloat128: 5
ildouble: 4
ldouble: 4
Function: Imaginary part of "ctanh_towardzero":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 5
+float: 3
+float128: 3
+idouble: 5
+ifloat: 3
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: Real part of "ctanh_upward":
double: 2
-float: 1
+float: 2
+float128: 5
idouble: 2
-ifloat: 1
+ifloat: 2
+ifloat128: 5
ildouble: 3
ldouble: 3
Function: Imaginary part of "ctanh_upward":
double: 3
-float: 2
+float: 3
+float128: 5
idouble: 3
-ifloat: 2
+ifloat: 3
+ifloat128: 5
ildouble: 3
ldouble: 3
Function: "erf":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "erf_downward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "erf_towardzero":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "erf_upward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "erfc":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 3
+float: 2
+float128: 2
+idouble: 3
+ifloat: 2
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: "erfc_downward":
-double: 2
-float: 3
-idouble: 2
-ifloat: 3
+double: 5
+float: 6
+float128: 5
+idouble: 5
+ifloat: 6
+ifloat128: 5
ildouble: 4
ldouble: 4
Function: "erfc_towardzero":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 3
+float: 4
+float128: 4
+idouble: 3
+ifloat: 4
+ifloat128: 4
ildouble: 4
ldouble: 4
Function: "erfc_upward":
-double: 2
-float: 3
-idouble: 2
-ifloat: 3
+double: 5
+float: 6
+float128: 5
+idouble: 5
+ifloat: 6
+ifloat128: 5
ildouble: 5
ldouble: 5
Function: "exp":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "exp10":
double: 1
+float128: 2
idouble: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "exp10_downward":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: "exp10_towardzero":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: "exp10_upward":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 2
ldouble: 2
Function: "exp2":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "exp2_downward":
+float128: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "exp2_towardzero":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "exp2_upward":
+float: 1
+float128: 2
+ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "exp_downward":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Function: "exp_towardzero":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 2
ldouble: 2
Function: "exp_upward":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Function: "expm1":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "expm1_downward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 4
ldouble: 4
Function: "expm1_towardzero":
double: 1
float: 1
+float128: 4
idouble: 1
ifloat: 1
+ifloat128: 4
ildouble: 4
ldouble: 4
Function: "expm1_upward":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 4
ldouble: 4
Function: "gamma":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
ildouble: 4
ldouble: 4
Function: "gamma_downward":
-double: 4
-float: 4
-idouble: 4
-ifloat: 4
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
ildouble: 7
ldouble: 7
Function: "gamma_towardzero":
-double: 4
-float: 2
-idouble: 4
-ifloat: 2
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
ildouble: 7
ldouble: 7
Function: "gamma_upward":
-double: 3
-float: 4
-idouble: 3
-ifloat: 4
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
ildouble: 5
ldouble: 5
Function: "hypot":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "hypot_downward":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "hypot_towardzero":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "hypot_upward":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "j0":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 2
+idouble: 2
+ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: "j0_downward":
-double: 1
-float: 2
-idouble: 1
-ifloat: 2
+double: 2
+float: 4
+float128: 4
+idouble: 2
+ifloat: 4
+ifloat128: 4
ildouble: 4
ldouble: 4
Function: "j0_towardzero":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
+double: 3
+float: 2
+float128: 2
+idouble: 3
+ifloat: 2
+ifloat128: 2
ildouble: 5
ldouble: 5
Function: "j0_upward":
-double: 1
+double: 3
float: 3
-idouble: 1
+float128: 5
+idouble: 3
ifloat: 3
+ifloat128: 5
ildouble: 4
ldouble: 4
Function: "j1":
double: 2
-float: 1
+float: 2
+float128: 4
idouble: 2
-ifloat: 1
+ifloat: 2
+ifloat128: 4
ildouble: 1
ldouble: 1
Function: "j1_downward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 3
+float: 3
+float128: 4
+idouble: 3
+ifloat: 3
+ifloat128: 4
ildouble: 4
ldouble: 4
Function: "j1_towardzero":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
+double: 3
+float: 2
+float128: 4
+idouble: 3
+ifloat: 2
+ifloat128: 4
ildouble: 4
ldouble: 4
Function: "j1_upward":
-double: 2
-float: 3
-idouble: 2
-ifloat: 3
+double: 3
+float: 5
+float128: 3
+idouble: 3
+ifloat: 5
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: "jn":
-double: 2
-float: 3
-idouble: 2
-ifloat: 3
+double: 4
+float: 4
+float128: 7
+idouble: 4
+ifloat: 4
+ifloat128: 7
ildouble: 4
ldouble: 4
Function: "jn_downward":
-double: 2
-float: 3
-idouble: 2
-ifloat: 3
+double: 5
+float: 5
+float128: 8
+idouble: 5
+ifloat: 5
+ifloat128: 8
ildouble: 4
ldouble: 4
Function: "jn_towardzero":
-double: 2
-float: 3
-idouble: 2
-ifloat: 3
+double: 5
+float: 5
+float128: 8
+idouble: 5
+ifloat: 5
+ifloat128: 8
ildouble: 5
ldouble: 5
Function: "jn_upward":
-double: 2
-float: 3
-idouble: 2
-ifloat: 3
+double: 5
+float: 5
+float128: 7
+idouble: 5
+ifloat: 5
+ifloat128: 7
ildouble: 5
ldouble: 5
Function: "lgamma":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
+double: 4
+float: 3
+float128: 5
+idouble: 4
+ifloat: 3
+ifloat128: 5
ildouble: 4
ldouble: 4
Function: "lgamma_downward":
-double: 4
-float: 4
-idouble: 4
-ifloat: 4
+double: 5
+float: 5
+float128: 8
+idouble: 5
+ifloat: 5
+ifloat128: 8
ildouble: 7
ldouble: 7
Function: "lgamma_towardzero":
-double: 4
-float: 2
-idouble: 4
-ifloat: 2
+double: 5
+float: 4
+float128: 5
+idouble: 5
+ifloat: 4
+ifloat128: 5
ildouble: 7
ldouble: 7
Function: "lgamma_upward":
-double: 3
-float: 4
-idouble: 3
-ifloat: 4
+double: 5
+float: 5
+float128: 8
+idouble: 5
+ifloat: 5
+ifloat128: 8
ildouble: 5
ldouble: 5
Function: "log":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "log10":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "log10_downward":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "log10_towardzero":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "log10_upward":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "log1p":
double: 1
+float128: 2
idouble: 1
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: "log1p_downward":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 4
ldouble: 4
Function: "log1p_towardzero":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 4
ldouble: 4
Function: "log1p_upward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: "log2":
double: 1
+float: 1
+float128: 2
idouble: 1
+ifloat: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
Function: "log2_downward":
double: 1
+float128: 3
idouble: 1
+ifloat128: 3
ildouble: 1
ldouble: 1
Function: "log2_towardzero":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "log2_upward":
double: 1
float: 1
+float128: 1
idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "log_downward":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "log_towardzero":
double: 1
+float128: 2
idouble: 1
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: "log_upward":
double: 1
+float128: 1
idouble: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "pow":
double: 1
+float128: 2
idouble: 1
+ifloat128: 2
ildouble: 1
ldouble: 1
-Function: "pow10":
-double: 1
-idouble: 1
-ildouble: 1
-ldouble: 1
-
-Function: "pow10_downward":
+Function: "pow_downward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
+ifloat128: 2
+ildouble: 4
+ldouble: 4
-Function: "pow10_towardzero":
+Function: "pow_towardzero":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
+ifloat128: 2
+ildouble: 4
+ldouble: 4
-Function: "pow10_upward":
+Function: "pow_upward":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
-
-Function: "pow_downward":
-double: 1
-idouble: 1
+ifloat128: 2
ildouble: 4
ldouble: 4
-Function: "pow_towardzero":
-double: 1
-idouble: 1
-ildouble: 1
-ldouble: 1
-
-Function: "pow_upward":
-double: 1
-idouble: 1
-ildouble: 2
-ldouble: 2
-
Function: "sin":
+double: 1
float: 1
+float128: 1
+idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "sin_downward":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: "sin_towardzero":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: "sin_upward":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: "sincos":
+double: 1
float: 1
+float128: 1
+idouble: 1
ifloat: 1
+ifloat128: 1
ildouble: 1
ldouble: 1
Function: "sincos_downward":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: "sincos_towardzero":
double: 1
float: 1
+float128: 2
idouble: 1
ifloat: 1
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: "sincos_upward":
double: 1
float: 1
+float128: 3
idouble: 1
ifloat: 1
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: "sinh":
-double: 1
+double: 2
+float: 2
+float128: 2
+idouble: 2
+ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: "sinh_downward":
-double: 2
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 4
+double: 3
+float: 3
+float128: 3
+idouble: 3
+ifloat: 3
+ifloat128: 3
+ildouble: 5
ldouble: 5
Function: "sinh_towardzero":
double: 2
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 3
+float: 2
+float128: 3
+idouble: 2
+ifloat: 2
+ifloat128: 3
+ildouble: 4
ldouble: 4
Function: "sinh_upward":
double: 4
-float: 2
-idouble: 1
-ifloat: 1
-ildouble: 4
+float: 3
+float128: 4
+idouble: 4
+ifloat: 3
+ifloat128: 4
+ildouble: 5
ldouble: 5
Function: "tan":
float: 1
+float128: 1
ifloat: 1
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "tan_downward":
double: 1
float: 2
+float128: 1
idouble: 1
ifloat: 2
+ifloat128: 1
ildouble: 3
ldouble: 3
Function: "tan_towardzero":
double: 1
float: 2
+float128: 1
idouble: 1
ifloat: 2
+ifloat128: 1
ildouble: 3
ldouble: 3
Function: "tan_upward":
double: 1
float: 2
+float128: 1
idouble: 1
ifloat: 2
+ifloat128: 1
ildouble: 2
ldouble: 2
Function: "tanh":
-double: 1
-idouble: 1
+double: 2
+float: 2
+float128: 2
+idouble: 2
+ifloat: 2
+ifloat128: 2
ildouble: 3
ldouble: 3
Function: "tanh_downward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 3
+float: 3
+float128: 4
+idouble: 3
+ifloat: 3
+ifloat128: 4
ildouble: 7
ldouble: 4
Function: "tanh_towardzero":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+float128: 3
+idouble: 2
+ifloat: 2
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: "tanh_upward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 5
-ldouble: 4
-
-Function: "tgamma":
double: 3
float: 3
+float128: 3
idouble: 3
ifloat: 3
+ifloat128: 3
+ildouble: 5
+ldouble: 4
+
+Function: "tgamma":
+double: 5
+float: 4
+float128: 4
+idouble: 5
+ifloat: 4
+ifloat128: 4
ildouble: 5
ldouble: 5
Function: "tgamma_downward":
-double: 3
-float: 3
-idouble: 3
-ifloat: 3
+double: 6
+float: 5
+float128: 5
+idouble: 6
+ifloat: 5
+ifloat128: 5
ildouble: 5
ldouble: 5
Function: "tgamma_towardzero":
-double: 3
-float: 3
-idouble: 3
-ifloat: 3
+double: 6
+float: 4
+float128: 5
+idouble: 6
+ifloat: 4
+ifloat128: 5
ildouble: 5
ldouble: 5
Function: "tgamma_upward":
-double: 3
-float: 3
-idouble: 3
-ifloat: 3
+double: 5
+float: 4
+float128: 4
+idouble: 5
+ifloat: 4
+ifloat128: 4
ildouble: 5
ldouble: 5
Function: "y0":
-double: 1
+double: 2
float: 1
-idouble: 1
+float128: 3
+idouble: 2
ifloat: 1
+ifloat128: 3
ildouble: 1
ldouble: 1
Function: "y0_downward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 3
+float: 4
+float128: 4
+idouble: 3
+ifloat: 4
+ifloat128: 4
ildouble: 5
ldouble: 5
Function: "y0_towardzero":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 3
+float: 3
+float128: 3
+idouble: 3
+ifloat: 3
+ifloat128: 3
ildouble: 5
ldouble: 5
Function: "y0_upward":
-double: 1
-float: 2
-idouble: 1
-ifloat: 2
+double: 3
+float: 5
+float128: 3
+idouble: 3
+ifloat: 5
+ifloat128: 3
ildouble: 3
ldouble: 3
Function: "y1":
-double: 2
+double: 3
float: 2
-idouble: 2
+float128: 2
+idouble: 3
ifloat: 2
+ifloat128: 2
ildouble: 2
ldouble: 2
Function: "y1_downward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 3
+float: 3
+float128: 4
+idouble: 3
+ifloat: 3
+ifloat128: 4
ildouble: 7
ldouble: 7
Function: "y1_towardzero":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 3
+float: 3
+float128: 2
+idouble: 3
+ifloat: 3
+ifloat128: 2
ildouble: 5
ldouble: 5
Function: "y1_upward":
-double: 1
-float: 2
-idouble: 1
-ifloat: 2
+double: 7
+float: 3
+float128: 5
+idouble: 7
+ifloat: 3
+ifloat128: 5
ildouble: 7
ldouble: 7
Function: "yn":
-double: 2
+double: 3
float: 3
-idouble: 2
+float128: 5
+idouble: 3
ifloat: 3
+ifloat128: 5
ildouble: 4
ldouble: 4
Function: "yn_downward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 3
+float: 4
+float128: 5
+idouble: 3
+ifloat: 4
+ifloat128: 5
ildouble: 5
ldouble: 5
Function: "yn_towardzero":
double: 3
float: 3
+float128: 5
idouble: 3
ifloat: 3
+ifloat128: 5
ildouble: 5
ldouble: 5
Function: "yn_upward":
-double: 3
-float: 3
-idouble: 3
-ifloat: 3
+double: 4
+float: 5
+float128: 5
+idouble: 4
+ifloat: 5
+ifloat128: 5
ildouble: 4
ldouble: 4
diff --git a/sysdeps/i386/fpu/libm-test-ulps-name b/sysdeps/i386/fpu/libm-test-ulps-name
new file mode 100644
index 0000000000..54ca0d8295
--- /dev/null
+++ b/sysdeps/i386/fpu/libm-test-ulps-name
@@ -0,0 +1 @@
+ix86
diff --git a/sysdeps/i386/fpu/math-tests.h b/sysdeps/i386/fpu/math-tests.h
index 80492fe632..6aba8414d4 100644
--- a/sysdeps/i386/fpu/math-tests.h
+++ b/sysdeps/i386/fpu/math-tests.h
@@ -1,5 +1,5 @@
/* Configuration for math tests. 32-bit x86 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 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
diff --git a/sysdeps/i386/fpu/mpexp.c b/sysdeps/i386/fpu/mpexp.c
deleted file mode 100644
index 1cc8931700..0000000000
--- a/sysdeps/i386/fpu/mpexp.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Not needed. */
diff --git a/sysdeps/i386/fpu/mplog.c b/sysdeps/i386/fpu/mplog.c
deleted file mode 100644
index 1cc8931700..0000000000
--- a/sysdeps/i386/fpu/mplog.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Not needed. */
diff --git a/sysdeps/i386/fpu/s_asinh.S b/sysdeps/i386/fpu/s_asinh.S
index 6a6e5b9004..2a03a588ac 100644
--- a/sysdeps/i386/fpu/s_asinh.S
+++ b/sysdeps/i386/fpu/s_asinh.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <machine/asm.h>
+#include <libm-alias-double.h>
.section .rodata
@@ -136,4 +137,4 @@ ENTRY(__asinh)
fchs
4: ret
END(__asinh)
-weak_alias (__asinh, asinh)
+libm_alias_double (__asinh, asinh)
diff --git a/sysdeps/i386/fpu/s_asinhf.S b/sysdeps/i386/fpu/s_asinhf.S
index 31f25192f3..bc082f0e7b 100644
--- a/sysdeps/i386/fpu/s_asinhf.S
+++ b/sysdeps/i386/fpu/s_asinhf.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <machine/asm.h>
+#include <libm-alias-float.h>
.section .rodata
@@ -136,4 +137,4 @@ ENTRY(__asinhf)
fchs
4: ret
END(__asinhf)
-weak_alias (__asinhf, asinhf)
+libm_alias_float (__asinh, asinh)
diff --git a/sysdeps/i386/fpu/s_asinhl.S b/sysdeps/i386/fpu/s_asinhl.S
index c9d5714bee..21cb30a9e6 100644
--- a/sysdeps/i386/fpu/s_asinhl.S
+++ b/sysdeps/i386/fpu/s_asinhl.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <libm-alias-ldouble.h>
#include <machine/asm.h>
.section .rodata
@@ -88,6 +89,7 @@ ENTRY(__asinhl)
4: ret
7: fldt 4(%esp)
+ fadd %st
ret
6: faddl MO(one)
@@ -140,4 +142,4 @@ ENTRY(__asinhl)
fchs
4: ret
END(__asinhl)
-weak_alias (__asinhl, asinhl)
+libm_alias_ldouble (__asinh, asinh)
diff --git a/sysdeps/i386/fpu/s_atan.S b/sysdeps/i386/fpu/s_atan.S
index 644de78feb..0102281be9 100644
--- a/sysdeps/i386/fpu/s_atan.S
+++ b/sysdeps/i386/fpu/s_atan.S
@@ -5,6 +5,7 @@
#include <machine/asm.h>
#include <i386-math-asm.h>
+#include <libm-alias-double.h>
RCSID("$NetBSD: s_atan.S,v 1.4 1995/05/08 23:50:41 jtc Exp $")
@@ -27,4 +28,4 @@ ENTRY(__atan)
DBL_CHECK_FORCE_UFLOW
ret
END (__atan)
-weak_alias (__atan, atan)
+libm_alias_double (__atan, atan)
diff --git a/sysdeps/i386/fpu/s_atanf.S b/sysdeps/i386/fpu/s_atanf.S
index 0589c1135e..15ecd345d9 100644
--- a/sysdeps/i386/fpu/s_atanf.S
+++ b/sysdeps/i386/fpu/s_atanf.S
@@ -5,6 +5,7 @@
#include <machine/asm.h>
#include <i386-math-asm.h>
+#include <libm-alias-float.h>
RCSID("$NetBSD: s_atanf.S,v 1.3 1995/05/08 23:51:33 jtc Exp $")
@@ -27,4 +28,4 @@ ENTRY(__atanf)
FLT_CHECK_FORCE_UFLOW
ret
END (__atanf)
-weak_alias (__atanf, atanf)
+libm_alias_float (__atan, atan)
diff --git a/sysdeps/i386/fpu/s_atanl.c b/sysdeps/i386/fpu/s_atanl.c
index b7dba88aad..2b02ac1e32 100644
--- a/sysdeps/i386/fpu/s_atanl.c
+++ b/sysdeps/i386/fpu/s_atanl.c
@@ -6,6 +6,7 @@
*/
#include <math_private.h>
+#include <libm-alias-ldouble.h>
long double
__atanl (long double x)
@@ -19,4 +20,4 @@ __atanl (long double x)
return res;
}
-weak_alias (__atanl, atanl)
+libm_alias_ldouble (__atan, atan)
diff --git a/sysdeps/i386/fpu/s_cbrt.S b/sysdeps/i386/fpu/s_cbrt.S
index 6e7e99d9e8..abce211322 100644
--- a/sysdeps/i386/fpu/s_cbrt.S
+++ b/sysdeps/i386/fpu/s_cbrt.S
@@ -1,5 +1,5 @@
/* Compute cubic root of double value.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Dirk Alboth <dirka@uni-paderborn.de> and
Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,6 +19,7 @@
<http://www.gnu.org/licenses/>. */
#include <machine/asm.h>
+#include <libm-alias-double.h>
.section .rodata
@@ -197,4 +198,4 @@ ENTRY(__cbrt)
1: fldl 4(%esp)
ret
END(__cbrt)
-weak_alias (__cbrt, cbrt)
+libm_alias_double (__cbrt, cbrt)
diff --git a/sysdeps/i386/fpu/s_cbrtf.S b/sysdeps/i386/fpu/s_cbrtf.S
index 0a9db49523..0bdb2f32ec 100644
--- a/sysdeps/i386/fpu/s_cbrtf.S
+++ b/sysdeps/i386/fpu/s_cbrtf.S
@@ -1,5 +1,5 @@
/* Compute cubic root of float value.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Dirk Alboth <dirka@uni-paderborn.de> and
Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,6 +19,7 @@
<http://www.gnu.org/licenses/>. */
#include <machine/asm.h>
+#include <libm-alias-float.h>
.section .rodata
@@ -174,4 +175,4 @@ ENTRY(__cbrtf)
1: flds 4(%esp)
ret
END(__cbrtf)
-weak_alias (__cbrtf, cbrtf)
+libm_alias_float (__cbrt, cbrt)
diff --git a/sysdeps/i386/fpu/s_cbrtl.S b/sysdeps/i386/fpu/s_cbrtl.S
index 3bf170075b..0328c96f6b 100644
--- a/sysdeps/i386/fpu/s_cbrtl.S
+++ b/sysdeps/i386/fpu/s_cbrtl.S
@@ -1,5 +1,5 @@
/* Compute cubic root of long double value.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Dirk Alboth <dirka@uni-paderborn.de> and
Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <libm-alias-ldouble.h>
#include <machine/asm.h>
.section .rodata
@@ -223,6 +224,7 @@ ENTRY(__cbrtl)
/* Return the argument. */
1: fldt 4(%esp)
+ fadd %st
ret
END(__cbrtl)
-weak_alias (__cbrtl, cbrtl)
+libm_alias_ldouble (__cbrt, cbrt)
diff --git a/sysdeps/i386/fpu/s_ceil.S b/sysdeps/i386/fpu/s_ceil.S
index f32fa26d34..9287ab0673 100644
--- a/sysdeps/i386/fpu/s_ceil.S
+++ b/sysdeps/i386/fpu/s_ceil.S
@@ -4,15 +4,16 @@
*/
#include <machine/asm.h>
+#include <libm-alias-double.h>
RCSID("$NetBSD: s_ceil.S,v 1.4 1995/05/08 23:52:13 jtc Exp $")
ENTRY(__ceil)
fldl 4(%esp)
- subl $8,%esp
- cfi_adjust_cfa_offset (8)
+ subl $32,%esp
+ cfi_adjust_cfa_offset (32)
- fstcw 4(%esp) /* store fpu control word */
+ fnstenv 4(%esp) /* store fpu environment */
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
@@ -25,10 +26,10 @@ ENTRY(__ceil)
frndint /* round */
- fldcw 4(%esp) /* restore original control word */
+ fldenv 4(%esp) /* restore original environment */
- addl $8,%esp
- cfi_adjust_cfa_offset (-8)
+ addl $32,%esp
+ cfi_adjust_cfa_offset (-32)
ret
END (__ceil)
-weak_alias (__ceil, ceil)
+libm_alias_double (__ceil, ceil)
diff --git a/sysdeps/i386/fpu/s_ceilf.S b/sysdeps/i386/fpu/s_ceilf.S
index 4fe703b179..2a6e3db273 100644
--- a/sysdeps/i386/fpu/s_ceilf.S
+++ b/sysdeps/i386/fpu/s_ceilf.S
@@ -4,15 +4,16 @@
*/
#include <machine/asm.h>
+#include <libm-alias-float.h>
RCSID("$NetBSD: s_ceilf.S,v 1.3 1995/05/08 23:52:44 jtc Exp $")
ENTRY(__ceilf)
flds 4(%esp)
- subl $8,%esp
- cfi_adjust_cfa_offset (8)
+ subl $32,%esp
+ cfi_adjust_cfa_offset (32)
- fstcw 4(%esp) /* store fpu control word */
+ fnstenv 4(%esp) /* store fpu environment */
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
@@ -25,10 +26,10 @@ ENTRY(__ceilf)
frndint /* round */
- fldcw 4(%esp) /* restore original control word */
+ fldenv 4(%esp) /* restore original environment */
- addl $8,%esp
- cfi_adjust_cfa_offset (-8)
+ addl $32,%esp
+ cfi_adjust_cfa_offset (-32)
ret
END (__ceilf)
-weak_alias (__ceilf, ceilf)
+libm_alias_float (__ceil, ceil)
diff --git a/sysdeps/i386/fpu/s_ceill.S b/sysdeps/i386/fpu/s_ceill.S
index 4b272c522a..70d5c6ce0c 100644
--- a/sysdeps/i386/fpu/s_ceill.S
+++ b/sysdeps/i386/fpu/s_ceill.S
@@ -4,16 +4,17 @@
* Public domain.
*/
+#include <libm-alias-ldouble.h>
#include <machine/asm.h>
RCSID("$NetBSD: $")
ENTRY(__ceill)
fldt 4(%esp)
- subl $8,%esp
- cfi_adjust_cfa_offset (8)
+ subl $32,%esp
+ cfi_adjust_cfa_offset (32)
- fstcw 4(%esp) /* store fpu control word */
+ fnstenv 4(%esp) /* store fpu environment */
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
@@ -26,10 +27,15 @@ ENTRY(__ceill)
frndint /* round */
- fldcw 4(%esp) /* restore original control word */
+ /* Preserve "invalid" exceptions from sNaN input. */
+ fnstsw
+ andl $0x1, %eax
+ orl %eax, 8(%esp)
- addl $8,%esp
- cfi_adjust_cfa_offset (-8)
+ fldenv 4(%esp) /* restore original environment */
+
+ addl $32,%esp
+ cfi_adjust_cfa_offset (-32)
ret
END (__ceill)
-weak_alias (__ceill, ceill)
+libm_alias_ldouble (__ceil, ceil)
diff --git a/sysdeps/i386/fpu/s_copysign.S b/sysdeps/i386/fpu/s_copysign.S
index 2520a94427..1434d407a7 100644
--- a/sysdeps/i386/fpu/s_copysign.S
+++ b/sysdeps/i386/fpu/s_copysign.S
@@ -4,6 +4,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-double.h>
RCSID("$NetBSD: s_copysign.S,v 1.4 1995/05/08 23:53:02 jtc Exp $")
@@ -17,4 +18,4 @@ ENTRY(__copysign)
fldl 4(%esp)
ret
END (__copysign)
-weak_alias (__copysign, copysign)
+libm_alias_double (__copysign, copysign)
diff --git a/sysdeps/i386/fpu/s_copysignf.S b/sysdeps/i386/fpu/s_copysignf.S
index 57b1a6f119..a05b749f1b 100644
--- a/sysdeps/i386/fpu/s_copysignf.S
+++ b/sysdeps/i386/fpu/s_copysignf.S
@@ -4,6 +4,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-float.h>
RCSID("$NetBSD: s_copysignf.S,v 1.3 1995/05/08 23:53:25 jtc Exp $")
@@ -17,4 +18,4 @@ ENTRY(__copysignf)
flds 4(%esp)
ret
END (__copysignf)
-weak_alias (__copysignf, copysignf)
+libm_alias_float (__copysign, copysign)
diff --git a/sysdeps/i386/fpu/s_copysignl.S b/sysdeps/i386/fpu/s_copysignl.S
index 2163e7b014..671ce683ba 100644
--- a/sysdeps/i386/fpu/s_copysignl.S
+++ b/sysdeps/i386/fpu/s_copysignl.S
@@ -4,6 +4,7 @@
* Public domain.
*/
+#include <libm-alias-ldouble.h>
#include <machine/asm.h>
RCSID("$NetBSD: $")
@@ -18,4 +19,4 @@ ENTRY(__copysignl)
fldt 4(%esp)
ret
END (__copysignl)
-weak_alias (__copysignl, copysignl)
+libm_alias_ldouble (__copysign, copysign)
diff --git a/sysdeps/i386/fpu/s_expm1.S b/sysdeps/i386/fpu/s_expm1.S
index 0bd227ee7a..2a7c41e72f 100644
--- a/sysdeps/i386/fpu/s_expm1.S
+++ b/sysdeps/i386/fpu/s_expm1.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of exp(x)-1.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
Based on code by John C. Bowman <bowman@ipp-garching.mpg.de>.
@@ -24,6 +24,7 @@
#include <sysdep.h>
#include <machine/asm.h>
#include <i386-math-asm.h>
+#include <libm-alias-double.h>
.section .rodata
@@ -110,4 +111,4 @@ ENTRY(__expm1)
fldl MO(minus1) // Set result to -1.0.
3: ret
END(__expm1)
-weak_alias (__expm1, expm1)
+libm_alias_double (__expm1, expm1)
diff --git a/sysdeps/i386/fpu/s_expm1f.S b/sysdeps/i386/fpu/s_expm1f.S
index 669140eb75..5acf374c4b 100644
--- a/sysdeps/i386/fpu/s_expm1f.S
+++ b/sysdeps/i386/fpu/s_expm1f.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of exp(x)-1.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
Based on code by John C. Bowman <bowman@ipp-garching.mpg.de>.
@@ -24,6 +24,7 @@
#include <sysdep.h>
#include <machine/asm.h>
#include <i386-math-asm.h>
+#include <libm-alias-float.h>
.section .rodata
@@ -110,4 +111,4 @@ ENTRY(__expm1f)
fldl MO(minus1) // Set result to -1.0.
3: ret
END(__expm1f)
-weak_alias (__expm1f, expm1f)
+libm_alias_float (__expm1, expm1)
diff --git a/sysdeps/i386/fpu/s_f32xaddf64.c b/sysdeps/i386/fpu/s_f32xaddf64.c
new file mode 100644
index 0000000000..9d5e85b409
--- /dev/null
+++ b/sysdeps/i386/fpu/s_f32xaddf64.c
@@ -0,0 +1,42 @@
+/* Add _Float64 values, converting the result to _Float32x. i386 version.
+ Copyright (C) 2018 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
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <fpu_control.h>
+#include <math-narrow-eval.h>
+#include <math_private.h>
+#include <math-narrow.h>
+
+_Float32x
+__f32xaddf64 (_Float64 x, _Float64 y)
+{
+ /* To avoid double rounding, set double precision for the addition.
+ math_narrow_eval is still needed to eliminate excess range in the
+ case of overflow. If the result of the addition is in the
+ subnormal range for double, it is exact, so no issues of double
+ rounding for subnormals arise. */
+ fpu_control_t cw, cw_double;
+ _FPU_GETCW (cw);
+ cw_double = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
+ _FPU_SETCW (cw_double);
+ _Float32x ret = math_narrow_eval (x + y);
+ _FPU_SETCW (cw);
+ CHECK_NARROW_ADD (ret, x, y);
+ return ret;
+}
+libm_alias_float32x_float64 (add)
diff --git a/sysdeps/i386/fpu/s_fdiml.S b/sysdeps/i386/fpu/s_f32xdivf64.c
index df6e9c047a..77f965a290 100644
--- a/sysdeps/i386/fpu/s_fdiml.S
+++ b/sysdeps/i386/fpu/s_f32xdivf64.c
@@ -1,7 +1,6 @@
-/* Compute positive difference.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Divide _Float64 values, converting the result to _Float32x. i386 version.
+ Copyright (C) 2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,35 +16,14 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-
- .text
-ENTRY(__fdiml)
- fldt 4(%esp) // x
- fldt 16(%esp) // x : y
-
- fucom %st(1)
- fnstsw
- sahf
- jp 1f
-
- jc 3f
-
- fstp %st(1)
- fldz
- jmp 2f
-
-3: fsubrp %st, %st(1)
- ret
-
-1: fxam
- fnstsw
- andb $0x45, %ah
- cmpb $0x01, %ah
- je 2f
-
- fxch
-2: fstp %st(1)
- ret
-END(__fdiml)
-weak_alias (__fdiml, fdiml)
+#include <math.h>
+#include <math-narrow.h>
+
+_Float32x
+__f32xdivf64 (_Float64 x, _Float64 y)
+{
+ /* To avoid double rounding, use round-to-odd on long double. */
+ NARROW_DIV_ROUND_TO_ODD ((long double) x, (long double) y, double,
+ union ieee854_long_double, l, mantissa1);
+}
+libm_alias_float32x_float64 (div)
diff --git a/sysdeps/i386/fpu/s_f32xmulf64.c b/sysdeps/i386/fpu/s_f32xmulf64.c
new file mode 100644
index 0000000000..7710fa47a8
--- /dev/null
+++ b/sysdeps/i386/fpu/s_f32xmulf64.c
@@ -0,0 +1,29 @@
+/* Multiply _Float64 values, converting the result to _Float32x. i386 version.
+ Copyright (C) 2018 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
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math-narrow.h>
+
+_Float32x
+__f32xmulf64 (_Float64 x, _Float64 y)
+{
+ /* To avoid double rounding, use round-to-odd on long double. */
+ NARROW_MUL_ROUND_TO_ODD ((long double) x, (long double) y, double,
+ union ieee854_long_double, l, mantissa1);
+}
+libm_alias_float32x_float64 (mul)
diff --git a/sysdeps/i386/fpu/s_f32xsubf64.c b/sysdeps/i386/fpu/s_f32xsubf64.c
new file mode 100644
index 0000000000..3f41acfdc9
--- /dev/null
+++ b/sysdeps/i386/fpu/s_f32xsubf64.c
@@ -0,0 +1,42 @@
+/* Subtract _Float64 values, converting the result to _Float32x. i386 version.
+ Copyright (C) 2018 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
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <fpu_control.h>
+#include <math-narrow-eval.h>
+#include <math_private.h>
+#include <math-narrow.h>
+
+_Float32x
+__f32xsubf64 (_Float64 x, _Float64 y)
+{
+ /* To avoid double rounding, set double precision for the subtraction.
+ math_narrow_eval is still needed to eliminate excess range in the
+ case of overflow. If the result of the subtraction is in the
+ subnormal range for double, it is exact, so no issues of double
+ rounding for subnormals arise. */
+ fpu_control_t cw, cw_double;
+ _FPU_GETCW (cw);
+ cw_double = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
+ _FPU_SETCW (cw_double);
+ _Float32x ret = math_narrow_eval (x - y);
+ _FPU_SETCW (cw);
+ CHECK_NARROW_SUB (ret, x, y);
+ return ret;
+}
+libm_alias_float32x_float64 (sub)
diff --git a/sysdeps/i386/fpu/s_fabs.S b/sysdeps/i386/fpu/s_fabs.S
index 23ae9dccb9..c623eb526c 100644
--- a/sysdeps/i386/fpu/s_fabs.S
+++ b/sysdeps/i386/fpu/s_fabs.S
@@ -1,4 +1,5 @@
#include <sysdep.h>
+#include <libm-alias-double.h>
.text
ENTRY(__fabs)
@@ -6,4 +7,4 @@ ENTRY(__fabs)
fabs
ret
END(__fabs)
-weak_alias (__fabs, fabs)
+libm_alias_double (__fabs, fabs)
diff --git a/sysdeps/i386/fpu/s_fabsf.S b/sysdeps/i386/fpu/s_fabsf.S
index c0407a8839..3185946ec1 100644
--- a/sysdeps/i386/fpu/s_fabsf.S
+++ b/sysdeps/i386/fpu/s_fabsf.S
@@ -1,4 +1,5 @@
#include <sysdep.h>
+#include <libm-alias-float.h>
.text
ENTRY(__fabsf)
@@ -6,4 +7,4 @@ ENTRY(__fabsf)
fabs
ret
END(__fabsf)
-weak_alias (__fabsf, fabsf)
+libm_alias_float (__fabs, fabs)
diff --git a/sysdeps/i386/fpu/s_fabsl.S b/sysdeps/i386/fpu/s_fabsl.S
index a12a3e050b..6642ed4151 100644
--- a/sysdeps/i386/fpu/s_fabsl.S
+++ b/sysdeps/i386/fpu/s_fabsl.S
@@ -1,3 +1,4 @@
+#include <libm-alias-ldouble.h>
#include <sysdep.h>
.text
@@ -6,4 +7,4 @@ ENTRY(__fabsl)
fabs
ret
END(__fabsl)
-weak_alias (__fabsl, fabsl)
+libm_alias_ldouble (__fabs, fabs)
diff --git a/sysdeps/i386/fpu/s_fdim.c b/sysdeps/i386/fpu/s_fdim.c
new file mode 100644
index 0000000000..b8fefe7d18
--- /dev/null
+++ b/sysdeps/i386/fpu/s_fdim.c
@@ -0,0 +1,48 @@
+/* Return positive difference between arguments. i386 version.
+ Copyright (C) 1997-2018 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
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <fpu_control.h>
+#include <math.h>
+#include <math-narrow-eval.h>
+#include <math_private.h>
+#include <libm-alias-double.h>
+
+double
+__fdim (double x, double y)
+{
+ if (islessequal (x, y))
+ return 0.0;
+
+ /* To avoid double rounding, set double precision for the
+ subtraction. math_narrow_eval is still needed to eliminate
+ excess range in the case of overflow. If the result of the
+ subtraction is in the subnormal range for double, it is exact, so
+ no issues of double rounding for subnormals arise. */
+ fpu_control_t cw, cw_double;
+ _FPU_GETCW (cw);
+ cw_double = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
+ _FPU_SETCW (cw_double);
+ double r = math_narrow_eval (x - y);
+ _FPU_SETCW (cw);
+ if (isinf (r) && !isinf (x) && !isinf (y))
+ __set_errno (ERANGE);
+
+ return r;
+}
+libm_alias_double (__fdim, fdim)
diff --git a/sysdeps/i386/fpu/s_floor.S b/sysdeps/i386/fpu/s_floor.S
index 2d6287dc79..f3cd66e77f 100644
--- a/sysdeps/i386/fpu/s_floor.S
+++ b/sysdeps/i386/fpu/s_floor.S
@@ -4,15 +4,16 @@
*/
#include <machine/asm.h>
+#include <libm-alias-double.h>
RCSID("$NetBSD: s_floor.S,v 1.4 1995/05/09 00:01:59 jtc Exp $")
ENTRY(__floor)
fldl 4(%esp)
- subl $8,%esp
- cfi_adjust_cfa_offset (8)
+ subl $32,%esp
+ cfi_adjust_cfa_offset (32)
- fstcw 4(%esp) /* store fpu control word */
+ fnstenv 4(%esp) /* store fpu environment */
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
@@ -25,10 +26,10 @@ ENTRY(__floor)
frndint /* round */
- fldcw 4(%esp) /* restore original control word */
+ fldenv 4(%esp) /* restore original environment */
- addl $8,%esp
- cfi_adjust_cfa_offset (-8)
+ addl $32,%esp
+ cfi_adjust_cfa_offset (-32)
ret
END (__floor)
-weak_alias (__floor, floor)
+libm_alias_double (__floor, floor)
diff --git a/sysdeps/i386/fpu/s_floorf.S b/sysdeps/i386/fpu/s_floorf.S
index e969fbe587..656eeb698f 100644
--- a/sysdeps/i386/fpu/s_floorf.S
+++ b/sysdeps/i386/fpu/s_floorf.S
@@ -4,15 +4,16 @@
*/
#include <machine/asm.h>
+#include <libm-alias-float.h>
RCSID("$NetBSD: s_floorf.S,v 1.3 1995/05/09 00:04:32 jtc Exp $")
ENTRY(__floorf)
flds 4(%esp)
- subl $8,%esp
- cfi_adjust_cfa_offset (8)
+ subl $32,%esp
+ cfi_adjust_cfa_offset (32)
- fstcw 4(%esp) /* store fpu control word */
+ fnstenv 4(%esp) /* store fpu environment */
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
@@ -25,10 +26,10 @@ ENTRY(__floorf)
frndint /* round */
- fldcw 4(%esp) /* restore original control word */
+ fldenv 4(%esp) /* restore original environment */
- addl $8,%esp
- cfi_adjust_cfa_offset (-8)
+ addl $32,%esp
+ cfi_adjust_cfa_offset (-32)
ret
END (__floorf)
-weak_alias (__floorf, floorf)
+libm_alias_float (__floor, floor)
diff --git a/sysdeps/i386/fpu/s_floorl.S b/sysdeps/i386/fpu/s_floorl.S
index 1206554c4a..f85b542f9b 100644
--- a/sysdeps/i386/fpu/s_floorl.S
+++ b/sysdeps/i386/fpu/s_floorl.S
@@ -4,16 +4,17 @@
* Public domain.
*/
+#include <libm-alias-ldouble.h>
#include <machine/asm.h>
RCSID("$NetBSD: $")
ENTRY(__floorl)
fldt 4(%esp)
- subl $8,%esp
- cfi_adjust_cfa_offset (8)
+ subl $32,%esp
+ cfi_adjust_cfa_offset (32)
- fstcw 4(%esp) /* store fpu control word */
+ fnstenv 4(%esp) /* store fpu environment */
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
@@ -26,10 +27,15 @@ ENTRY(__floorl)
frndint /* round */
- fldcw 4(%esp) /* restore original control word */
+ /* Preserve "invalid" exceptions from sNaN input. */
+ fnstsw
+ andl $0x1, %eax
+ orl %eax, 8(%esp)
- addl $8,%esp
- cfi_adjust_cfa_offset (-8)
+ fldenv 4(%esp) /* restore original environment */
+
+ addl $32,%esp
+ cfi_adjust_cfa_offset (-32)
ret
END (__floorl)
-weak_alias (__floorl, floorl)
+libm_alias_ldouble (__floor, floor)
diff --git a/sysdeps/i386/fpu/s_fmax.S b/sysdeps/i386/fpu/s_fmax.S
index a6a236f1e1..91387da5d8 100644
--- a/sysdeps/i386/fpu/s_fmax.S
+++ b/sysdeps/i386/fpu/s_fmax.S
@@ -1,5 +1,5 @@
/* Compute maximum of two numbers, regarding NaN as missing argument.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-double.h>
.text
ENTRY(__fmax)
@@ -40,4 +41,4 @@ ENTRY(__fmax)
ret
END(__fmax)
-weak_alias (__fmax, fmax)
+libm_alias_double (__fmax, fmax)
diff --git a/sysdeps/i386/fpu/s_fmaxf.S b/sysdeps/i386/fpu/s_fmaxf.S
index 2cbdbccb87..dbedc96d7f 100644
--- a/sysdeps/i386/fpu/s_fmaxf.S
+++ b/sysdeps/i386/fpu/s_fmaxf.S
@@ -1,5 +1,5 @@
/* Compute maximum of two numbers, regarding NaN as missing argument.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-float.h>
.text
ENTRY(__fmaxf)
@@ -40,4 +41,4 @@ ENTRY(__fmaxf)
ret
END(__fmaxf)
-weak_alias (__fmaxf, fmaxf)
+libm_alias_float (__fmax, fmax)
diff --git a/sysdeps/i386/fpu/s_fmaxl.S b/sysdeps/i386/fpu/s_fmaxl.S
index a38a1946bc..4c6b64fb1d 100644
--- a/sysdeps/i386/fpu/s_fmaxl.S
+++ b/sysdeps/i386/fpu/s_fmaxl.S
@@ -1,5 +1,5 @@
/* Compute maximum of two numbers, regarding NaN as missing argument.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <libm-alias-ldouble.h>
#include <sysdep.h>
.text
@@ -28,7 +29,13 @@ ENTRY(__fmaxl)
andb $0x45, %ah
cmpb $0x01, %ah
- je 1f // y == NaN
+ je 2f // y == NaN
+
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x01, %ah
+ je 3f // x == NaN
fucom %st(1)
fnstsw
@@ -39,5 +46,27 @@ ENTRY(__fmaxl)
1: fstp %st(1)
ret
+
+2: // st(1) is a NaN; st(0) may or may not be.
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x01, %ah
+ je 4f
+ // st(1) is a NaN; st(0) is not. Test if st(1) is signaling.
+ testb $0x40, 23(%esp)
+ jz 4f
+ fstp %st(1)
+ ret
+
+3: // st(0) is a NaN; st(1) is not. Test if st(0) is signaling.
+ testb $0x40, 11(%esp)
+ jz 4f
+ fstp %st(0)
+ ret
+
+4: // Both arguments are NaNs, or one is a signaling NaN.
+ faddp
+ ret
END(__fmaxl)
-weak_alias (__fmaxl, fmaxl)
+libm_alias_ldouble (__fmax, fmax)
diff --git a/sysdeps/i386/fpu/s_fmin.S b/sysdeps/i386/fpu/s_fmin.S
index 022d9cf9f6..7c07c07ae6 100644
--- a/sysdeps/i386/fpu/s_fmin.S
+++ b/sysdeps/i386/fpu/s_fmin.S
@@ -1,5 +1,5 @@
/* Compute minimum of two numbers, regarding NaN as missing argument.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-double.h>
.text
ENTRY(__fmin)
@@ -40,4 +41,4 @@ ENTRY(__fmin)
ret
END(__fmin)
-weak_alias (__fmin, fmin)
+libm_alias_double (__fmin, fmin)
diff --git a/sysdeps/i386/fpu/s_fminf.S b/sysdeps/i386/fpu/s_fminf.S
index 5ba4ddb138..b3b5cb63d6 100644
--- a/sysdeps/i386/fpu/s_fminf.S
+++ b/sysdeps/i386/fpu/s_fminf.S
@@ -1,5 +1,5 @@
/* Compute minimum of two numbers, regarding NaN as missing argument.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-float.h>
.text
ENTRY(__fminf)
@@ -40,4 +41,4 @@ ENTRY(__fminf)
ret
END(__fminf)
-weak_alias (__fminf, fminf)
+libm_alias_float (__fmin, fmin)
diff --git a/sysdeps/i386/fpu/s_fminl.S b/sysdeps/i386/fpu/s_fminl.S
index fb5169b8f2..b1f87005a2 100644
--- a/sysdeps/i386/fpu/s_fminl.S
+++ b/sysdeps/i386/fpu/s_fminl.S
@@ -1,5 +1,5 @@
/* Compute minimum of two numbers, regarding NaN as missing argument.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -17,27 +17,56 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <libm-alias-ldouble.h>
#include <sysdep.h>
.text
ENTRY(__fminl)
- fldt 4(%esp) // x
- fldt 16(%esp) // x : y
+ fldt 16(%esp) // y
+ fxam
+ fnstsw
+ fldt 4(%esp) // y : x
+
+ andb $0x45, %ah
+ cmpb $0x01, %ah
+ je 2f // y == NaN
fxam
fnstsw
andb $0x45, %ah
cmpb $0x01, %ah
- je 1f // y == NaN
+ je 3f // x == NaN
fucom %st(1)
fnstsw
sahf
- jc 2f
+ jc 1f
+
+ fxch %st(1)
+1: fstp %st(1)
+
+ ret
-1: fxch %st(1)
-2: fstp %st(1)
+2: // st(1) is a NaN; st(0) may or may not be.
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x01, %ah
+ je 4f
+ // st(1) is a NaN; st(0) is not. Test if st(1) is signaling.
+ testb $0x40, 23(%esp)
+ jz 4f
+ fstp %st(1)
+ ret
+
+3: // st(0) is a NaN; st(1) is not. Test if st(0) is signaling.
+ testb $0x40, 11(%esp)
+ jz 4f
+ fstp %st(0)
+ ret
+4: // Both arguments are NaNs, or one is a signaling NaN.
+ faddp
ret
END(__fminl)
-weak_alias (__fminl, fminl)
+libm_alias_ldouble (__fmin, fmin)
diff --git a/sysdeps/i386/fpu/s_fpclassifyl.c b/sysdeps/i386/fpu/s_fpclassifyl.c
index 4971f16fff..44110bbfca 100644
--- a/sysdeps/i386/fpu/s_fpclassifyl.c
+++ b/sysdeps/i386/fpu/s_fpclassifyl.c
@@ -1,5 +1,5 @@
/* Return classification value corresponding to argument.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -25,7 +25,7 @@
int
__fpclassifyl (long double x)
{
- u_int32_t ex, hx, lx;
+ uint32_t ex, hx, lx;
int retval = FP_NORMAL;
GET_LDOUBLE_WORDS (ex, hx, lx, x);
diff --git a/sysdeps/i386/fpu/s_frexp.S b/sysdeps/i386/fpu/s_frexp.S
index 23f15dddb3..d5d9d5386c 100644
--- a/sysdeps/i386/fpu/s_frexp.S
+++ b/sysdeps/i386/fpu/s_frexp.S
@@ -1,5 +1,5 @@
/* ix87 specific frexp implementation for double.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <machine/asm.h>
+#include <libm-alias-double.h>
.section .rodata
@@ -80,4 +81,4 @@ ENTRY (__frexp)
ret
END (__frexp)
-weak_alias (__frexp, frexp)
+libm_alias_double (__frexp, frexp)
diff --git a/sysdeps/i386/fpu/s_frexpf.S b/sysdeps/i386/fpu/s_frexpf.S
index 5e3288bede..e45185cdd4 100644
--- a/sysdeps/i386/fpu/s_frexpf.S
+++ b/sysdeps/i386/fpu/s_frexpf.S
@@ -1,5 +1,5 @@
/* ix87 specific frexp implementation for float.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <machine/asm.h>
+#include <libm-alias-float.h>
.section .rodata
@@ -77,4 +78,4 @@ ENTRY (__frexpf)
ret
END (__frexpf)
-weak_alias (__frexpf, frexpf)
+libm_alias_float (__frexp, frexp)
diff --git a/sysdeps/i386/fpu/s_frexpl.S b/sysdeps/i386/fpu/s_frexpl.S
index f687ab3c2e..52e3e4627c 100644
--- a/sysdeps/i386/fpu/s_frexpl.S
+++ b/sysdeps/i386/fpu/s_frexpl.S
@@ -1,5 +1,5 @@
/* ix87 specific frexp implementation for long double.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <libm-alias-ldouble.h>
#include <machine/asm.h>
.section .rodata
@@ -50,7 +51,7 @@ ENTRY (__frexpl)
jz 1f
xorl %ecx, %ecx
cmpl $0x7fff, %eax
- je 1f
+ je 3f
cmpl $0, %eax
jne 2f
@@ -81,5 +82,12 @@ ENTRY (__frexpl)
movl %ecx, (%eax)
ret
+
+ /* Infinity or NaN; ensure signaling NaNs are quieted. */
+3: movl EXPP(%esp), %eax
+ fldt VAL0(%esp)
+ fadd %st
+ movl %ecx, (%eax)
+ ret
END (__frexpl)
-weak_alias (__frexpl, frexpl)
+libm_alias_ldouble (__frexp, frexp)
diff --git a/sysdeps/i386/fpu/s_isnanl.c b/sysdeps/i386/fpu/s_isnanl.c
index 816396d8fb..fb97317bc9 100644
--- a/sysdeps/i386/fpu/s_isnanl.c
+++ b/sysdeps/i386/fpu/s_isnanl.c
@@ -35,9 +35,9 @@ int __isnanl(long double x)
extended format has the normally implicit 1 explicit
present. Sigh! */
lx |= hx & 0x7fffffff;
- se |= (u_int32_t)(lx|(-lx))>>31;
+ se |= (uint32_t)(lx|(-lx))>>31;
se = 0xfffe - se;
- return (int)((u_int32_t)(se))>>16;
+ return (int)((uint32_t)(se))>>16;
}
hidden_def (__isnanl)
weak_alias (__isnanl, isnanl)
diff --git a/sysdeps/i386/fpu/s_llrint.S b/sysdeps/i386/fpu/s_llrint.S
index 0c2b99ec0b..888d2a6231 100644
--- a/sysdeps/i386/fpu/s_llrint.S
+++ b/sysdeps/i386/fpu/s_llrint.S
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,6 +19,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-double.h>
.text
ENTRY(__llrint)
@@ -33,4 +34,4 @@ ENTRY(__llrint)
cfi_adjust_cfa_offset (-4)
ret
END(__llrint)
-weak_alias (__llrint, llrint)
+libm_alias_double (__llrint, llrint)
diff --git a/sysdeps/i386/fpu/s_llrintf.S b/sysdeps/i386/fpu/s_llrintf.S
index 72d1e69528..42a4ef1fb1 100644
--- a/sysdeps/i386/fpu/s_llrintf.S
+++ b/sysdeps/i386/fpu/s_llrintf.S
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,6 +19,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-float.h>
.text
ENTRY(__llrintf)
@@ -33,4 +34,4 @@ ENTRY(__llrintf)
cfi_adjust_cfa_offset (-4)
ret
END(__llrintf)
-weak_alias (__llrintf, llrintf)
+libm_alias_float (__llrint, llrint)
diff --git a/sysdeps/i386/fpu/s_llrintl.S b/sysdeps/i386/fpu/s_llrintl.S
index a256ca252b..6728e713b8 100644
--- a/sysdeps/i386/fpu/s_llrintl.S
+++ b/sysdeps/i386/fpu/s_llrintl.S
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <libm-alias-ldouble.h>
#include <sysdep.h>
.text
@@ -33,4 +34,4 @@ ENTRY(__llrintl)
cfi_adjust_cfa_offset (-4)
ret
END(__llrintl)
-weak_alias (__llrintl, llrintl)
+libm_alias_ldouble (__llrint, llrint)
diff --git a/sysdeps/i386/fpu/s_log1pl.S b/sysdeps/i386/fpu/s_log1pl.S
index 98965fa48c..0fd05cbdb3 100644
--- a/sysdeps/i386/fpu/s_log1pl.S
+++ b/sysdeps/i386/fpu/s_log1pl.S
@@ -70,6 +70,7 @@ ENTRY(__log1pl)
3: jp 4b // in case x is ħInf
fstp %st(1)
fstp %st(1)
+ fadd %st(0)
ret
END (__log1pl)
diff --git a/sysdeps/i386/fpu/s_logb.S b/sysdeps/i386/fpu/s_logb.S
index f78c091c8a..d4b3a4714f 100644
--- a/sysdeps/i386/fpu/s_logb.S
+++ b/sysdeps/i386/fpu/s_logb.S
@@ -4,6 +4,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-double.h>
RCSID("$NetBSD: s_logb.S,v 1.4 1995/05/09 00:14:30 jtc Exp $")
@@ -13,4 +14,4 @@ ENTRY(__logb)
fstp %st
ret
END (__logb)
-weak_alias (__logb, logb)
+libm_alias_double (__logb, logb)
diff --git a/sysdeps/i386/fpu/s_logbf.S b/sysdeps/i386/fpu/s_logbf.S
index 91eb3d2925..175daf52a1 100644
--- a/sysdeps/i386/fpu/s_logbf.S
+++ b/sysdeps/i386/fpu/s_logbf.S
@@ -4,6 +4,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-float.h>
RCSID("$NetBSD: s_logbf.S,v 1.3 1995/05/09 00:15:12 jtc Exp $")
@@ -13,4 +14,4 @@ ENTRY(__logbf)
fstp %st
ret
END (__logbf)
-weak_alias (__logbf, logbf)
+libm_alias_float (__logb, logb)
diff --git a/sysdeps/i386/fpu/s_logbl.c b/sysdeps/i386/fpu/s_logbl.c
index 391e2db489..601d873594 100644
--- a/sysdeps/i386/fpu/s_logbl.c
+++ b/sysdeps/i386/fpu/s_logbl.c
@@ -4,6 +4,7 @@
* Public domain.
*/
+#include <libm-alias-ldouble.h>
#include <math_private.h>
long double
@@ -16,4 +17,4 @@ __logbl (long double x)
return res;
}
-weak_alias (__logbl, logbl)
+libm_alias_ldouble (__logb, logb)
diff --git a/sysdeps/i386/fpu/s_lrint.S b/sysdeps/i386/fpu/s_lrint.S
index 263248c7c2..8373b25bcd 100644
--- a/sysdeps/i386/fpu/s_lrint.S
+++ b/sysdeps/i386/fpu/s_lrint.S
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,6 +19,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-double.h>
.text
ENTRY(__lrint)
@@ -31,4 +32,4 @@ ENTRY(__lrint)
cfi_adjust_cfa_offset (-4)
ret
END(__lrint)
-weak_alias (__lrint, lrint)
+libm_alias_double (__lrint, lrint)
diff --git a/sysdeps/i386/fpu/s_lrintf.S b/sysdeps/i386/fpu/s_lrintf.S
index 1bd84fe10b..d2f0aa78e6 100644
--- a/sysdeps/i386/fpu/s_lrintf.S
+++ b/sysdeps/i386/fpu/s_lrintf.S
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,6 +19,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-float.h>
.text
ENTRY(__lrintf)
@@ -31,4 +32,4 @@ ENTRY(__lrintf)
cfi_adjust_cfa_offset (-4)
ret
END(__lrintf)
-weak_alias (__lrintf, lrintf)
+libm_alias_float (__lrint, lrint)
diff --git a/sysdeps/i386/fpu/s_lrintl.S b/sysdeps/i386/fpu/s_lrintl.S
index 31acc3e232..28b7219f6e 100644
--- a/sysdeps/i386/fpu/s_lrintl.S
+++ b/sysdeps/i386/fpu/s_lrintl.S
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,6 +18,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <libm-alias-ldouble.h>
#include <sysdep.h>
.text
@@ -31,4 +32,4 @@ ENTRY(__lrintl)
cfi_adjust_cfa_offset (-4)
ret
END(__lrintl)
-weak_alias (__lrintl, lrintl)
+libm_alias_ldouble (__lrint, lrint)
diff --git a/sysdeps/i386/fpu/s_nearbyint.S b/sysdeps/i386/fpu/s_nearbyint.S
index 8da8ae9792..11fb61b242 100644
--- a/sysdeps/i386/fpu/s_nearbyint.S
+++ b/sysdeps/i386/fpu/s_nearbyint.S
@@ -5,20 +5,17 @@
/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */
#include <machine/asm.h>
+#include <libm-alias-double.h>
ENTRY(__nearbyint)
fldl 4(%esp)
subl $32, %esp
cfi_adjust_cfa_offset (32)
fnstenv 4(%esp)
- movl 4(%esp), %eax
- orl $0x20, %eax
- movl %eax, (%esp)
- fldcw (%esp)
frndint
fldenv 4(%esp)
addl $32, %esp
cfi_adjust_cfa_offset (-32)
ret
END (__nearbyint)
-weak_alias (__nearbyint, nearbyint)
+libm_alias_double (__nearbyint, nearbyint)
diff --git a/sysdeps/i386/fpu/s_nearbyintf.S b/sysdeps/i386/fpu/s_nearbyintf.S
index 0c51f72364..169d06d80b 100644
--- a/sysdeps/i386/fpu/s_nearbyintf.S
+++ b/sysdeps/i386/fpu/s_nearbyintf.S
@@ -5,20 +5,17 @@
/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */
#include <machine/asm.h>
+#include <libm-alias-float.h>
ENTRY(__nearbyintf)
flds 4(%esp)
subl $32, %esp
cfi_adjust_cfa_offset (32)
fnstenv 4(%esp)
- movl 4(%esp), %eax
- orl $0x20, %eax
- movl %eax, (%esp)
- fldcw (%esp)
frndint
fldenv 4(%esp)
addl $32, %esp
cfi_adjust_cfa_offset (-32)
ret
END (__nearbyintf)
-weak_alias (__nearbyintf, nearbyintf)
+libm_alias_float (__nearbyint, nearbyint)
diff --git a/sysdeps/i386/fpu/s_nearbyintl.S b/sysdeps/i386/fpu/s_nearbyintl.S
index b260ab5914..852e1f6524 100644
--- a/sysdeps/i386/fpu/s_nearbyintl.S
+++ b/sysdeps/i386/fpu/s_nearbyintl.S
@@ -4,6 +4,7 @@
*/
/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */
+#include <libm-alias-ldouble.h>
#include <machine/asm.h>
ENTRY(__nearbyintl)
@@ -11,10 +12,6 @@ ENTRY(__nearbyintl)
subl $32, %esp
cfi_adjust_cfa_offset (32)
fnstenv 4(%esp)
- movl 4(%esp), %eax
- orl $0x20, %eax
- movl %eax, (%esp)
- fldcw (%esp)
frndint
fnstsw
andl $0x1, %eax
@@ -24,4 +21,4 @@ ENTRY(__nearbyintl)
cfi_adjust_cfa_offset (-32)
ret
END (__nearbyintl)
-weak_alias (__nearbyintl, nearbyintl)
+libm_alias_ldouble (__nearbyint, nearbyint)
diff --git a/sysdeps/i386/fpu/s_nextafterl.c b/sysdeps/i386/fpu/s_nextafterl.c
index 188dc2129a..d6e3025bb2 100644
--- a/sysdeps/i386/fpu/s_nextafterl.c
+++ b/sysdeps/i386/fpu/s_nextafterl.c
@@ -28,12 +28,14 @@ static char rcsid[] = "$NetBSD: $";
#include <errno.h>
#include <math.h>
+#include <math-barriers.h>
#include <math_private.h>
+#include <libm-alias-ldouble.h>
long double __nextafterl(long double x, long double y)
{
- u_int32_t hx,hy,ix,iy;
- u_int32_t lx,ly;
+ uint32_t hx,hy,ix,iy;
+ uint32_t lx,ly;
int32_t esx,esy;
GET_LDOUBLE_WORDS(esx,hx,lx,x);
@@ -86,7 +88,7 @@ long double __nextafterl(long double x, long double y)
if(esy>=0||(esx>esy||((esx==esy)&&(hx>hy||((hx==hy)&&(lx>ly)))))){
/* x < y, x -= ulp */
if(lx==0) {
- if (hx <= 0x80000000) {
+ if (hx <= 0x80000000 && esx != 0xffff8000) {
esx -= 1;
hx = hx - 1;
if ((esx&0x7fff) > 0)
@@ -120,6 +122,6 @@ long double __nextafterl(long double x, long double y)
SET_LDOUBLE_WORDS(x,esx,hx,lx);
return x;
}
-weak_alias (__nextafterl, nextafterl)
+libm_alias_ldouble (__nextafter, nextafter)
strong_alias (__nextafterl, __nexttowardl)
weak_alias (__nextafterl, nexttowardl)
diff --git a/sysdeps/i386/fpu/s_nexttoward.c b/sysdeps/i386/fpu/s_nexttoward.c
index 0b47044760..3594db5a4c 100644
--- a/sysdeps/i386/fpu/s_nexttoward.c
+++ b/sysdeps/i386/fpu/s_nexttoward.c
@@ -28,13 +28,14 @@ static char rcsid[] = "$NetBSD: $";
#include <errno.h>
#include <math.h>
+#include <math-barriers.h>
#include <math_private.h>
#include <float.h>
double __nexttoward(double x, long double y)
{
int32_t hx,ix,iy;
- u_int32_t lx,hy,ly,esy;
+ uint32_t lx,hy,ly,esy;
EXTRACT_WORDS(hx,lx,x);
GET_LDOUBLE_WORDS(esy,hy,ly,y);
diff --git a/sysdeps/i386/fpu/s_nexttowardf.c b/sysdeps/i386/fpu/s_nexttowardf.c
index e1156d1e4f..6e11ace223 100644
--- a/sysdeps/i386/fpu/s_nexttowardf.c
+++ b/sysdeps/i386/fpu/s_nexttowardf.c
@@ -20,13 +20,14 @@ static char rcsid[] = "$NetBSD: $";
#include <errno.h>
#include <math.h>
+#include <math-barriers.h>
#include <math_private.h>
#include <float.h>
float __nexttowardf(float x, long double y)
{
int32_t hx,ix,iy;
- u_int32_t hy,ly,esy;
+ uint32_t hy,ly,esy;
GET_FLOAT_WORD(hx,x);
GET_LDOUBLE_WORDS(esy,hy,ly,y);
diff --git a/sysdeps/i386/fpu/s_remquo.S b/sysdeps/i386/fpu/s_remquo.S
index 341285db30..ac911727a8 100644
--- a/sysdeps/i386/fpu/s_remquo.S
+++ b/sysdeps/i386/fpu/s_remquo.S
@@ -5,6 +5,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-double.h>
#define PARMS 4 /* no space for saved regs */
#define DVDND PARMS
@@ -42,4 +43,4 @@ ENTRY (__remquo)
ret
END (__remquo)
-weak_alias (__remquo, remquo)
+libm_alias_double (__remquo, remquo)
diff --git a/sysdeps/i386/fpu/s_remquof.S b/sysdeps/i386/fpu/s_remquof.S
index 62063f068f..0b4a74596a 100644
--- a/sysdeps/i386/fpu/s_remquof.S
+++ b/sysdeps/i386/fpu/s_remquof.S
@@ -5,6 +5,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-float.h>
#define PARMS 4 /* no space for saved regs */
#define DVDND PARMS
@@ -42,4 +43,4 @@ ENTRY (__remquof)
ret
END (__remquof)
-weak_alias (__remquof, remquof)
+libm_alias_float (__remquo, remquo)
diff --git a/sysdeps/i386/fpu/s_remquol.S b/sysdeps/i386/fpu/s_remquol.S
index f3d84fc7c2..f02cc10465 100644
--- a/sysdeps/i386/fpu/s_remquol.S
+++ b/sysdeps/i386/fpu/s_remquol.S
@@ -4,6 +4,7 @@
* Public domain.
*/
+#include <libm-alias-ldouble.h>
#include <machine/asm.h>
#define PARMS 4 /* no space for saved regs */
@@ -42,4 +43,4 @@ ENTRY (__remquol)
ret
END (__remquol)
-weak_alias (__remquol, remquol)
+libm_alias_ldouble (__remquo, remquo)
diff --git a/sysdeps/i386/fpu/s_rint.S b/sysdeps/i386/fpu/s_rint.S
index be36c5f0ca..b4ab01940f 100644
--- a/sysdeps/i386/fpu/s_rint.S
+++ b/sysdeps/i386/fpu/s_rint.S
@@ -4,6 +4,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-double.h>
RCSID("$NetBSD: s_rint.S,v 1.4 1995/05/09 00:16:08 jtc Exp $")
@@ -12,4 +13,4 @@ ENTRY(__rint)
frndint
ret
END (__rint)
-weak_alias (__rint, rint)
+libm_alias_double (__rint, rint)
diff --git a/sysdeps/i386/fpu/s_rintf.S b/sysdeps/i386/fpu/s_rintf.S
index 2b358c1cf1..f6d11047c7 100644
--- a/sysdeps/i386/fpu/s_rintf.S
+++ b/sysdeps/i386/fpu/s_rintf.S
@@ -4,6 +4,7 @@
*/
#include <machine/asm.h>
+#include <libm-alias-float.h>
RCSID("$NetBSD: s_rintf.S,v 1.3 1995/05/09 00:17:22 jtc Exp $")
@@ -12,4 +13,4 @@ ENTRY(__rintf)
frndint
ret
END (__rintf)
-weak_alias (__rintf, rintf)
+libm_alias_float (__rint, rint)
diff --git a/sysdeps/i386/fpu/s_rintl.c b/sysdeps/i386/fpu/s_rintl.c
index 66af9cb675..5900435af9 100644
--- a/sysdeps/i386/fpu/s_rintl.c
+++ b/sysdeps/i386/fpu/s_rintl.c
@@ -4,6 +4,7 @@
* Public domain.
*/
+#include <libm-alias-ldouble.h>
#include <math_private.h>
long double
@@ -15,4 +16,4 @@ __rintl (long double x)
return res;
}
-weak_alias (__rintl, rintl)
+libm_alias_ldouble (__rint, rint)
diff --git a/sysdeps/i386/fpu/s_trunc.S b/sysdeps/i386/fpu/s_trunc.S
index a15e5e5f16..a87687fe2b 100644
--- a/sysdeps/i386/fpu/s_trunc.S
+++ b/sysdeps/i386/fpu/s_trunc.S
@@ -1,5 +1,5 @@
/* Truncate double value.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,20 +18,21 @@
<http://www.gnu.org/licenses/>. */
#include <machine/asm.h>
+#include <libm-alias-double.h>
ENTRY(__trunc)
fldl 4(%esp)
- subl $8, %esp
- cfi_adjust_cfa_offset (8)
- fstcw 4(%esp)
+ subl $32, %esp
+ cfi_adjust_cfa_offset (32)
+ fnstenv 4(%esp)
movl $0xc00, %edx
orl 4(%esp), %edx
movl %edx, (%esp)
fldcw (%esp)
frndint
- fldcw 4(%esp)
- addl $8, %esp
- cfi_adjust_cfa_offset (-8)
+ fldenv 4(%esp)
+ addl $32, %esp
+ cfi_adjust_cfa_offset (-32)
ret
END(__trunc)
-weak_alias (__trunc, trunc)
+libm_alias_double (__trunc, trunc)
diff --git a/sysdeps/i386/fpu/s_truncf.S b/sysdeps/i386/fpu/s_truncf.S
index cbf257a949..14d2a81835 100644
--- a/sysdeps/i386/fpu/s_truncf.S
+++ b/sysdeps/i386/fpu/s_truncf.S
@@ -1,5 +1,5 @@
/* Truncate float value.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,20 +18,21 @@
<http://www.gnu.org/licenses/>. */
#include <machine/asm.h>
+#include <libm-alias-float.h>
ENTRY(__truncf)
flds 4(%esp)
- subl $8, %esp
- cfi_adjust_cfa_offset (8)
- fstcw 4(%esp)
+ subl $32, %esp
+ cfi_adjust_cfa_offset (32)
+ fnstenv 4(%esp)
movl $0xc00, %edx
orl 4(%esp), %edx
movl %edx, (%esp)
fldcw (%esp)
frndint
- fldcw 4(%esp)
- addl $8, %esp
- cfi_adjust_cfa_offset (-8)
+ fldenv 4(%esp)
+ addl $32, %esp
+ cfi_adjust_cfa_offset (-32)
ret
END(__truncf)
-weak_alias (__truncf, truncf)
+libm_alias_float (__trunc, trunc)
diff --git a/sysdeps/i386/fpu/s_truncl.S b/sysdeps/i386/fpu/s_truncl.S
index f92b474d49..98a14cdb37 100644
--- a/sysdeps/i386/fpu/s_truncl.S
+++ b/sysdeps/i386/fpu/s_truncl.S
@@ -1,5 +1,5 @@
/* Truncate long double value.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -17,21 +17,25 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <libm-alias-ldouble.h>
#include <machine/asm.h>
ENTRY(__truncl)
fldt 4(%esp)
- subl $8, %esp
- cfi_adjust_cfa_offset (8)
- fstcw 4(%esp)
+ subl $32, %esp
+ cfi_adjust_cfa_offset (32)
+ fnstenv 4(%esp)
movl $0xc00, %edx
orl 4(%esp), %edx
movl %edx, (%esp)
fldcw (%esp)
frndint
- fldcw 4(%esp)
- addl $8, %esp
- cfi_adjust_cfa_offset (-8)
+ fnstsw
+ andl $0x1, %eax
+ orl %eax, 8(%esp)
+ fldenv 4(%esp)
+ addl $32, %esp
+ cfi_adjust_cfa_offset (-32)
ret
END(__truncl)
-weak_alias (__truncl, truncl)
+libm_alias_ldouble (__trunc, trunc)
diff --git a/sysdeps/i386/fpu/slowexp.c b/sysdeps/i386/fpu/slowexp.c
deleted file mode 100644
index 1cc8931700..0000000000
--- a/sysdeps/i386/fpu/slowexp.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Not needed. */
diff --git a/sysdeps/i386/fpu/slowpow.c b/sysdeps/i386/fpu/slowpow.c
deleted file mode 100644
index 1cc8931700..0000000000
--- a/sysdeps/i386/fpu/slowpow.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Not needed. */
diff --git a/sysdeps/i386/fpu/w_sqrt.c b/sysdeps/i386/fpu/w_sqrt.c
index 19b5074179..8bef04e68a 100644
--- a/sysdeps/i386/fpu/w_sqrt.c
+++ b/sysdeps/i386/fpu/w_sqrt.c
@@ -1,8 +1,10 @@
/* The inline __ieee754_sqrt is not correctly rounding; it's OK for
most internal uses in glibc, but not for sqrt itself. */
+#define NO_MATH_REDIRECT
#define __ieee754_sqrt __avoid_ieee754_sqrt
#include <math.h>
#include <math_private.h>
#undef __ieee754_sqrt
extern double __ieee754_sqrt (double);
-#include <math/w_sqrt.c>
+#include <math-type-macros-double.h>
+#include <w_sqrt_template.c>
diff --git a/sysdeps/i386/fpu/w_sqrt_compat.c b/sysdeps/i386/fpu/w_sqrt_compat.c
new file mode 100644
index 0000000000..dd485f4b88
--- /dev/null
+++ b/sysdeps/i386/fpu/w_sqrt_compat.c
@@ -0,0 +1,9 @@
+/* The inline __ieee754_sqrt is not correctly rounding; it's OK for
+ most internal uses in glibc, but not for sqrt itself. */
+#define NO_MATH_REDIRECT
+#define __ieee754_sqrt __avoid_ieee754_sqrt
+#include <math.h>
+#include <math_private.h>
+#undef __ieee754_sqrt
+extern double __ieee754_sqrt (double);
+#include <math/w_sqrt_compat.c>