Commit c457f751 by Chung-Ju Wu Committed by Chung-Ju Wu

[NDS32] Rename some variables so that we can clearly identify they represent…

[NDS32] Rename some variables so that we can clearly identify they represent general purpose registers.

gcc/
	* config/nds32/nds32.h (callee_saved_regs_size): Rename to ...
	(callee_saved_gpr_regs_size): ... this.
	(callee_saved_regs_first_regno): Rename to ...
	(callee_saved_first_gpr_regno): ... this.
	(callee_saved_regs_last_regno) Rename to ...
	(callee_saved_last_gpr_regno): ... this.
	* config/nds32/nds32.c (nds32_compute_stack_frame): Adjust renamed
	variables.
	(nds32_initial_elimination_offset): Likewise.
	(nds32_expand_prologue): Likewise.
	(nds32_expand_epilogue): Likewise.
	(nds32_expand_prologue_v3push): Likewise.
	(nds32_expand_epilogue_v3pop): Likewise.
	* config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push):
	Adjust renamed variables.
	(nds32_output_stack_pop): Likewise.

From-SVN: r221306
parent 6cf6683f
2015-03-10 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h (callee_saved_regs_size): Rename to ...
(callee_saved_gpr_regs_size): ... this.
(callee_saved_regs_first_regno): Rename to ...
(callee_saved_first_gpr_regno): ... this.
(callee_saved_regs_last_regno) Rename to ...
(callee_saved_last_gpr_regno): ... this.
* config/nds32/nds32.c (nds32_compute_stack_frame): Adjust renamed
variables.
(nds32_initial_elimination_offset): Likewise.
(nds32_expand_prologue): Likewise.
(nds32_expand_epilogue): Likewise.
(nds32_expand_prologue_v3push): Likewise.
(nds32_expand_epilogue_v3pop): Likewise.
* config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push):
Adjust renamed variables.
(nds32_output_stack_pop): Likewise.
2015-03-10 Thomas Preud'homme <thomas.preudhomme@arm.com> 2015-03-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
* dominance.c (nearest_common_dominator_for_set): Fix A_Dominated_by_B * dominance.c (nearest_common_dominator_for_set): Fix A_Dominated_by_B
......
...@@ -604,8 +604,8 @@ nds32_output_stack_push (rtx par_rtx) ...@@ -604,8 +604,8 @@ nds32_output_stack_push (rtx par_rtx)
+ NDS32_MAX_GPR_REGS_FOR_ARGS + NDS32_MAX_GPR_REGS_FOR_ARGS
- 1; - 1;
/* Pick up callee-saved first regno and last regno for further use. */ /* Pick up callee-saved first regno and last regno for further use. */
int rb_callee_saved = cfun->machine->callee_saved_regs_first_regno; int rb_callee_saved = cfun->machine->callee_saved_first_gpr_regno;
int re_callee_saved = cfun->machine->callee_saved_regs_last_regno; int re_callee_saved = cfun->machine->callee_saved_last_gpr_regno;
/* First we need to check if we are pushing argument registers not used /* First we need to check if we are pushing argument registers not used
for the named arguments. If so, we have to create 'smw.adm' (push.s) for the named arguments. If so, we have to create 'smw.adm' (push.s)
...@@ -644,7 +644,7 @@ nds32_output_stack_push (rtx par_rtx) ...@@ -644,7 +644,7 @@ nds32_output_stack_push (rtx par_rtx)
otherwise, generate 'push25 Re,0'. */ otherwise, generate 'push25 Re,0'. */
sp_adjust = cfun->machine->local_size sp_adjust = cfun->machine->local_size
+ cfun->machine->out_args_size + cfun->machine->out_args_size
+ cfun->machine->callee_saved_area_padding_bytes; + cfun->machine->callee_saved_area_gpr_padding_bytes;
if (satisfies_constraint_Iu08 (GEN_INT (sp_adjust)) if (satisfies_constraint_Iu08 (GEN_INT (sp_adjust))
&& NDS32_DOUBLE_WORD_ALIGN_P (sp_adjust)) && NDS32_DOUBLE_WORD_ALIGN_P (sp_adjust))
operands[1] = GEN_INT (sp_adjust); operands[1] = GEN_INT (sp_adjust);
...@@ -712,8 +712,8 @@ nds32_output_stack_pop (rtx par_rtx ATTRIBUTE_UNUSED) ...@@ -712,8 +712,8 @@ nds32_output_stack_pop (rtx par_rtx ATTRIBUTE_UNUSED)
/* The operands array which will be used in output_asm_insn(). */ /* The operands array which will be used in output_asm_insn(). */
rtx operands[3]; rtx operands[3];
/* Pick up callee-saved first regno and last regno for further use. */ /* Pick up callee-saved first regno and last regno for further use. */
int rb_callee_saved = cfun->machine->callee_saved_regs_first_regno; int rb_callee_saved = cfun->machine->callee_saved_first_gpr_regno;
int re_callee_saved = cfun->machine->callee_saved_regs_last_regno; int re_callee_saved = cfun->machine->callee_saved_last_gpr_regno;
/* If we step here, we are going to do v3pop or multiple pop operation. */ /* If we step here, we are going to do v3pop or multiple pop operation. */
...@@ -742,7 +742,7 @@ nds32_output_stack_pop (rtx par_rtx ATTRIBUTE_UNUSED) ...@@ -742,7 +742,7 @@ nds32_output_stack_pop (rtx par_rtx ATTRIBUTE_UNUSED)
and then use 'pop25 Re,0'. */ and then use 'pop25 Re,0'. */
sp_adjust = cfun->machine->local_size sp_adjust = cfun->machine->local_size
+ cfun->machine->out_args_size + cfun->machine->out_args_size
+ cfun->machine->callee_saved_area_padding_bytes; + cfun->machine->callee_saved_area_gpr_padding_bytes;
if (satisfies_constraint_Iu08 (GEN_INT (sp_adjust)) if (satisfies_constraint_Iu08 (GEN_INT (sp_adjust))
&& NDS32_DOUBLE_WORD_ALIGN_P (sp_adjust) && NDS32_DOUBLE_WORD_ALIGN_P (sp_adjust)
&& !cfun->calls_alloca) && !cfun->calls_alloca)
......
...@@ -218,15 +218,17 @@ struct GTY(()) machine_function ...@@ -218,15 +218,17 @@ struct GTY(()) machine_function
/* Number of bytes on the stack for saving $lp. */ /* Number of bytes on the stack for saving $lp. */
int lp_size; int lp_size;
/* Number of bytes on the stack for saving callee-saved registers. */ /* Number of bytes on the stack for saving general purpose
int callee_saved_regs_size; callee-saved registers. */
int callee_saved_gpr_regs_size;
/* The padding bytes in callee-saved area may be required. */ /* The padding bytes in callee-saved area may be required. */
int callee_saved_area_padding_bytes; int callee_saved_area_gpr_padding_bytes;
/* The first required callee-saved register. */ /* The first required general purpose callee-saved register. */
int callee_saved_regs_first_regno; int callee_saved_first_gpr_regno;
/* The last required callee-saved register. */ /* The last required general purpose callee-saved register. */
int callee_saved_regs_last_regno; int callee_saved_last_gpr_regno;
/* The padding bytes in varargs area may be required. */ /* The padding bytes in varargs area may be required. */
int va_args_area_padding_bytes; int va_args_area_padding_bytes;
......
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