aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIgor Shevlyakov <igor@windriver.com>2001-06-03 22:17:11 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2001-06-03 22:17:11 +0000
commit667c49250fe57f73728f51a828c4a6e483bd1b5b (patch)
treefe263a8412f9622fe6753493062d188712bb3a8f /gcc
parent9d4d725bb817be97593d5f5bf345b55ee5e93427 (diff)
downloadgcc-667c49250fe57f73728f51a828c4a6e483bd1b5b.zip
gcc-667c49250fe57f73728f51a828c4a6e483bd1b5b.tar.gz
gcc-667c49250fe57f73728f51a828c4a6e483bd1b5b.tar.bz2
sh.c (output_branch): Support for insn with lenght attr 12 & 16 which represents cond branches...
* config/sh/sh.c (output_branch): Support for insn with lenght attr 12 & 16 which represents cond branches outside +-4096 range. From-SVN: r42835
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/sh/sh.c24
2 files changed, 23 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a563081..a85c01f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-03 Igor Shevlyakov <igor@windriver.com>
+
+ * 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 <aoliva@redhat.com>
* config/sh/lib1funcs.asm (ic_invalidate): Align the
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index e96bba9..9c4924e 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 "";
}