aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-11-24 23:15:19 +0000
committerJeff Law <law@gcc.gnu.org>1998-11-24 16:15:19 -0700
commit940da3246db50a1c1fde531ba1457e6bef61b3f9 (patch)
tree488e0bd31e47424105f777ed841d306134aabbfd /gcc/flow.c
parent83f660b7585eed3232073f360075fd93a2c66468 (diff)
downloadgcc-940da3246db50a1c1fde531ba1457e6bef61b3f9.zip
gcc-940da3246db50a1c1fde531ba1457e6bef61b3f9.tar.gz
gcc-940da3246db50a1c1fde531ba1457e6bef61b3f9.tar.bz2
cse.c (fold_rtx): Make autoincrement addressing mode tests be runtime selectable.
* cse.c (fold_rtx): Make autoincrement addressing mode tests be runtime selectable. * expr.c (move_by_pieces): Similarly. (move_by_pieces_1, clear_by_pieces, clear_by_pieces_1): Similarly. * flow.c (find_auto_inc): Similarly. (try_pre_increment): Similarly. * loop.c (strength_reduce): Similarly. * regclass.c (auto_inc_dec_reg_p): Similarly. * regmove.c (try_auto_increment): Similarly. (fixup_match_1): Similarly. * rtl.h (HAVE_PRE_INCREMENT): Define if not already defined. (HAVE_PRE_DECREMENT): Similarly. (HAVE_POST_INCREMENT, HAVE_POST_DECREMENT): Similarly. sponding changes to all target header files. From-SVN: r23837
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c38
1 files changed, 12 insertions, 26 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 51be372..510c011 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -2444,20 +2444,14 @@ find_auto_inc (needed, x, insn)
&& (y = SET_SRC (set), GET_CODE (y) == PLUS)
&& XEXP (y, 0) == addr
&& GET_CODE (XEXP (y, 1)) == CONST_INT
- && (0
-#ifdef HAVE_POST_INCREMENT
- || (INTVAL (XEXP (y, 1)) == size && offset == 0)
-#endif
-#ifdef HAVE_POST_DECREMENT
- || (INTVAL (XEXP (y, 1)) == - size && offset == 0)
-#endif
-#ifdef HAVE_PRE_INCREMENT
- || (INTVAL (XEXP (y, 1)) == size && offset == size)
-#endif
-#ifdef HAVE_PRE_DECREMENT
- || (INTVAL (XEXP (y, 1)) == - size && offset == - size)
-#endif
- )
+ && ((HAVE_POST_INCREMENT
+ && (INTVAL (XEXP (y, 1)) == size && offset == 0))
+ || (HAVE_POST_DECREMENT
+ && (INTVAL (XEXP (y, 1)) == - size && offset == 0))
+ || (HAVE_PRE_INCREMENT
+ && (INTVAL (XEXP (y, 1)) == size && offset == size))
+ || (HAVE_PRE_DECREMENT
+ && (INTVAL (XEXP (y, 1)) == - size && offset == - size)))
/* Make sure this reg appears only once in this insn. */
&& (use = find_use_as_address (PATTERN (insn), addr, offset),
use != 0 && use != (rtx) 1))
@@ -3021,23 +3015,15 @@ try_pre_increment (insn, reg, amount)
/* From the sign of increment, see which possibilities are conceivable
on this target machine. */
-#ifdef HAVE_PRE_INCREMENT
- if (amount > 0)
+ if (HAVE_PRE_INCREMENT && amount > 0)
pre_ok = 1;
-#endif
-#ifdef HAVE_POST_INCREMENT
- if (amount > 0)
+ if (HAVE_POST_INCREMENT && amount > 0)
post_ok = 1;
-#endif
-#ifdef HAVE_PRE_DECREMENT
- if (amount < 0)
+ if (HAVE_PRE_DECREMENT && amount < 0)
pre_ok = 1;
-#endif
-#ifdef HAVE_POST_DECREMENT
- if (amount < 0)
+ if (HAVE_POST_DECREMENT && amount < 0)
post_ok = 1;
-#endif
if (! (pre_ok || post_ok))
return 0;