Commit bee07d3f by Kazu Hirata Committed by Kazu Hirata

combine.c (SHIFT_COUNT_TRUNCATED): Remove.

	* 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.

From-SVN: r78230
parent da6fdad3
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> 2004-02-21 Alan Modra <amodra@bigpond.net.au>
* combine.c (can_combine_p): Don't ignore SETs marked with * combine.c (can_combine_p): Don't ignore SETs marked with
......
...@@ -91,10 +91,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -91,10 +91,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "toplev.h" #include "toplev.h"
#include "target.h" #include "target.h"
#ifndef SHIFT_COUNT_TRUNCATED
#define SHIFT_COUNT_TRUNCATED 0
#endif
/* Number of attempts to combine instructions in this function. */ /* Number of attempts to combine instructions in this function. */
static int combine_attempts; static int combine_attempts;
......
...@@ -699,4 +699,8 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE! ...@@ -699,4 +699,8 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE!
#define OUTGOING_REGNO(N) (N) #define OUTGOING_REGNO(N) (N)
#endif #endif
#ifndef SHIFT_COUNT_TRUNCATED
#define SHIFT_COUNT_TRUNCATED 0
#endif
#endif /* ! GCC_DEFAULTS_H */ #endif /* ! GCC_DEFAULTS_H */
...@@ -1992,7 +1992,6 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted, ...@@ -1992,7 +1992,6 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
op1 = expand_expr (amount, NULL_RTX, VOIDmode, 0); op1 = expand_expr (amount, NULL_RTX, VOIDmode, 0);
#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED) if (SHIFT_COUNT_TRUNCATED)
{ {
if (GET_CODE (op1) == CONST_INT if (GET_CODE (op1) == CONST_INT
...@@ -2004,7 +2003,6 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted, ...@@ -2004,7 +2003,6 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
&& subreg_lowpart_p (op1)) && subreg_lowpart_p (op1))
op1 = SUBREG_REG (op1); op1 = SUBREG_REG (op1);
} }
#endif
if (op1 == const0_rtx) if (op1 == const0_rtx)
return shifted; return shifted;
......
...@@ -374,10 +374,8 @@ lshift_double (unsigned HOST_WIDE_INT l1, HOST_WIDE_INT h1, ...@@ -374,10 +374,8 @@ lshift_double (unsigned HOST_WIDE_INT l1, HOST_WIDE_INT h1,
return; return;
} }
#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED) if (SHIFT_COUNT_TRUNCATED)
count %= prec; count %= prec;
#endif
if (count >= 2 * HOST_BITS_PER_WIDE_INT) if (count >= 2 * HOST_BITS_PER_WIDE_INT)
{ {
...@@ -437,10 +435,8 @@ rshift_double (unsigned HOST_WIDE_INT l1, HOST_WIDE_INT h1, ...@@ -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)) ? -((unsigned HOST_WIDE_INT) h1 >> (HOST_BITS_PER_WIDE_INT - 1))
: 0); : 0);
#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED) if (SHIFT_COUNT_TRUNCATED)
count %= prec; count %= prec;
#endif
if (count >= 2 * HOST_BITS_PER_WIDE_INT) if (count >= 2 * HOST_BITS_PER_WIDE_INT)
{ {
......
...@@ -1369,10 +1369,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode, ...@@ -1369,10 +1369,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode,
case LSHIFTRT: case ASHIFTRT: case LSHIFTRT: case ASHIFTRT:
case ASHIFT: case ASHIFT:
case ROTATE: case ROTATERT: case ROTATE: case ROTATERT:
#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED) if (SHIFT_COUNT_TRUNCATED)
l2 &= (GET_MODE_BITSIZE (mode) - 1), h2 = 0; l2 &= (GET_MODE_BITSIZE (mode) - 1), h2 = 0;
#endif
if (h2 != 0 || l2 >= GET_MODE_BITSIZE (mode)) if (h2 != 0 || l2 >= GET_MODE_BITSIZE (mode))
return 0; return 0;
...@@ -2152,10 +2150,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode, ...@@ -2152,10 +2150,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode,
if (arg1 < 0) if (arg1 < 0)
return 0; return 0;
#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED) if (SHIFT_COUNT_TRUNCATED)
arg1 %= width; arg1 %= width;
#endif
val = ((unsigned HOST_WIDE_INT) arg0) >> arg1; val = ((unsigned HOST_WIDE_INT) arg0) >> arg1;
break; break;
...@@ -2164,10 +2160,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode, ...@@ -2164,10 +2160,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode,
if (arg1 < 0) if (arg1 < 0)
return 0; return 0;
#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED) if (SHIFT_COUNT_TRUNCATED)
arg1 %= width; arg1 %= width;
#endif
val = ((unsigned HOST_WIDE_INT) arg0) << arg1; val = ((unsigned HOST_WIDE_INT) arg0) << arg1;
break; break;
...@@ -2176,10 +2170,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode, ...@@ -2176,10 +2170,8 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode,
if (arg1 < 0) if (arg1 < 0)
return 0; return 0;
#ifdef SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED) if (SHIFT_COUNT_TRUNCATED)
arg1 %= width; arg1 %= width;
#endif
val = arg0s >> arg1; val = arg0s >> arg1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment