Commit 17a3dae3 by Bernd Schmidt Committed by Bernd Schmidt

re PR bootstrap/50621 (Bootstrap failure)

	PR bootstrap/50621
	* config/i386/i386.c (ix86_add_cfa_restore_note): Omit notes only
	if the function was not shrink-wrapped.
	(ix86_expand_epilogue): Ensure queued cfa_adjust notes are attached
	to an insn.
	* function.c (thread_prologue_and_epilogue_insns): Make sure the
	shrink_wrapped flag is set even if there is no dump file.

From-SVN: r179560
parent 878a9174
2011-10-05 Bernd Schmidt <bernds@codesourcery.com>
PR bootstrap/50621
* config/i386/i386.c (ix86_add_cfa_restore_note): Omit notes only
if the function was not shrink-wrapped.
(ix86_expand_epilogue): Ensure queued cfa_adjust notes are attached
to an insn.
* function.c (thread_prologue_and_epilogue_insns): Make sure the
shrink_wrapped flag is set even if there is no dump file.
2011-10-05 DJ Delorie <dj@redhat.com> 2011-10-05 DJ Delorie <dj@redhat.com>
Nick Clifton <nickc@redhat.com> Nick Clifton <nickc@redhat.com>
...@@ -9134,7 +9134,8 @@ static GTY(()) rtx queued_cfa_restores; ...@@ -9134,7 +9134,8 @@ static GTY(()) rtx queued_cfa_restores;
static void static void
ix86_add_cfa_restore_note (rtx insn, rtx reg, HOST_WIDE_INT cfa_offset) ix86_add_cfa_restore_note (rtx insn, rtx reg, HOST_WIDE_INT cfa_offset)
{ {
if (cfa_offset <= cfun->machine->fs.red_zone_offset) if (!crtl->shrink_wrapped
&& cfa_offset <= cfun->machine->fs.red_zone_offset)
return; return;
if (insn) if (insn)
...@@ -10738,6 +10739,8 @@ ix86_expand_epilogue (int style) ...@@ -10738,6 +10739,8 @@ ix86_expand_epilogue (int style)
GEN_INT (m->fs.sp_offset - UNITS_PER_WORD), GEN_INT (m->fs.sp_offset - UNITS_PER_WORD),
style, true); style, true);
} }
else
ix86_add_queued_cfa_restore_notes (get_last_insn ());
/* Sibcall epilogues don't want a return instruction. */ /* Sibcall epilogues don't want a return instruction. */
if (style == 0) if (style == 0)
...@@ -5741,10 +5741,11 @@ thread_prologue_and_epilogue_insns (void) ...@@ -5741,10 +5741,11 @@ thread_prologue_and_epilogue_insns (void)
if (dump_file) if (dump_file)
fprintf (dump_file, "Shrink-wrapping aborted due to clobber.\n"); fprintf (dump_file, "Shrink-wrapping aborted due to clobber.\n");
} }
else if (dump_file && entry_edge != orig_entry_edge) else if (entry_edge != orig_entry_edge)
{ {
crtl->shrink_wrapped = true; crtl->shrink_wrapped = true;
fprintf (dump_file, "Performing shrink-wrapping.\n"); if (dump_file)
fprintf (dump_file, "Performing shrink-wrapping.\n");
} }
fail_shrinkwrap: fail_shrinkwrap:
......
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