PR target/35190
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Feb 2008 23:35:41 +0000 (23:35 +0000)
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Feb 2008 23:35:41 +0000 (23:35 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132502 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sh/sh.c
gcc/config/sh/sh.md

index fc400d2..4245df6 100644 (file)
@@ -1,3 +1,11 @@
+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>
 
        * config/h8300/h8300.md (insv): Force source operand to be a register.
index 4088ef7..37abdf6 100644 (file)
@@ -3897,6 +3897,7 @@ find_barrier (int num_mova, rtx mova, rtx from)
 
       if (GET_CODE (from) == BARRIER)
        {
+         rtx next;
 
          found_barrier = from;
 
@@ -3905,6 +3906,14 @@ find_barrier (int num_mova, rtx mova, rtx from)
             this kind of barrier.  */
          if (barrier_align (from) > 2)
            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))
index d7e2727..5a580b5 100644 (file)
@@ -7378,7 +7378,7 @@ label:
 (define_insn "jump_compact"
   [(set (pc)
        (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.  */