summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-20 23:35:41 +0000
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-20 23:35:41 +0000
commitaf122d602c0ecd2825c50fc524bb61c728d3696d (patch)
tree2b8423988dd7fed125f9f5a16fc721ca364b17f3
parent610e569becf6adb4123234ee3c128972f0298023 (diff)
downloadgcc-af122d602c0ecd2825c50fc524bb61c728d3696d.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132502 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/sh/sh.c9
-rw-r--r--gcc/config/sh/sh.md2
3 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fc400d26ae5..4245df642f1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 4088ef73cdf..37abdf6ae49 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -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))
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index d7e2727adac..5a580b517cd 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -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. */