* [4.4 patch committed] Fix PR target/35190
@ 2008-02-20 23:52 Kaz Kojima
0 siblings, 0 replies; only message in thread
From: Kaz Kojima @ 2008-02-20 23:52 UTC (permalink / raw)
To: gcc-patches
Hi,
I've applied the attached patch on trunk. The first hunk is
to fix PR target/35190 with disabling jump_compact insn for
crossing jumps. The second part is for the other back end
problem when -freorder-blocks-and-partition is specified and
makes sh.c:find_constant take into count partitioning hot/cold
blocks. Tested with bootstrap and the top level "make -k check"
on sh4-unknown-linux-gnu with no new failures.
Regards,
kaz
--
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.
diff -uprN ORIG/trunk/gcc/config/sh/sh.c LOCAL/trunk/gcc/config/sh/sh.c
--- ORIG/trunk/gcc/config/sh/sh.c 2007-12-07 09:11:38.000000000 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.c 2008-02-13 11:58:15.000000000 +0900
@@ -3897,6 +3897,7 @@ find_barrier (int num_mova, rtx mova, rt
if (GET_CODE (from) == BARRIER)
{
+ rtx next;
found_barrier = from;
@@ -3905,8 +3906,16 @@ find_barrier (int num_mova, rtx mova, rt
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 -uprN ORIG/trunk/gcc/config/sh/sh.md LOCAL/trunk/gcc/config/sh/sh.md
--- ORIG/trunk/gcc/config/sh/sh.md 2007-12-03 09:27:44.000000000 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.md 2008-02-16 09:26:29.000000000 +0900
@@ -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. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-20 23:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-20 23:52 [4.4 patch committed] Fix PR target/35190 Kaz Kojima
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).