h8300.c (h8300_output_function_prologue): Remove variable idx.
authorKazu Hirata <kazu@cs.umass.edu>
Mon, 2 Dec 2002 02:02:43 +0000 (02:02 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Mon, 2 Dec 2002 02:02:43 +0000 (02:02 +0000)
* config/h8300/h8300.c (h8300_output_function_prologue):
Remove variable idx.
(h8300_output_function_epilogue): Likewise.

From-SVN: r59703

gcc/ChangeLog
gcc/config/h8300/h8300.c

index 1bb8534360460e11e9c524811957db9ceb255aed..4a7d372619f3f41473f9e60e4735166d6d526146 100644 (file)
@@ -1,3 +1,9 @@
+2002-12-01  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/h8300/h8300.c (h8300_output_function_prologue):
+       Remove variable idx.
+       (h8300_output_function_epilogue): Likewise.
+
 2002-12-01  Zack Weinberg  <zack@codesourcery.com>
 
        * config/frv/xm-frv.h: Delete, unnecessary.
index d94904ec38c2512d7bf1311986e59d709c984c96..84ce43684a072c6d85f8012494cd1c99cc5f510a 100644 (file)
@@ -510,7 +510,7 @@ h8300_output_function_prologue (file, size)
      HOST_WIDE_INT size;
 {
   int fsize = round_frame_size (size);
-  int idx;
+  int regno;
   int saved_regs;
   int n_regs;
 
@@ -580,10 +580,8 @@ h8300_output_function_prologue (file, size)
 
   /* Push the rest of the registers in ascending order.  */
   saved_regs = compute_saved_regs ();
-  for (idx = 0; idx < FIRST_PSEUDO_REGISTER; idx += n_regs)
+  for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno += n_regs)
     {
-      int regno = idx;
-
       n_regs = 1;
       if (saved_regs & (1 << regno))
        {
@@ -621,7 +619,7 @@ h8300_output_function_epilogue (file, size)
      HOST_WIDE_INT size;
 {
   int fsize = round_frame_size (size);
-  int idx;
+  int regno;
   rtx insn = get_last_insn ();
   int saved_regs;
   int n_regs;
@@ -648,10 +646,8 @@ h8300_output_function_epilogue (file, size)
 
   /* Pop the saved registers in descending order.  */
   saved_regs = compute_saved_regs ();
-  for (idx = 0; idx < FIRST_PSEUDO_REGISTER; idx += n_regs)
+  for (regno = FIRST_PSEUDO_REGISTER - 1; regno >= 0; regno -= n_regs)
     {
-      int regno = (FIRST_PSEUDO_REGISTER - 1) - idx;
-
       n_regs = 1;
       if (saved_regs & (1 << regno))
        {