+2008-02-20 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR target/35225
+ * config/sh/sh.c (find_barrier): Don't go past 'from' argument.
+
2008-02-20 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/35190
rtx barrier_before_mova = 0, found_barrier = 0, good_barrier = 0;
int si_limit;
int hi_limit;
+ rtx orig = from;
/* For HImode: range is 510, add 4 because pc counts from address of
second instruction after this one, subtract 2 for the jump instruction
/* If we exceeded the range, then we must back up over the last
instruction we looked at. Otherwise, we just need to undo the
NEXT_INSN at the end of the loop. */
- if (count_hi > hi_limit || count_si > si_limit)
+ if (PREV_INSN (from) != orig
+ && (count_hi > hi_limit || count_si > si_limit))
from = PREV_INSN (PREV_INSN (from));
else
from = PREV_INSN (from);