aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2004-12-01 05:47:51 +0000
committerAlan Modra <amodra@gcc.gnu.org>2004-12-01 16:17:51 +1030
commiteab97e449ba769f0a8f4cf5cd69970bbf38de38f (patch)
treecdfc477d8ebb1587643e2f19f4bfc6ffb3ddc44b /gcc
parent683e261713dde5b47a89e2b5f1938807a83a53cd (diff)
downloadgcc-eab97e449ba769f0a8f4cf5cd69970bbf38de38f.zip
gcc-eab97e449ba769f0a8f4cf5cd69970bbf38de38f.tar.gz
gcc-eab97e449ba769f0a8f4cf5cd69970bbf38de38f.tar.bz2
re PR target/12817 ([SYSV] Altivec code generation error with many registers used)
PR target/12817 * config/rs6000/rs6000.c (rs6000_emit_prologue): Use r0 for vrsave. From-SVN: r91553
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dea0491..a703ac9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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-12-01 Joseph S. Myers <joseph@codesourcery.com>
* doc/standards.texi: Update for C99 TC2.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 285996838..d9b363a 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -14030,8 +14030,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));