]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/12817 ([SYSV] Altivec code generation error with many registers used)
authorAlan Modra <amodra@bigpond.net.au>
Wed, 1 Dec 2004 05:54:18 +0000 (05:54 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Wed, 1 Dec 2004 05:54:18 +0000 (16:24 +1030)
PR target/12817
* config/rs6000/rs6000.c (rs6000_emit_prologue): Use r0 for vrsave.

From-SVN: r91554

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

index ebd1d81d4730be9fef4125aee2ae06a137f7a457..2dac9c409ad82ebeeb2bab25c57bc071817ca8f2 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-01  Alan Modra  <amodra@bigpond.net.au>
+
+       PR target/12817
+       * config/rs6000/rs6000.c (rs6000_emit_prologue): Use r0 for vrsave.
+
 2004-11-30  Jakub Jelinek  <jakub@redhat.com>
 
        * fold-const.c (extract_muldiv_1) <case ABS_EXPR>: If ctype is
index 197878b573269b52ccf915d096956c2011b1d50d..b3e8fdc1e62dc01e684bcb849ac0d2a7b99bf3cd 100644 (file)
@@ -12109,8 +12109,10 @@ rs6000_emit_prologue (void)
       rtx reg, mem, vrsave;
       int offset;
 
-      /* Get VRSAVE onto a GPR.  */
-      reg = gen_rtx_REG (SImode, 12);
+      /* Get VRSAVE onto a GPR.  Note that ABI_V4 might be using r12
+        as frame_reg_rtx and r11 as the static chain pointer for
+        nested functions.  */
+      reg = gen_rtx_REG (SImode, 0);
       vrsave = gen_rtx_REG (SImode, VRSAVE_REGNO);
       if (TARGET_MACHO)
        emit_insn (gen_get_vrsave_internal (reg));