aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/rs6000/rs6000.c31
2 files changed, 21 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5fa48fa..56b028d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,15 @@
2015-05-20 Alan Modra <amodra@gmail.com>
+ * config/rs6000/rs6000.c (struct rs6000_stack): Correct comments.
+ (rs6000_stack_info): Don't zero offsets when not saving registers.
+ (debug_stack_info): Adjust to omit printing unused offsets,
+ as before.
+ (direct_return): Test vrsave_size rather than vrsave_mask.
+ (rs6000_emit_prologue): Likewise. Remove redundant altivec tests.
+ (rs6000_emit_epilogue): Likewise.
+
+2015-05-20 Alan Modra <amodra@gmail.com>
+
* config/rs6000/rs6000.c (rs6000_stack_info): Don't zero offsets
when not saving registers.
(debug_stack_info): Adjust to omit printing unused offsets,
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 488799e..92ebd82 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -155,10 +155,9 @@ typedef struct rs6000_stack {
int gp_size; /* size of saved GP registers */
int fp_size; /* size of saved FP registers */
int altivec_size; /* size of saved AltiVec registers */
- int cr_size; /* size to hold CR if not in save_size */
- int vrsave_size; /* size to hold VRSAVE if not in save_size */
- int altivec_padding_size; /* size of altivec alignment padding if
- not in save_size */
+ int cr_size; /* size to hold CR if not in fixed area */
+ int vrsave_size; /* size to hold VRSAVE */
+ int altivec_padding_size; /* size of altivec alignment padding */
int spe_gp_size; /* size of 64-bit GPR save size for SPE */
int spe_padding_size;
HOST_WIDE_INT total_size; /* total bytes allocated for stack */
@@ -5206,7 +5205,7 @@ direct_return (void)
&& info->first_altivec_reg_save == LAST_ALTIVEC_REGNO + 1
&& ! info->lr_save_p
&& ! info->cr_save_p
- && info->vrsave_mask == 0
+ && info->vrsave_size == 0
&& ! info->push_p)
return 1;
}
@@ -23636,7 +23635,7 @@ rs6000_emit_prologue (void)
|| info->first_fp_reg_save < 64
|| info->first_gp_reg_save < 32
|| info->altivec_size != 0
- || info->vrsave_mask != 0
+ || info->vrsave_size != 0
|| crtl->calls_eh_return)
ptr_regno = 12;
else
@@ -24184,7 +24183,7 @@ rs6000_emit_prologue (void)
/* Save AltiVec registers if needed. Save here because the red zone does
not always include AltiVec registers. */
- if (!WORLD_SAVE_P (info) && TARGET_ALTIVEC_ABI
+ if (!WORLD_SAVE_P (info)
&& info->altivec_size != 0 && (strategy & SAVE_INLINE_VRS) == 0)
{
int end_save = info->altivec_save_offset + info->altivec_size;
@@ -24220,7 +24219,7 @@ rs6000_emit_prologue (void)
frame_off = ptr_off;
}
}
- else if (!WORLD_SAVE_P (info) && TARGET_ALTIVEC_ABI
+ else if (!WORLD_SAVE_P (info)
&& info->altivec_size != 0)
{
int i;
@@ -24262,9 +24261,7 @@ rs6000_emit_prologue (void)
epilogue. */
if (!WORLD_SAVE_P (info)
- && TARGET_ALTIVEC
- && TARGET_ALTIVEC_VRSAVE
- && info->vrsave_mask != 0)
+ && info->vrsave_size != 0)
{
rtx reg, vrsave;
int offset;
@@ -24826,8 +24823,7 @@ rs6000_emit_epilogue (int sibcall)
/* Restore AltiVec registers if we must do so before adjusting the
stack. */
- if (TARGET_ALTIVEC_ABI
- && info->altivec_size != 0
+ if (info->altivec_size != 0
&& (ALWAYS_RESTORE_ALTIVEC_BEFORE_POP
|| (DEFAULT_ABI != ABI_V4
&& offset_below_red_zone_p (info->altivec_save_offset))))
@@ -24914,9 +24910,7 @@ rs6000_emit_epilogue (int sibcall)
}
/* Restore VRSAVE if we must do so before adjusting the stack. */
- if (TARGET_ALTIVEC
- && TARGET_ALTIVEC_VRSAVE
- && info->vrsave_mask != 0
+ if (info->vrsave_size != 0
&& (ALWAYS_RESTORE_ALTIVEC_BEFORE_POP
|| (DEFAULT_ABI != ABI_V4
&& offset_below_red_zone_p (info->vrsave_save_offset))))
@@ -25010,7 +25004,6 @@ rs6000_emit_epilogue (int sibcall)
/* Restore AltiVec registers if we have not done so already. */
if (!ALWAYS_RESTORE_ALTIVEC_BEFORE_POP
- && TARGET_ALTIVEC_ABI
&& info->altivec_size != 0
&& (DEFAULT_ABI == ABI_V4
|| !offset_below_red_zone_p (info->altivec_save_offset)))
@@ -25118,9 +25111,7 @@ rs6000_emit_epilogue (int sibcall)
/* Restore VRSAVE if we have not done so already. */
if (!ALWAYS_RESTORE_ALTIVEC_BEFORE_POP
- && TARGET_ALTIVEC
- && TARGET_ALTIVEC_VRSAVE
- && info->vrsave_mask != 0
+ && info->vrsave_size != 0
&& (DEFAULT_ABI == ABI_V4
|| !offset_below_red_zone_p (info->vrsave_save_offset)))
{