Commit 6d4d15b8 by Kaz Kojima

re PR target/35190 (Wrong branch instruction with -freorder-blocks-and-partition on SH)

	PR target/35190
	* config/sh/sh.md (jump_compact): Disable for crossing jumps.

	* config/sh/sh.c (find_barrier): Don't go past
	NOTE_INSN_SWITCH_TEXT_SECTIONS note.

From-SVN: r132502
parent 6d4a8967
2008-02-20 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/35190
* config/sh/sh.md (jump_compact): Disable for crossing jumps.
* config/sh/sh.c (find_barrier): Don't go past
NOTE_INSN_SWITCH_TEXT_SECTIONS note.
2008-02-20 DJ Delorie <dj@redhat.com> 2008-02-20 DJ Delorie <dj@redhat.com>
* config/h8300/h8300.md (insv): Force source operand to be a register. * config/h8300/h8300.md (insv): Force source operand to be a register.
......
...@@ -3897,6 +3897,7 @@ find_barrier (int num_mova, rtx mova, rtx from) ...@@ -3897,6 +3897,7 @@ find_barrier (int num_mova, rtx mova, rtx from)
if (GET_CODE (from) == BARRIER) if (GET_CODE (from) == BARRIER)
{ {
rtx next;
found_barrier = from; found_barrier = from;
...@@ -3905,6 +3906,14 @@ find_barrier (int num_mova, rtx mova, rtx from) ...@@ -3905,6 +3906,14 @@ find_barrier (int num_mova, rtx mova, rtx from)
this kind of barrier. */ this kind of barrier. */
if (barrier_align (from) > 2) if (barrier_align (from) > 2)
good_barrier = from; good_barrier = from;
/* If we are at the end of a hot/cold block, dump the constants
here. */
next = NEXT_INSN (from);
if (next
&& NOTE_P (next)
&& NOTE_KIND (next) == NOTE_INSN_SWITCH_TEXT_SECTIONS)
break;
} }
if (broken_move (from)) if (broken_move (from))
......
...@@ -7378,7 +7378,7 @@ label: ...@@ -7378,7 +7378,7 @@ label:
(define_insn "jump_compact" (define_insn "jump_compact"
[(set (pc) [(set (pc)
(label_ref (match_operand 0 "" "")))] (label_ref (match_operand 0 "" "")))]
"TARGET_SH1" "TARGET_SH1 && !find_reg_note (insn, REG_CROSSING_JUMP, NULL_RTX)"
"* "*
{ {
/* The length is 16 if the delay slot is unfilled. */ /* The length is 16 if the delay slot is unfilled. */
......
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