* config/rs6000/rs6000.c (rs6000_emit_prologue): Always clobber LR
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 25 Mar 2007 12:44:40 +0000 (12:44 +0000)
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 25 Mar 2007 12:44:40 +0000 (12:44 +0000)
        in SImode for save_world.
        * config/rs6000/altivec.md (save_world, restore_world): Convert to
        LR hard reg.

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

gcc/ChangeLog
gcc/config/rs6000/altivec.md
gcc/config/rs6000/rs6000.c

index fa1e4b3..6f2c3dc 100644 (file)
@@ -1,3 +1,10 @@
+2007-03-25  David Edelsohn  <edelsohn@gnu.org>
+
+       * config/rs6000/rs6000.c (rs6000_emit_prologue): Always clobber LR
+       in SImode for save_world.
+       * config/rs6000/altivec.md (save_world, restore_world): Convert to
+       LR hard reg.
+
 2007-03-25  Dorit Nuzman  <dorit@il.ibm.com>
 
        PR tree-optimization/30784
index 072e813..1c1d6a6 100644 (file)
 
 (define_insn "*save_world"
  [(match_parallel 0 "save_world_operation"
-                  [(clobber (match_operand:SI 1 "register_operand" "=l"))
-                   (use (match_operand:SI 2 "call_operand" "s"))])]
+                  [(clobber (reg:SI 65))
+                   (use (match_operand:SI 1 "call_operand" "s"))])]
  "TARGET_MACHO && (DEFAULT_ABI == ABI_DARWIN) && TARGET_32BIT"         
- "bl %z2"
+ "bl %z1"
   [(set_attr "type" "branch")
    (set_attr "length" "4")])
 
  [(match_parallel 0 "restore_world_operation"
                   [(return)
                   (use (reg:SI 65))
-                   (use (match_operand:SI 2 "call_operand" "s"))
-                   (clobber (match_operand:SI 3 "gpc_reg_operand" "=r"))])]
+                   (use (match_operand:SI 1 "call_operand" "s"))
+                   (clobber (match_operand:SI 2 "gpc_reg_operand" "=r"))])]
  "TARGET_MACHO && (DEFAULT_ABI == ABI_DARWIN) && TARGET_32BIT"
- "b %z2")
+ "b %z1")
 
 ;; Simple binary operations.
 
index 51ee7c0..43ee19e 100644 (file)
@@ -14727,7 +14727,7 @@ rs6000_emit_prologue (void)
       p = rtvec_alloc (sz);
       j = 0;
       RTVEC_ELT (p, j++) = gen_rtx_CLOBBER (VOIDmode,
-                                           gen_rtx_REG (Pmode,
+                                           gen_rtx_REG (SImode,
                                                         LINK_REGISTER_REGNUM));
       RTVEC_ELT (p, j++) = gen_rtx_USE (VOIDmode,
                                        gen_rtx_SYMBOL_REF (Pmode,