OSDN Git Service

(output_function_{pro,epi}logue): Use lea instead of add.w when
[pf3gnuchains/gcc-fork.git] / gcc / caller-save.c
index 81334f0..ed33ae7 100644 (file)
@@ -182,7 +182,8 @@ init_caller_save ()
          reg_save_code[i][j] = recog_memoized (saveinsn);
          reg_restore_code[i][j] = recog_memoized (restinsn);
 
-         /* Now extract both insns and see if we can meet their constraints. */
+         /* Now extract both insns and see if we can meet their
+             constraints.  */
          ok = (reg_save_code[i][j] != -1 && reg_restore_code[i][j] != -1);
          if (ok)
            {
@@ -307,7 +308,7 @@ setup_save_areas (pchanged)
              ok &= (TEST_HARD_REG_BIT (hard_regs_used, regno) != 0);
            }
 
-       /* We have found an acceptable mode to store in. */
+       /* We have found an acceptable mode to store in.  */
        if (ok)
          {
 
@@ -315,7 +316,7 @@ setup_save_areas (pchanged)
              = assign_stack_local (regno_save_mode[i][j],
                                    GET_MODE_SIZE (regno_save_mode[i][j]), 0);
 
-           /* Setup single word save area just in case... */
+           /* Setup single word save area just in case...  */
            for (k = 0; k < j; k++)
              {
                /* This should not depend on WORDS_BIG_ENDIAN.
@@ -473,7 +474,14 @@ save_call_clobbered_regs (insn_mode)
                      n_regs_saved++;
                }
              else
-               note_stores (PATTERN (insn), set_reg_live);
+               {
+                 note_stores (PATTERN (insn), set_reg_live);
+#ifdef AUTO_INC_DEC
+                 for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
+                   if (REG_NOTE_KIND (link) == REG_INC)
+                     set_reg_live (XEXP (link, 0), NULL_RTX);
+#endif
+               }
 
              for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
                if (REG_NOTE_KIND (link) == REG_UNUSED)