alpha.c (output_epilog): Initialize fp_offset to 0, and
authorBrendan Kehoe <brendan@gcc.gnu.org>
Sat, 15 Apr 1995 16:12:24 +0000 (12:12 -0400)
committerBrendan Kehoe <brendan@gcc.gnu.org>
Sat, 15 Apr 1995 16:12:24 +0000 (12:12 -0400)
        * alpha/alpha.c (output_epilog): Initialize fp_offset to 0, and

        make sure it's non-zero before we try to use it to restore the

        frame pointer.

From-SVN: r9388

gcc/config/alpha/alpha.c

index 3de0175..5e7902e 100644 (file)
@@ -1511,7 +1511,7 @@ output_epilog (file, size)
     insn = prev_nonnote_insn (insn);
   if (insn == 0 || GET_CODE (insn) != BARRIER)
     {
-      int fp_offset;
+      int fp_offset = 0;
 
       /* If we have a frame pointer, restore SP from it.  */
       if (frame_pointer_needed)
@@ -1558,7 +1558,7 @@ output_epilog (file, size)
       /* If we needed a frame pointer and we have to restore it, do it
         now.  This must be done in one instruction immediately
         before the SP update.  */
-      if (restore_fp)
+      if (restore_fp && fp_offset)
        fprintf (file, "\tldq $15,%d($30)\n", fp_offset);
 
       /* Now update the stack pointer, if needed.  Only one instruction must