aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-03-31 05:50:11 +0000
committerRichard Stallman <rms@gnu.org>1993-03-31 05:50:11 +0000
commit5008b8ae9572a1f7dc96f9efb378d97144d4e681 (patch)
tree5fe6d2d6518ea1f1128a76ab3826eccf00af994a
parent1632afcaa70e64821d35b406d75a6a364ae692e0 (diff)
downloadgcc-5008b8ae9572a1f7dc96f9efb378d97144d4e681.zip
gcc-5008b8ae9572a1f7dc96f9efb378d97144d4e681.tar.gz
gcc-5008b8ae9572a1f7dc96f9efb378d97144d4e681.tar.bz2
(real_value_truncate): If REAL_ARITHMETIC, replace by routine of same name in real.c.
(real_value_truncate): If REAL_ARITHMETIC, replace by routine of same name in real.c. target_isinf, target_isnan, target_negative): Likewise. (const_binop): Delete `register' from decls using REAL_VALUE_TYPE. (fold_convert): Use REAL_VALUE_TO_INT. From-SVN: r3939
-rw-r--r--gcc/fold-const.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 97cb123..bc23a4e 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -774,6 +774,7 @@ div_and_round_double (code, uns,
return overflow;
}
+#ifndef REAL_ARITHMETIC
/* Effectively truncate a real value to represent
the nearest possible value in a narrower mode.
The result is actually represented in the same data type as the argument,
@@ -950,6 +951,7 @@ target_negative (x)
return x < 0;
}
#endif /* Target not IEEE */
+#endif /* no REAL_ARITHMETIC */
/* Split a tree IN into a constant and a variable part
that could be combined with CODE to make IN.
@@ -1300,9 +1302,9 @@ const_binop (code, arg1, arg2, notrunc)
#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
if (TREE_CODE (arg1) == REAL_CST)
{
- register REAL_VALUE_TYPE d1;
- register REAL_VALUE_TYPE d2;
- register REAL_VALUE_TYPE value;
+ REAL_VALUE_TYPE d1;
+ REAL_VALUE_TYPE d2;
+ REAL_VALUE_TYPE value;
tree t;
d1 = TREE_REAL_CST (arg1);
@@ -1524,10 +1526,12 @@ fold_convert (t, arg1)
#if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
else if (TREE_CODE (arg1) == REAL_CST)
{
- REAL_VALUE_TYPE
- l = real_value_from_int_cst (TYPE_MIN_VALUE (type)),
- x = TREE_REAL_CST (arg1),
- u = real_value_from_int_cst (TYPE_MAX_VALUE (type));
+ REAL_VALUE_TYPE l, x, u;
+
+ l = real_value_from_int_cst (TYPE_MIN_VALUE (type));
+ x = TREE_REAL_CST (arg1);
+ u = real_value_from_int_cst (TYPE_MAX_VALUE (type));
+
/* See if X will be in range after truncation towards 0.
To compensate for truncation, move the bounds away from 0,
but reject if X exactly equals the adjusted bounds. */
@@ -1570,7 +1574,7 @@ fold_convert (t, arg1)
#else
{
HOST_WIDE_INT low, high;
- REAL_VALUE_TO_INT (low, high, TREE_REAL_CST (arg1));
+ REAL_VALUE_TO_INT (&low, &high, (TREE_REAL_CST (arg1)));
t = build_int_2 (low, high);
}
#endif