Commit d1085180 by Brendan Kehoe

alpha.c (output_epilog): Initialize fp_offset to 0, and

        * 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
parent 7644b152
...@@ -1511,7 +1511,7 @@ output_epilog (file, size) ...@@ -1511,7 +1511,7 @@ output_epilog (file, size)
insn = prev_nonnote_insn (insn); insn = prev_nonnote_insn (insn);
if (insn == 0 || GET_CODE (insn) != BARRIER) 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 we have a frame pointer, restore SP from it. */
if (frame_pointer_needed) if (frame_pointer_needed)
...@@ -1558,7 +1558,7 @@ output_epilog (file, size) ...@@ -1558,7 +1558,7 @@ output_epilog (file, size)
/* If we needed a frame pointer and we have to restore it, do it /* If we needed a frame pointer and we have to restore it, do it
now. This must be done in one instruction immediately now. This must be done in one instruction immediately
before the SP update. */ before the SP update. */
if (restore_fp) if (restore_fp && fp_offset)
fprintf (file, "\tldq $15,%d($30)\n", fp_offset); fprintf (file, "\tldq $15,%d($30)\n", fp_offset);
/* Now update the stack pointer, if needed. Only one instruction must /* Now update the stack pointer, if needed. Only one instruction must
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment