summaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2010-05-21 18:13:54 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2010-05-21 18:13:54 +0000
commitd49b6e1e33707adeb972ade7cec09acc0b178d02 (patch)
treed44cc1a6330da7188cdd65b1bfce6a8b5b0818dc /gcc/fold-const.c
parent759149fbf3c844c39b283e487190eed9377b594e (diff)
downloadgcc-d49b6e1e33707adeb972ade7cec09acc0b178d02.tar.gz
real: Do not include gmp.h, mpfr.h, and mpc.h.
gcc/ChangeLog: * real: Do not include gmp.h, mpfr.h, and mpc.h. (REAL_VALUE_NEGATE, REAL_VALUE_ABS, real_arithmetic2): Remove. (real_value_negate, real_value_abs): New prototypes. (do_mpc_arg2, real_from_mpfr, mpfr_from_real): Move from here... * realmpfr.h (do_mpc_arg2, real_from_mpfr, mpfr_from_real): ...to here, new include file for interface between MPFR and REAL_VALUE_TYPE. * real.c: Include realmpfr.h. (real_arithmetic2): Remove legacy function. (real_value_negate): New. (real_value_abs): New. (mfpr_from_real, real_from_mpfr): Move from here... * realmpfr.c (mpfr_from_real, real_from_mpfr): ...to here, new file. * builtins.c: Include realmpfr.h. * fold-const.c: Include realmpfr.h. (fold_comparison): Use real_value_negate instead of REAL_VALUE_NEGATE. (fold_negate_const): Likewise. (fold_abs_const): Use real_value_abs instead of REAL_VALUE_ABS. * toplev.c: Include realmpfr.h. * simplify-rtx.c (simplify_const_unary_operation): Use real_value_abs and real_value_negate. * fixed-value.c (check_real_for_fixed_mode): Likewise. * config/arm/arm.c (neg_const_double_rtx_ok_for_fpa): Likewise. (vfp3_const_double_index): Likewise. (arm_print_operand): Likewise. * Makefile.in: Update dependencies. fortran/ChangeLog: * trans-const.c: Include realmpfr.h. * Make-lang.in: Update dependencies. From-SVN: r159679
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 65ded14e95f..17672ad6c43 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -53,6 +53,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "flags.h"
#include "tree.h"
+#include "realmpfr.h"
#include "rtl.h"
#include "expr.h"
#include "tm_p.h"
@@ -8977,7 +8978,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
return fold_build2_loc (loc, swap_tree_comparison (code), type,
TREE_OPERAND (arg0, 0),
build_real (TREE_TYPE (arg1),
- REAL_VALUE_NEGATE (cst)));
+ real_value_negate (&cst)));
/* IEEE doesn't distinguish +0 and -0 in comparisons. */
/* a CMP (-0) -> a CMP 0 */
@@ -15166,7 +15167,7 @@ fold_negate_const (tree arg0, tree type)
}
case REAL_CST:
- t = build_real (type, REAL_VALUE_NEGATE (TREE_REAL_CST (arg0)));
+ t = build_real (type, real_value_negate (&TREE_REAL_CST (arg0)));
break;
case FIXED_CST:
@@ -15225,7 +15226,7 @@ fold_abs_const (tree arg0, tree type)
case REAL_CST:
if (REAL_VALUE_NEGATIVE (TREE_REAL_CST (arg0)))
- t = build_real (type, REAL_VALUE_NEGATE (TREE_REAL_CST (arg0)));
+ t = build_real (type, real_value_negate (&TREE_REAL_CST (arg0)));
else
t = arg0;
break;