glibc/sysdeps/ieee754/ldbl-96
Joseph Myers 54142c44e9 Use math_narrow_eval more consistently.
Where glibc code needs to avoid excess range and precision in
floating-point arithmetic, code variously uses either asms or volatile
to force the results of that arithmetic to memory; mostly this is
conditional on FLT_EVAL_METHOD, but in the case of lrint / llrint
functions some use of volatile is unconditional (and is present
unnecessarily in versions for long double).  This patch make such code
use the recently-added math_narrow_eval macro consistently, removing
the unnecessary uses of volatile in long double lrint / llrint
implementations completely.

Tested for x86_64, x86, mips64 and powerpc.

	* math/s_nexttowardf.c (__nexttowardf): Use math_narrow_eval.
	* stdlib/strtod_l.c: Include <math_private.h>.
	(overflow_value): Use math_narrow_eval.
	(underflow_value): Likewise.
	* sysdeps/i386/fpu/s_nexttoward.c (__nexttoward): Likewise.
	* sysdeps/i386/fpu/s_nexttowardf.c (__nexttowardf): Likewise.
	* sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Likewise.
	(__ieee754_gamma_r): Likewise.
	* sysdeps/ieee754/dbl-64/gamma_productf.c (__gamma_productf):
	Likewise.
	* sysdeps/ieee754/dbl-64/k_rem_pio2.c (__kernel_rem_pio2):
	Likewise.
	* sysdeps/ieee754/dbl-64/lgamma_neg.c (__lgamma_neg): Likewise.
	* sysdeps/ieee754/dbl-64/s_erf.c (__erfc): Likewise.
	* sysdeps/ieee754/dbl-64/s_llrint.c (__llrint): Likewise.
	* sysdeps/ieee754/dbl-64/s_lrint.c (__lrint): Likewise.
	* sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Likewise.
	(__ieee754_gammaf_r): Likewise.
	* sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f):
	Likewise.
	* sysdeps/ieee754/flt-32/lgamma_negf.c (__lgamma_negf): Likewise.
	* sysdeps/ieee754/flt-32/s_erff.c (__erfcf): Likewise.
	* sysdeps/ieee754/flt-32/s_llrintf.c (__llrintf): Likewise.
	* sysdeps/ieee754/flt-32/s_lrintf.c (__lrintf): Likewise.
	* sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Do not use
	volatile.
	* sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_nexttoward.c (__nexttoward): Use
	math_narrow_eval.
	* sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c (__nexttoward):
	Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c (__nexttowardf):
	Likewise.
	* sysdeps/ieee754/ldbl-96/gamma_product.c (__gamma_product):
	Likewise.
	* sysdeps/ieee754/ldbl-96/s_llrintl.c (__llrintl): Do not use
	volatile.
	* sysdeps/ieee754/ldbl-96/s_lrintl.c (__lrintl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_nexttoward.c (__nexttoward): Use
	math_narrow_eval.
	* sysdeps/ieee754/ldbl-96/s_nexttowardf.c (__nexttowardf):
	Likewise.
	* sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c (__nldbl_nexttowardf):
	Likewise.
2015-09-23 18:14:57 +00:00
..
e_acoshl.c Fix acosh (1) in round-downward mode (bug 16927). 2014-05-14 12:35:40 +00:00
e_asinl.c Fix asin missing underflows (bug 16351). 2015-02-26 17:18:54 +00:00
e_atanhl.c Fix atanhl missing underflows (bug 16352). 2015-05-15 22:07:57 +00:00
e_coshl.c Fix cosh spurious underflows from expm1 (bug 16354), inaccurate results near 0 (bug 17061). 2014-06-23 20:20:10 +00:00
e_gammal_r.c Fix tgamma missing underflows (bug 18951). 2015-09-17 15:51:54 +00:00
e_hypotl.c Fix hypot handling of subnormals (bug 16316, bug 16330). 2013-12-17 13:42:13 +00:00
e_j0l.c Avoid uninitialized warnings in Bessel functions. 2015-02-26 21:49:19 +00:00
e_j1l.c Fix j1, jn missing underflows (bug 16559). 2015-06-29 16:52:16 +00:00
e_jnl.c Fix j1, jn missing underflows (bug 16559). 2015-06-29 16:52:16 +00:00
e_lgammal_r.c Fix lgamma (negative) inaccuracy (bug 2542, bug 2543, bug 2558). 2015-09-10 22:27:58 +00:00
e_rem_pio2l.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
e_sinhl.c Fix sinh missing underflows (bug 16519). 2015-08-06 23:01:09 +00:00
gamma_product.c Use math_narrow_eval more consistently. 2015-09-23 18:14:57 +00:00
gamma_productl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
k_cosl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
k_sinl.c Fix sin, sincos missing underflows (bug 16526, bug 16538). 2015-06-23 22:24:20 +00:00
k_tanl.c Disable uninitialized warning with GCC 4.8 2015-08-26 16:10:43 -07:00
ldbl2mpn.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
lgamma_negl.c Fix lgamma (negative) inaccuracy (bug 2542, bug 2543, bug 2558). 2015-09-10 22:27:58 +00:00
lgamma_product.c Fix lgamma (negative) inaccuracy (bug 2542, bug 2543, bug 2558). 2015-09-10 22:27:58 +00:00
lgamma_productl.c Fix lgamma (negative) inaccuracy (bug 2542, bug 2543, bug 2558). 2015-09-10 22:27:58 +00:00
math_ldbl.h
mpn2ldbl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
printf_fphex.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_asinhl.c Fix asinh missing underflows (bug 16350). 2015-06-18 23:27:41 +00:00
s_cbrtl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_copysignl.c
s_cosl.c
s_erfl.c Fix erf underflow handling near 0 (bug 16516). 2014-05-14 12:34:03 +00:00
s_fma.c Replace finite with isfinite. 2015-06-03 16:35:44 +01:00
s_fmal.c Fix fma spurious underflows (bug 18824). 2015-08-14 17:15:06 +00:00
s_frexpl.c
s_issignalingl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_llrintl.c Use math_narrow_eval more consistently. 2015-09-23 18:14:57 +00:00
s_llroundl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_lrintl.c Use math_narrow_eval more consistently. 2015-09-23 18:14:57 +00:00
s_lroundl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_modfl.c
s_nexttoward.c Use math_narrow_eval more consistently. 2015-09-23 18:14:57 +00:00
s_nexttowardf.c Use math_narrow_eval more consistently. 2015-09-23 18:14:57 +00:00
s_remquol.c Fix ldbl-96 remquol (finite, Inf) (bug 18244). 2015-05-19 23:44:28 +00:00
s_roundl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_scalblnl.c Fix ldbl-96 scalblnl underflowing results (bug 17803). 2015-01-12 23:02:14 +00:00
s_signbitl.c Use the GCC builtin functions for the non-inlined signbit implementations. 2015-09-18 16:39:08 +01:00
s_sincosl.c Since we now inline isinf, isnan and isfinite in math.h, replace uses of __isinf_ns(l/f) 2015-09-18 20:51:52 +01:00
s_sinl.c
s_tanhl.c Fix tanh missing underflows (bug 16520). 2015-08-13 16:40:39 +00:00
s_tanl.c
strtold_l.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
t_sincosl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
w_expl.c This patch renames all uses of __isinf*, __isnan*, __finite* and __signbit* to use standard C99 macros. This has no effect on generated code. 2015-06-03 15:41:36 +01:00
x2y2m1.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
x2y2m1l.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00