rs6000.c (struct rs6000_stack): Correct comments.

* 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.

From-SVN: r223425
This commit is contained in:
Alan Modra 2015-05-20 10:47:45 +09:30 committed by Alan Modra
parent 8b07bbe71b
commit 8a03f86937
2 changed files with 21 additions and 20 deletions

View File

@ -1,3 +1,13 @@
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

View File

@ -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)))
{