sh.c (output_branch): Delete bogus code.
authorJ"orn Rennecke <amylaar@redhat.com>
Tue, 19 Jun 2001 00:58:29 +0000 (00:58 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Tue, 19 Jun 2001 00:58:29 +0000 (01:58 +0100)
* sh.c (output_branch): Delete bogus code.

* sh.c (initial_elimination_offset):
Fix FROM == RETURN_ADDRESS_POINTER_REGNUM case.

From-SVN: r43450

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

index 13daeb5c49387e68e6e9a6f00015c99592baf4bd..d0e6541ee5757daf66b4cdcaf2dfcfe39cd7c949 100644 (file)
@@ -1,3 +1,10 @@
+Tue Jun 19 01:52:27 2001  J"orn Rennecke <amylaar@redhat.com>
+
+       * sh.c (output_branch): Delete bogus code.
+
+       * sh.c (initial_elimination_offset):
+       Fix FROM == RETURN_ADDRESS_POINTER_REGNUM case.
+
 Mon Jun 18 12:50:49 2001  Jeffrey A Law  (law@cygnus.com)
 
        * flow.c (find_unreachable_blocks): New function.
index 0c18256131ad35feb7ebc2bec39714752d1e9374..8afb976381bdfddc86c61c520f33ccdad428a3e3 100644 (file)
@@ -802,12 +802,8 @@ output_branch (logic, insn, operands)
      rtx insn;
      rtx *operands;
 {
-  int len = get_attr_length (insn);
-
-  switch (len)
+  switch (get_attr_length (insn))
     {
-    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
@@ -830,24 +826,16 @@ 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);
     
-         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);
+         output_asm_insn ("bra\t%l0", &op0);
+         fprintf (asm_out_file, "\tnop\n");
+         ASM_OUTPUT_INTERNAL_LABEL(asm_out_file, "LF", label);
     
          return "";
        }
@@ -856,6 +844,9 @@ output_branch (logic, insn, operands)
     case 2:
       return logic ? "bt%.\t%l0" : "bf%.\t%l0";
     default:
+      /* There should be no longer branches now - that would
+        indicate that something has destroyed the branches set
+        up in machine_dependent_reorg.  */
       abort ();
     }
 }
@@ -4555,13 +4546,7 @@ initial_elimination_offset (from, to)
 
   if (from == RETURN_ADDRESS_POINTER_REGNUM
       && (to == FRAME_POINTER_REGNUM || to == STACK_POINTER_REGNUM))
-    {
-      int i, n = total_saved_regs_space;
-      for (i = PR_REG-1; i >= 0; i--)
-       if (live_regs_mask & (1 << i))
-         n -= 4;
-      return n + total_auto_space;
-    }
+    return UNITS_PER_WORD + total_auto_space;
 
   abort ();
 }