diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2008-03-26 15:04:44 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2008-03-26 15:04:44 +0000 |
commit | aefa9d43dcc6925454a258b8107e91462e60beac (patch) | |
tree | 974dfbada45151a1464bb76ba72bf9e40597ea73 /gcc/emit-rtl.c | |
parent | 35dd7cc326a43e7323effe52421eb237701ee71b (diff) | |
download | gcc-aefa9d43dcc6925454a258b8107e91462e60beac.zip gcc-aefa9d43dcc6925454a258b8107e91462e60beac.tar.gz gcc-aefa9d43dcc6925454a258b8107e91462e60beac.tar.bz2 |
builtins.c (expand_builtin_pow, [...]): Remove uses of dconst3, dconstsqrt2, dconstthird, dconste and/or dconst10.
* builtins.c (expand_builtin_pow, fold_builtin_cabs,
fold_builtin_sqrt, fold_builtin_cbrt, fold_builtin_logarithm,
fold_builtin_hypot, fold_builtin_pow): Remove uses of dconst3,
dconstsqrt2, dconstthird, dconste and/or dconst10.
* config/i386/i386.c (ix86_emit_swsqrtsf): Likewise.
* emit-rtl.c (dconst3, dconst10, dconstm2, dconstthird,
dconstsqrt2, dconste): Delete.
(init_emit_once): Likewise. Simplify initializing dconstm1.
Constify variable.
* real.c (get_real_const): New.
* real.h (dconst3, dconst10, dconstm2, dconstthird,
dconstsqrt2, dconste): Delete.
(real_value_const, get_real_const): New.
From-SVN: r133607
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 02680a9..77889cf 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -100,14 +100,8 @@ rtx const_true_rtx; REAL_VALUE_TYPE dconst0; REAL_VALUE_TYPE dconst1; REAL_VALUE_TYPE dconst2; -REAL_VALUE_TYPE dconst3; -REAL_VALUE_TYPE dconst10; REAL_VALUE_TYPE dconstm1; -REAL_VALUE_TYPE dconstm2; REAL_VALUE_TYPE dconsthalf; -REAL_VALUE_TYPE dconstthird; -REAL_VALUE_TYPE dconstsqrt2; -REAL_VALUE_TYPE dconste; /* Record fixed-point constant 0 and 1. */ FIXED_VALUE_TYPE fconst0[MAX_FCONST0]; @@ -5245,26 +5239,16 @@ init_emit_once (int line_numbers) REAL_VALUE_FROM_INT (dconst0, 0, 0, double_mode); REAL_VALUE_FROM_INT (dconst1, 1, 0, double_mode); REAL_VALUE_FROM_INT (dconst2, 2, 0, double_mode); - REAL_VALUE_FROM_INT (dconst3, 3, 0, double_mode); - REAL_VALUE_FROM_INT (dconst10, 10, 0, double_mode); - REAL_VALUE_FROM_INT (dconstm1, -1, -1, double_mode); - REAL_VALUE_FROM_INT (dconstm2, -2, -1, double_mode); + + dconstm1 = dconst1; + dconstm1.sign = 1; dconsthalf = dconst1; SET_REAL_EXP (&dconsthalf, REAL_EXP (&dconsthalf) - 1); - real_arithmetic (&dconstthird, RDIV_EXPR, &dconst1, &dconst3); - - /* Initialize mathematical constants for constant folding builtins. - These constants need to be given to at least 160 bits precision. */ - real_from_string (&dconstsqrt2, - "1.4142135623730950488016887242096980785696718753769480731766797379907"); - real_from_string (&dconste, - "2.7182818284590452353602874713526624977572470936999595749669676277241"); - for (i = 0; i < (int) ARRAY_SIZE (const_tiny_rtx); i++) { - REAL_VALUE_TYPE *r = + const REAL_VALUE_TYPE *const r = (i == 0 ? &dconst0 : i == 1 ? &dconst1 : &dconst2); for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); |