OSDN Git Service

* config/sh/sh.c (output_branch): Support for insn with lenght
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 3 Jun 2001 22:17:11 +0000 (22:17 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 3 Jun 2001 22:17:11 +0000 (22:17 +0000)
attr 12 & 16 which represents cond branches outside +-4096 range.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42835 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sh/sh.c

index a563081..a85c01f 100644 (file)
@@ -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
index e96bba9..9c4924e 100644 (file)
@@ -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 "";
        }