parent
3309111df1
commit
035d61a840
|
@ -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-25 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
|
||||
|
||||
Backport from trunk.
|
||||
|
|
|
@ -4061,6 +4061,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;
|
||||
|
@ -8721,9 +8728,7 @@ sh_insn_length_adjustment (rtx insn)
|
|||
&& GET_CODE (PATTERN (insn)) != USE
|
||||
&& GET_CODE (PATTERN (insn)) != CLOBBER)
|
||||
|| GET_CODE (insn) == CALL_INSN
|
||||
|| (GET_CODE (insn) == JUMP_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;
|
||||
|
@ -8731,9 +8736,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 == CPU_SH2E
|
||||
&& GET_CODE (insn) == JUMP_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…
Reference in New Issue