aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHartmut Penner <hpenner@de.ibm.com>2004-01-14 10:57:40 +0000
committerHartmut Penner <hpenner@gcc.gnu.org>2004-01-14 10:57:40 +0000
commit4d774ff8d544c14945c611d1f1bde6f8ceafb509 (patch)
tree0cb5b021f679a40d29821d7139ddf9ec3dec383d /gcc
parentfa1090f542af56078c8881a3b034ab60551fac4b (diff)
downloadgcc-4d774ff8d544c14945c611d1f1bde6f8ceafb509.zip
gcc-4d774ff8d544c14945c611d1f1bde6f8ceafb509.tar.gz
gcc-4d774ff8d544c14945c611d1f1bde6f8ceafb509.tar.bz2
* gcc/config/rs6000/rs6000.c (rs6000_stack_info)
Calculate always vrsave_mask if TARGET_ALTIVEC. (rs6000_emit_prologue): Emit code for vrsave only if TARGET_ALTIVEC_VRSAVE. (rs6000_emit_epilogue): Likewise. From-SVN: r75857
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/rs6000/rs6000.c23
2 files changed, 20 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 06b4851..c2e5a06 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2004-01-14 Hartmut Penner <hpenner@de.ibm.com>
+
+ * gcc/config/rs6000/rs6000.c (rs6000_stack_info)
+ Calculate always vrsave_mask if TARGET_ALTIVEC.
+ (rs6000_emit_prologue): Emit code for vrsave
+ only if TARGET_ALTIVEC_VRSAVE.
+ (rs6000_emit_epilogue): Likewise.
+
2004-01-14 Eric Botcazou <ebotcazou@libertysurf.fr>
* config/sparc/sparc.md (tie_add32): Fix pasto.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 5f24cf8..2abd380 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -10508,16 +10508,15 @@ rs6000_stack_info (void)
else
info_ptr->spe_gp_size = 0;
- if (TARGET_ALTIVEC_ABI && TARGET_ALTIVEC_VRSAVE)
- {
- info_ptr->vrsave_mask = compute_vrsave_mask ();
- info_ptr->vrsave_size = info_ptr->vrsave_mask ? 4 : 0;
- }
+ if (TARGET_ALTIVEC_ABI)
+ info_ptr->vrsave_mask = compute_vrsave_mask ();
else
- {
- info_ptr->vrsave_mask = 0;
- info_ptr->vrsave_size = 0;
- }
+ info_ptr->vrsave_mask = 0;
+
+ if (TARGET_ALTIVEC_VRSAVE && info_ptr->vrsave_mask)
+ info_ptr->vrsave_size = 4;
+ else
+ info_ptr->vrsave_size = 0;
/* Calculate the offsets. */
switch (DEFAULT_ABI)
@@ -11679,7 +11678,8 @@ rs6000_emit_prologue (void)
used in this function, and do the corresponding magic in the
epilogue. */
- if (TARGET_ALTIVEC && info->vrsave_mask != 0)
+ if (TARGET_ALTIVEC && TARGET_ALTIVEC_VRSAVE
+ && info->vrsave_mask != 0)
{
rtx reg, mem, vrsave;
int offset;
@@ -12141,7 +12141,8 @@ rs6000_emit_epilogue (int sibcall)
}
/* Restore VRSAVE if needed. */
- if (TARGET_ALTIVEC_ABI && info->vrsave_mask != 0)
+ if (TARGET_ALTIVEC_ABI && TARGET_ALTIVEC_VRSAVE
+ && info->vrsave_mask != 0)
{
rtx addr, mem, reg;