aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-05-09 00:15:10 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-05-09 00:15:10 +0000
commitaaee3cd88ed58f332f261021d78d071db6265e85 (patch)
tree3254deb770eb255134f227e145a7716d3e6c56d2 /sysdeps/generic
parent0555c47719d1f75b0fb378f0578367a8ea112d29 (diff)
downloadglibc-aaee3cd88ed58f332f261021d78d071db6265e85.tar
glibc-aaee3cd88ed58f332f261021d78d071db6265e85.tar.gz
glibc-aaee3cd88ed58f332f261021d78d071db6265e85.tar.bz2
glibc-aaee3cd88ed58f332f261021d78d071db6265e85.zip
Move math_narrow_eval to separate math-narrow-eval.h.
This patch continues cleaning up the math_private.h header, which contains lots of different definitions many of which are only needed by a limited subset of files using that header (and some of which are overridden by architectures that only want to override selected parts of the header), by moving the math_narrow_eval macro out to a separate math-narrow-eval.h header, only included by those files that need it. That header is placed in include/ (since it's used in stdlib/, not just files built in math/, but no sysdeps variants are needed at present). Tested for x86_64, and with build-many-glibcs.py. (Installed stripped shared libraries change because of line numbers in assertions in strtod_l.c.) * include/math-narrow-eval.h: New file. Contents moved from .... * sysdeps/generic/math_private.h: ... here. (math_narrow_eval): Remove macro. Moved to math-narrow-eval.h. [FLT_EVAL_METHOD != 0] (excess_precision): Likewise. * math/s_fdim_template.c: Include <math-narrow-eval.h>. * stdlib/strtod_l.c: Likewise. * sysdeps/i386/fpu/s_f32xaddf64.c: Likewise. * sysdeps/i386/fpu/s_f32xsubf64.c: Likewise. * sysdeps/i386/fpu/s_fdim.c: Likewise. * sysdeps/ieee754/dbl-64/e_cosh.c: Likewise. * sysdeps/ieee754/dbl-64/e_gamma_r.c: Likewise. * sysdeps/ieee754/dbl-64/e_j1.c: Likewise. * sysdeps/ieee754/dbl-64/e_jn.c: Likewise. * sysdeps/ieee754/dbl-64/e_lgamma_r.c: Likewise. * sysdeps/ieee754/dbl-64/e_sinh.c: Likewise. * sysdeps/ieee754/dbl-64/gamma_productf.c: Likewise. * sysdeps/ieee754/dbl-64/k_rem_pio2.c: Likewise. * sysdeps/ieee754/dbl-64/lgamma_neg.c: Likewise. * sysdeps/ieee754/dbl-64/s_erf.c: Likewise. * sysdeps/ieee754/dbl-64/s_llrint.c: Likewise. * sysdeps/ieee754/dbl-64/s_lrint.c: Likewise. * sysdeps/ieee754/flt-32/e_coshf.c: Likewise. * sysdeps/ieee754/flt-32/e_exp2f.c: Likewise. * sysdeps/ieee754/flt-32/e_expf.c: Likewise. * sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise. * sysdeps/ieee754/flt-32/e_j1f.c: Likewise. * sysdeps/ieee754/flt-32/e_jnf.c: Likewise. * sysdeps/ieee754/flt-32/e_lgammaf_r.c: Likewise. * sysdeps/ieee754/flt-32/e_sinhf.c: Likewise. * sysdeps/ieee754/flt-32/k_rem_pio2f.c: Likewise. * sysdeps/ieee754/flt-32/lgamma_negf.c: Likewise. * sysdeps/ieee754/flt-32/s_erff.c: Likewise. * sysdeps/ieee754/flt-32/s_llrintf.c: Likewise. * sysdeps/ieee754/flt-32/s_lrintf.c: Likewise. * sysdeps/ieee754/ldbl-96/gamma_product.c: Likewise.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/math_private.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h
index ecb37394fb..703f506ea0 100644
--- a/sysdeps/generic/math_private.h
+++ b/sysdeps/generic/math_private.h
@@ -270,29 +270,6 @@ extern void __docos (double __x, double __dx, double __v[]);
({ __typeof (x) __x = (x); __asm __volatile__ ("" : : "m" (__x)); })
#endif
-/* math_narrow_eval reduces its floating-point argument to the range
- and precision of its semantic type. (The original evaluation may
- still occur with excess range and precision, so the result may be
- affected by double rounding.) */
-#if FLT_EVAL_METHOD == 0
-# define math_narrow_eval(x) (x)
-#else
-# if FLT_EVAL_METHOD == 1
-# define excess_precision(type) __builtin_types_compatible_p (type, float)
-# else
-# define excess_precision(type) (__builtin_types_compatible_p (type, float) \
- || __builtin_types_compatible_p (type, \
- double))
-# endif
-# define math_narrow_eval(x) \
- ({ \
- __typeof (x) math_narrow_eval_tmp = (x); \
- if (excess_precision (__typeof (math_narrow_eval_tmp))) \
- __asm__ ("" : "+m" (math_narrow_eval_tmp)); \
- math_narrow_eval_tmp; \
- })
-#endif
-
#define fabs_tg(x) __MATH_TG ((x), (__typeof (x)) __builtin_fabs, (x))
/* These must be function-like macros because some __MATH_TG