summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/combine.c4
-rw-r--r--gcc/defaults.h4
-rw-r--r--gcc/expmed.c2
-rw-r--r--gcc/fold-const.c4
-rw-r--r--gcc/simplify-rtx.c8
6 files changed, 12 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8c3092affc0..7ebb41639fb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2004-02-21 Kazu Hirata <kazu@cs.umass.edu>
+
+ * combine.c (SHIFT_COUNT_TRUNCATED): Remove.
+ * defaults.h (SHIFT_COUNT_TRUNCATED): Provide the default.
+ * expmed.c: Assume SHIFT_COUNT_TRUNCATED is always defined.
+ * fold-const.c: Likewise.
+ * simplify-rtx.c: Likewise.
+
2004-02-21 Alan Modra <amodra@bigpond.net.au>
* combine.c (can_combine_p): Don't ignore SETs marked with
diff --git a/gcc/combine.c b/gcc/combine.c
index 55e7ea33047..9e541ad61f2 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -91,10 +91,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "toplev.h"
#include "target.h"
-#ifndef SHIFT_COUNT_TRUNCATED
-#define SHIFT_COUNT_TRUNCATED 0
-#endif
-
/* Number of attempts to combine instructions in this function. */
static int combine_attempts;
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 551c9783c3e..927e98a5fa1 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -699,4 +699,8 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE!
#define OUTGOING_REGNO(N) (N)
#endif
+#ifndef SHIFT_COUNT_TRUNCATED
+#define SHIFT_COUNT_TRUNCATED 0
+#endif
+
#endif /* ! GCC_DEFAULTS_H */
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 3d61a35f953..fe81877fce8 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -1992,7 +1992,6 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
op1 = expand_expr (amount, NULL_RTX, VOIDmode, 0);
-#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED)
{
if (GET_CODE (op1) == CONST_INT
@@ -2004,7 +2003,6 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
&& subreg_lowpart_p (op1))
op1 = SUBREG_REG (op1);
}
-#endif
if (op1 == const0_rtx)
return shifted;
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 5b39098d0db..eaefe020005 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -374,10 +374,8 @@ lshift_double (unsigned HOST_WIDE_INT l1, HOST_WIDE_INT h1,
return;
}
-#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED)
count %= prec;
-#endif
if (count >= 2 * HOST_BITS_PER_WIDE_INT)
{
@@ -437,10 +435,8 @@ rshift_double (unsigned HOST_WIDE_INT l1, HOST_WIDE_INT h1,
? -((unsigned HOST_WIDE_INT) h1 >> (HOST_BITS_PER_WIDE_INT - 1))
: 0);
-#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED)
count %= prec;
-#endif
if (count >= 2 * HOST_BITS_PER_WIDE_INT)
{
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index dda7dd47365..5133a4aa75e 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1369,10 +1369,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode,
case LSHIFTRT: case ASHIFTRT:
case ASHIFT:
case ROTATE: case ROTATERT:
-#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED)
l2 &= (GET_MODE_BITSIZE (mode) - 1), h2 = 0;
-#endif
if (h2 != 0 || l2 >= GET_MODE_BITSIZE (mode))
return 0;
@@ -2152,10 +2150,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode,
if (arg1 < 0)
return 0;
-#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED)
arg1 %= width;
-#endif
val = ((unsigned HOST_WIDE_INT) arg0) >> arg1;
break;
@@ -2164,10 +2160,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode,
if (arg1 < 0)
return 0;
-#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED)
arg1 %= width;
-#endif
val = ((unsigned HOST_WIDE_INT) arg0) << arg1;
break;
@@ -2176,10 +2170,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode,
if (arg1 < 0)
return 0;
-#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED)
arg1 %= width;
-#endif
val = arg0s >> arg1;