OSDN Git Service

PR target/33812
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 Oct 2007 13:11:14 +0000 (13:11 +0000)
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 Oct 2007 13:11:14 +0000 (13:11 +0000)
* config/rs6000/rs6000.c (rs6000_emit_epilogue): Revert 2007-05-16
change for vrsave, ie restore after frame pop.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129511 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 2b16d94..0c7b102 100644 (file)
@@ -1,3 +1,9 @@
+2007-10-20  Alan Modra  <amodra@bigpond.net.au>
+
+       PR target/33812
+       * config/rs6000/rs6000.c (rs6000_emit_epilogue): Revert 2007-05-16
+       change for vrsave, ie restore after frame pop.
+
 2007-10-19  David S. Miller  <davem@davemloft.net>
 
        * config/sparc/niagara2.md: Fix copyright notice.
index 0415e44..024eda7 100644 (file)
@@ -16082,21 +16082,6 @@ rs6000_emit_epilogue (int sibcall)
          }
     }
 
-  /* Restore VRSAVE if needed.  */
-  if (TARGET_ALTIVEC && TARGET_ALTIVEC_VRSAVE
-      && info->vrsave_mask != 0)
-    {
-      rtx addr, mem, reg;
-
-      addr = gen_rtx_PLUS (Pmode, frame_reg_rtx,
-                          GEN_INT (info->vrsave_save_offset + sp_offset));
-      mem = gen_frame_mem (SImode, addr);
-      reg = gen_rtx_REG (SImode, 12);
-      emit_move_insn (reg, mem);
-
-      emit_insn (generate_set_vrsave (reg, info, 1));
-    }
-
   /* If we have a frame pointer, a call to alloca,  or a large stack
      frame, restore the old stack pointer using the backchain.  Otherwise,
      we know what size to update it with.  */
@@ -16123,6 +16108,21 @@ rs6000_emit_epilogue (int sibcall)
       sp_offset = 0;
     }
 
+  /* Restore VRSAVE if needed.  */
+  if (TARGET_ALTIVEC && TARGET_ALTIVEC_VRSAVE
+      && info->vrsave_mask != 0)
+    {
+      rtx addr, mem, reg;
+
+      addr = gen_rtx_PLUS (Pmode, frame_reg_rtx,
+                          GEN_INT (info->vrsave_save_offset + sp_offset));
+      mem = gen_frame_mem (SImode, addr);
+      reg = gen_rtx_REG (SImode, 12);
+      emit_move_insn (reg, mem);
+
+      emit_insn (generate_set_vrsave (reg, info, 1));
+    }
+
   /* Get the old lr if we saved it.  */
   if (info->lr_save_p)
     {