gcc/
* config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
From-SVN: r259549
+2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
+
+ * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
+
2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-protos.h (nds32_data_alignment,
{
block_size = cfun->machine->fp_size
+ cfun->machine->gp_size
- + cfun->machine->lp_size
- + (4 * (cfun->machine->callee_saved_last_gpr_regno
- - cfun->machine->callee_saved_first_gpr_regno
- + 1));
+ + cfun->machine->lp_size;
+
+ if (cfun->machine->callee_saved_last_gpr_regno != SP_REGNUM)
+ block_size += (4 * (cfun->machine->callee_saved_last_gpr_regno
+ - cfun->machine->callee_saved_first_gpr_regno
+ + 1));
if (!NDS32_DOUBLE_WORD_ALIGN_P (block_size))
{