mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 13:30:06 +00:00
54142c44e9
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. |
||
---|---|---|
.. | ||
e_acosf.c | ||
e_acoshf.c | ||
e_asinf.c | ||
e_atan2f.c | ||
e_atanhf.c | ||
e_coshf.c | ||
e_exp2f.c | ||
e_expf.c | ||
e_fmodf.c | ||
e_gammaf_r.c | ||
e_hypotf.c | ||
e_ilogbf.c | ||
e_j0f.c | ||
e_j1f.c | ||
e_jnf.c | ||
e_lgammaf_r.c | ||
e_log2f.c | ||
e_log10f.c | ||
e_logf.c | ||
e_powf.c | ||
e_rem_pio2f.c | ||
e_remainderf.c | ||
e_sinhf.c | ||
e_sqrtf.c | ||
k_cosf.c | ||
k_rem_pio2f.c | ||
k_sinf.c | ||
k_tanf.c | ||
lgamma_negf.c | ||
lgamma_productf.c | ||
mpn2flt.c | ||
s_asinhf.c | ||
s_atanf.c | ||
s_cbrtf.c | ||
s_ceilf.c | ||
s_copysignf.c | ||
s_cosf.c | ||
s_erff.c | ||
s_expm1f.c | ||
s_fabsf.c | ||
s_finitef.c | ||
s_floorf.c | ||
s_fpclassifyf.c | ||
s_frexpf.c | ||
s_isinff.c | ||
s_isnanf.c | ||
s_issignalingf.c | ||
s_llrintf.c | ||
s_llroundf.c | ||
s_log1pf.c | ||
s_logbf.c | ||
s_lrintf.c | ||
s_lroundf.c | ||
s_modff.c | ||
s_nearbyintf.c | ||
s_nextafterf.c | ||
s_remquof.c | ||
s_rintf.c | ||
s_roundf.c | ||
s_scalblnf.c | ||
s_scalbnf.c | ||
s_signbitf.c | ||
s_sincosf.c | ||
s_sinf.c | ||
s_tanf.c | ||
s_tanhf.c | ||
s_truncf.c | ||
t_exp2f.h | ||
w_expf.c |