fix PR target/42841
From-SVN: r156229
This commit is contained in:
parent
79b754d47f
commit
69b1816394
2 changed files with 16 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
2010-01-25 Christian Bruel <christian.bruel@st.com>
|
||||
|
||||
PR target/42841
|
||||
* config/sh/sh.c (find_barrier): Increase length for non delayed
|
||||
conditional branches.
|
||||
(sh_insn_length_adjustment): Use JUMP_TABLE_DATA_P.
|
||||
|
||||
2010-01-24 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* gcc/config/sparc/sysv4.h (TARGET_ASM_NAMED_SECTION): Only
|
||||
|
|
|
@ -4567,6 +4567,13 @@ find_barrier (int num_mova, rtx mova, rtx from)
|
|||
&& ! TARGET_SMALLCODE)
|
||||
new_align = 4;
|
||||
|
||||
/* There is a possibility that a bf is transformed into a bf/s by the
|
||||
delay slot scheduler. */
|
||||
if (JUMP_P (from) && !JUMP_TABLE_DATA_P (from)
|
||||
&& get_attr_type (from) == TYPE_CBRANCH
|
||||
&& GET_CODE (PATTERN (NEXT_INSN (PREV_INSN (from)))) != SEQUENCE)
|
||||
inc += 2;
|
||||
|
||||
if (found_si)
|
||||
{
|
||||
count_si += inc;
|
||||
|
@ -9271,9 +9278,7 @@ sh_insn_length_adjustment (rtx insn)
|
|||
&& GET_CODE (PATTERN (insn)) != USE
|
||||
&& GET_CODE (PATTERN (insn)) != CLOBBER)
|
||||
|| CALL_P (insn)
|
||||
|| (JUMP_P (insn)
|
||||
&& GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC
|
||||
&& GET_CODE (PATTERN (insn)) != ADDR_VEC))
|
||||
|| (JUMP_P (insn) && !JUMP_TABLE_DATA_P (insn)))
|
||||
&& GET_CODE (PATTERN (NEXT_INSN (PREV_INSN (insn)))) != SEQUENCE
|
||||
&& get_attr_needs_delay_slot (insn) == NEEDS_DELAY_SLOT_YES)
|
||||
return 2;
|
||||
|
@ -9281,9 +9286,7 @@ sh_insn_length_adjustment (rtx insn)
|
|||
/* SH2e has a bug that prevents the use of annulled branches, so if
|
||||
the delay slot is not filled, we'll have to put a NOP in it. */
|
||||
if (sh_cpu_attr == CPU_SH2E
|
||||
&& JUMP_P (insn)
|
||||
&& GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC
|
||||
&& GET_CODE (PATTERN (insn)) != ADDR_VEC
|
||||
&& JUMP_P (insn) && !JUMP_TABLE_DATA_P (insn)
|
||||
&& get_attr_type (insn) == TYPE_CBRANCH
|
||||
&& GET_CODE (PATTERN (NEXT_INSN (PREV_INSN (insn)))) != SEQUENCE)
|
||||
return 2;
|
||||
|
|
Loading…
Add table
Reference in a new issue