diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a5630817fc9..a85c01f319a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-06-03 Igor Shevlyakov + + * config/sh/sh.c (output_branch): Support for insn with lenght + attr 12 & 16 which represents cond branches outside +-4096 range. + 2001-06-03 Alexandre Oliva * config/sh/lib1funcs.asm (ic_invalidate): Align the diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index e96bba9a3de..9c4924e53a8 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -799,8 +799,12 @@ output_branch (logic, insn, operands) rtx insn; rtx *operands; { - switch (get_attr_length (insn)) + int len = get_attr_length (insn); + + switch (len) { + case 16: + case 12: case 6: /* This can happen if filling the delay slot has caused a forward branch to exceed its range (we could reverse it, but only @@ -823,16 +827,24 @@ output_branch (logic, insn, operands) if (final_sequence && ! INSN_ANNULLED_BRANCH_P (XVECEXP (final_sequence, 0, 0))) { - asm_fprintf (asm_out_file, "\tb%s%ss\t%LLF%d\n", logic ? "f" : "t", + asm_fprintf (asm_out_file, "\tb%s%ss\t%LLF%d\n", + logic ? "f" : "t", ASSEMBLER_DIALECT ? "/" : ".", label); print_slot (final_sequence); } else - asm_fprintf (asm_out_file, "\tb%s\t%LLF%d\n", logic ? "f" : "t", label); + asm_fprintf (asm_out_file, "\tb%s\t%LLF%d\n", logic ? "f" : "t", + label); - output_asm_insn ("bra\t%l0", &op0); - fprintf (asm_out_file, "\tnop\n"); - ASM_OUTPUT_INTERNAL_LABEL(asm_out_file, "LF", label); + if (len == 6) + { + output_asm_insn ("bra\t%l0", &op0); + fprintf (asm_out_file, "\tnop\n"); + } + else + output_far_jump (insn, op0); + + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "LF", label); return ""; }