This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/30736] stack references scheduled below stack pointer adjustment
- From: "matz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Feb 2007 17:35:18 -0000
- Subject: [Bug target/30736] stack references scheduled below stack pointer adjustment
- References: <bug-30736-12182@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from matz at gcc dot gnu dot org 2007-02-08 17:35 -------
I can't currently attach anything, somehow bugzilla is broken.
Anyway, perhaps the description of what happens is clear enough to see the
error. Btw: this patch will solve the problem on trunk per my proposal:
Index: config/rs6000/rs6000.c
===================================================================
--- config/rs6000/rs6000.c (revision 121710)
+++ config/rs6000/rs6000.c (working copy)
@@ -14112,6 +14112,7 @@ rs6000_emit_stack_tie (void)
rtx mem = gen_frame_mem (BLKmode,
gen_rtx_REG (Pmode, STACK_POINTER_REGNUM));
+ set_mem_alias_set (mem, 0);
emit_insn (gen_stack_tie (mem));
}
@@ -14561,9 +14562,8 @@ rs6000_emit_prologue (void)
|| info->first_fp_reg_save < 64
|| info->first_gp_reg_save < 32
)));
- if (frame_reg_rtx != sp_reg_rtx)
- rs6000_emit_stack_tie ();
}
+ rs6000_emit_stack_tie ();
/* Handle world saves specially here. */
if (WORLD_SAVE_P (info))
@@ -15501,11 +15501,11 @@ rs6000_emit_epilogue (int sibcall)
/* If this is V.4, unwind the stack pointer after all of the loads
have been done. */
+ rs6000_emit_stack_tie ();
if (frame_reg_rtx != sp_reg_rtx)
{
/* This blockage is needed so that sched doesn't decide to move
the sp change before the register restores. */
- rs6000_emit_stack_tie ();
emit_move_insn (sp_reg_rtx, frame_reg_rtx);
}
else if (sp_offset != 0)
-------------------------------------------
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30736