Commit 8a03f869 by Alan Modra Committed by Alan Modra

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
parent 8b07bbe7
2015-05-20 Alan Modra <amodra@gmail.com> 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 * config/rs6000/rs6000.c (rs6000_stack_info): Don't zero offsets
when not saving registers. when not saving registers.
(debug_stack_info): Adjust to omit printing unused offsets, (debug_stack_info): Adjust to omit printing unused offsets,
......
...@@ -155,10 +155,9 @@ typedef struct rs6000_stack { ...@@ -155,10 +155,9 @@ typedef struct rs6000_stack {
int gp_size; /* size of saved GP registers */ int gp_size; /* size of saved GP registers */
int fp_size; /* size of saved FP registers */ int fp_size; /* size of saved FP registers */
int altivec_size; /* size of saved AltiVec registers */ int altivec_size; /* size of saved AltiVec registers */
int cr_size; /* size to hold CR if not in save_size */ int cr_size; /* size to hold CR if not in fixed area */
int vrsave_size; /* size to hold VRSAVE if not in save_size */ int vrsave_size; /* size to hold VRSAVE */
int altivec_padding_size; /* size of altivec alignment padding if int altivec_padding_size; /* size of altivec alignment padding */
not in save_size */
int spe_gp_size; /* size of 64-bit GPR save size for SPE */ int spe_gp_size; /* size of 64-bit GPR save size for SPE */
int spe_padding_size; int spe_padding_size;
HOST_WIDE_INT total_size; /* total bytes allocated for stack */ HOST_WIDE_INT total_size; /* total bytes allocated for stack */
...@@ -5206,7 +5205,7 @@ direct_return (void) ...@@ -5206,7 +5205,7 @@ direct_return (void)
&& info->first_altivec_reg_save == LAST_ALTIVEC_REGNO + 1 && info->first_altivec_reg_save == LAST_ALTIVEC_REGNO + 1
&& ! info->lr_save_p && ! info->lr_save_p
&& ! info->cr_save_p && ! info->cr_save_p
&& info->vrsave_mask == 0 && info->vrsave_size == 0
&& ! info->push_p) && ! info->push_p)
return 1; return 1;
} }
...@@ -23636,7 +23635,7 @@ rs6000_emit_prologue (void) ...@@ -23636,7 +23635,7 @@ rs6000_emit_prologue (void)
|| info->first_fp_reg_save < 64 || info->first_fp_reg_save < 64
|| info->first_gp_reg_save < 32 || info->first_gp_reg_save < 32
|| info->altivec_size != 0 || info->altivec_size != 0
|| info->vrsave_mask != 0 || info->vrsave_size != 0
|| crtl->calls_eh_return) || crtl->calls_eh_return)
ptr_regno = 12; ptr_regno = 12;
else else
...@@ -24184,7 +24183,7 @@ rs6000_emit_prologue (void) ...@@ -24184,7 +24183,7 @@ rs6000_emit_prologue (void)
/* Save AltiVec registers if needed. Save here because the red zone does /* Save AltiVec registers if needed. Save here because the red zone does
not always include AltiVec registers. */ 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) && info->altivec_size != 0 && (strategy & SAVE_INLINE_VRS) == 0)
{ {
int end_save = info->altivec_save_offset + info->altivec_size; int end_save = info->altivec_save_offset + info->altivec_size;
...@@ -24220,7 +24219,7 @@ rs6000_emit_prologue (void) ...@@ -24220,7 +24219,7 @@ rs6000_emit_prologue (void)
frame_off = ptr_off; frame_off = ptr_off;
} }
} }
else if (!WORLD_SAVE_P (info) && TARGET_ALTIVEC_ABI else if (!WORLD_SAVE_P (info)
&& info->altivec_size != 0) && info->altivec_size != 0)
{ {
int i; int i;
...@@ -24262,9 +24261,7 @@ rs6000_emit_prologue (void) ...@@ -24262,9 +24261,7 @@ rs6000_emit_prologue (void)
epilogue. */ epilogue. */
if (!WORLD_SAVE_P (info) if (!WORLD_SAVE_P (info)
&& TARGET_ALTIVEC && info->vrsave_size != 0)
&& TARGET_ALTIVEC_VRSAVE
&& info->vrsave_mask != 0)
{ {
rtx reg, vrsave; rtx reg, vrsave;
int offset; int offset;
...@@ -24826,8 +24823,7 @@ rs6000_emit_epilogue (int sibcall) ...@@ -24826,8 +24823,7 @@ rs6000_emit_epilogue (int sibcall)
/* Restore AltiVec registers if we must do so before adjusting the /* Restore AltiVec registers if we must do so before adjusting the
stack. */ stack. */
if (TARGET_ALTIVEC_ABI if (info->altivec_size != 0
&& info->altivec_size != 0
&& (ALWAYS_RESTORE_ALTIVEC_BEFORE_POP && (ALWAYS_RESTORE_ALTIVEC_BEFORE_POP
|| (DEFAULT_ABI != ABI_V4 || (DEFAULT_ABI != ABI_V4
&& offset_below_red_zone_p (info->altivec_save_offset)))) && offset_below_red_zone_p (info->altivec_save_offset))))
...@@ -24914,9 +24910,7 @@ rs6000_emit_epilogue (int sibcall) ...@@ -24914,9 +24910,7 @@ rs6000_emit_epilogue (int sibcall)
} }
/* Restore VRSAVE if we must do so before adjusting the stack. */ /* Restore VRSAVE if we must do so before adjusting the stack. */
if (TARGET_ALTIVEC if (info->vrsave_size != 0
&& TARGET_ALTIVEC_VRSAVE
&& info->vrsave_mask != 0
&& (ALWAYS_RESTORE_ALTIVEC_BEFORE_POP && (ALWAYS_RESTORE_ALTIVEC_BEFORE_POP
|| (DEFAULT_ABI != ABI_V4 || (DEFAULT_ABI != ABI_V4
&& offset_below_red_zone_p (info->vrsave_save_offset)))) && offset_below_red_zone_p (info->vrsave_save_offset))))
...@@ -25010,7 +25004,6 @@ rs6000_emit_epilogue (int sibcall) ...@@ -25010,7 +25004,6 @@ rs6000_emit_epilogue (int sibcall)
/* Restore AltiVec registers if we have not done so already. */ /* Restore AltiVec registers if we have not done so already. */
if (!ALWAYS_RESTORE_ALTIVEC_BEFORE_POP if (!ALWAYS_RESTORE_ALTIVEC_BEFORE_POP
&& TARGET_ALTIVEC_ABI
&& info->altivec_size != 0 && info->altivec_size != 0
&& (DEFAULT_ABI == ABI_V4 && (DEFAULT_ABI == ABI_V4
|| !offset_below_red_zone_p (info->altivec_save_offset))) || !offset_below_red_zone_p (info->altivec_save_offset)))
...@@ -25118,9 +25111,7 @@ rs6000_emit_epilogue (int sibcall) ...@@ -25118,9 +25111,7 @@ rs6000_emit_epilogue (int sibcall)
/* Restore VRSAVE if we have not done so already. */ /* Restore VRSAVE if we have not done so already. */
if (!ALWAYS_RESTORE_ALTIVEC_BEFORE_POP if (!ALWAYS_RESTORE_ALTIVEC_BEFORE_POP
&& TARGET_ALTIVEC && info->vrsave_size != 0
&& TARGET_ALTIVEC_VRSAVE
&& info->vrsave_mask != 0
&& (DEFAULT_ABI == ABI_V4 && (DEFAULT_ABI == ABI_V4
|| !offset_below_red_zone_p (info->vrsave_save_offset))) || !offset_below_red_zone_p (info->vrsave_save_offset)))
{ {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment