[Bug target/30736] stack references scheduled below stack pointer adjustment

2007-02-08 Thread matz 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



[Bug target/30736] stack references scheduled below stack pointer adjustment

2007-02-08 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2007-02-08 19:17 ---


*** This bug has been marked as a duplicate of 30282 ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30736