mirror of git://gcc.gnu.org/git/gcc.git
Refine formatting and comments.
gcc/ * config/nds32/nds32.c: Refine formatting and comments. * config/nds32/nds32.h: Likewise. * config/nds32/nds32.md: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-multiple.md: Likewise. * config/nds32/nds32-predicates.c: Likewise. From-SVN: r252874
This commit is contained in:
parent
ebc6a85e3e
commit
8a498f99ca
|
|
@ -1,3 +1,14 @@
|
|||
2017-09-16 Chung-Ju Wu <jasonwucj@gmail.com>
|
||||
|
||||
* config/nds32/nds32.c: Refine formatting and comments.
|
||||
* config/nds32/nds32.h: Likewise.
|
||||
* config/nds32/nds32.md: Likewise.
|
||||
* config/nds32/nds32-cost.c: Likewise.
|
||||
* config/nds32/nds32-isr.c: Likewise.
|
||||
* config/nds32/nds32-md-auxiliary.c: Likewise.
|
||||
* config/nds32/nds32-multiple.md: Likewise.
|
||||
* config/nds32/nds32-predicates.c: Likewise.
|
||||
|
||||
2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
|
||||
Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
|
|
|
|||
|
|
@ -275,8 +275,8 @@ nds32_compute_stack_frame (void)
|
|||
cfun->machine->fp_size
|
||||
cfun->machine->gp_size
|
||||
cfun->machine->lp_size
|
||||
cfun->machine->callee_saved_regs_first_regno
|
||||
cfun->machine->callee_saved_regs_last_regno */
|
||||
cfun->machine->callee_saved_first_gpr_regno
|
||||
cfun->machine->callee_saved_last_gpr_regno */
|
||||
|
||||
/* For v3push instructions, $fp, $gp, and $lp are always saved. */
|
||||
cfun->machine->fp_size = 4;
|
||||
|
|
@ -319,11 +319,11 @@ nds32_compute_stack_frame (void)
|
|||
}
|
||||
}
|
||||
|
||||
/* We have correctly set callee_saved_regs_first_regno
|
||||
and callee_saved_regs_last_regno.
|
||||
Initially, the callee_saved_regs_size is supposed to be 0.
|
||||
As long as callee_saved_regs_last_regno is not SP_REGNUM,
|
||||
we can update callee_saved_regs_size with new size. */
|
||||
/* We have correctly set callee_saved_first_gpr_regno
|
||||
and callee_saved_last_gpr_regno.
|
||||
Initially, the callee_saved_gpr_regs_size is supposed to be 0.
|
||||
As long as callee_saved_last_gpr_regno is not SP_REGNUM,
|
||||
we can update callee_saved_gpr_regs_size with new size. */
|
||||
if (cfun->machine->callee_saved_last_gpr_regno != SP_REGNUM)
|
||||
{
|
||||
/* Compute pushed size of callee-saved registers. */
|
||||
|
|
@ -334,7 +334,7 @@ nds32_compute_stack_frame (void)
|
|||
}
|
||||
|
||||
/* Important: We need to make sure that
|
||||
(fp_size + gp_size + lp_size + callee_saved_regs_size)
|
||||
(fp_size + gp_size + lp_size + callee_saved_gpr_regs_size)
|
||||
is 8-byte alignment.
|
||||
If it is not, calculate the padding bytes. */
|
||||
block_size = cfun->machine->fp_size
|
||||
|
|
@ -1911,7 +1911,6 @@ nds32_legitimate_address_p (machine_mode mode, rtx x, bool strict)
|
|||
&& nds32_legitimate_index_p (mode, XEXP (x, 1), strict)
|
||||
&& CONST_INT_P (XEXP (x, 1)))
|
||||
return true;
|
||||
|
||||
else if (nds32_address_register_rtx_p (XEXP (x, 1), strict)
|
||||
&& nds32_legitimate_index_p (mode, XEXP (x, 0), strict)
|
||||
&& CONST_INT_P (XEXP (x, 0)))
|
||||
|
|
@ -2834,7 +2833,7 @@ nds32_initial_elimination_offset (unsigned int from_reg, unsigned int to_reg)
|
|||
nds32_compute_stack_frame ();
|
||||
|
||||
/* Remember to consider
|
||||
cfun->machine->callee_saved_area_padding_bytes
|
||||
cfun->machine->callee_saved_area_gpr_padding_bytes
|
||||
when calculating offset. */
|
||||
if (from_reg == ARG_POINTER_REGNUM && to_reg == STACK_POINTER_REGNUM)
|
||||
{
|
||||
|
|
@ -2971,7 +2970,7 @@ nds32_expand_prologue (void)
|
|||
/* adjust $fp = $sp + ($fp size) + ($gp size) + ($lp size)
|
||||
+ (4 * callee-saved-registers)
|
||||
Note: No need to adjust
|
||||
cfun->machine->callee_saved_area_padding_bytes,
|
||||
cfun->machine->callee_saved_area_gpr_padding_bytes,
|
||||
because, at this point, stack pointer is just
|
||||
at the position after push instruction. */
|
||||
fp_adjust = cfun->machine->fp_size
|
||||
|
|
@ -2989,7 +2988,7 @@ nds32_expand_prologue (void)
|
|||
}
|
||||
|
||||
/* Adjust $sp = $sp - local_size - out_args_size
|
||||
- callee_saved_area_padding_bytes. */
|
||||
- callee_saved_area_gpr_padding_bytes. */
|
||||
sp_adjust = cfun->machine->local_size
|
||||
+ cfun->machine->out_args_size
|
||||
+ cfun->machine->callee_saved_area_gpr_padding_bytes;
|
||||
|
|
@ -3074,7 +3073,7 @@ nds32_expand_epilogue (bool sibcall_p)
|
|||
/* adjust $sp = $fp - ($fp size) - ($gp size) - ($lp size)
|
||||
- (4 * callee-saved-registers)
|
||||
Note: No need to adjust
|
||||
cfun->machine->callee_saved_area_padding_bytes,
|
||||
cfun->machine->callee_saved_area_gpr_padding_bytes,
|
||||
because we want to adjust stack pointer
|
||||
to the position for pop instruction. */
|
||||
sp_adjust = cfun->machine->fp_size
|
||||
|
|
@ -3371,7 +3370,7 @@ nds32_expand_epilogue_v3pop (bool sibcall_p)
|
|||
- 4 ($lp size)
|
||||
- (4 * n) (callee-saved registers)
|
||||
Note: No need to adjust
|
||||
cfun->machine->callee_saved_area_padding_bytes,
|
||||
cfun->machine->callee_saved_area_gpr_padding_bytes,
|
||||
because we want to adjust stack pointer
|
||||
to the position for pop instruction. */
|
||||
sp_adjust = cfun->machine->fp_size
|
||||
|
|
@ -3394,7 +3393,7 @@ nds32_expand_epilogue_v3pop (bool sibcall_p)
|
|||
so we have to deal with it as well. */
|
||||
|
||||
/* Adjust $sp = $sp + local_size + out_args_size
|
||||
+ callee_saved_area_padding_bytes. */
|
||||
+ callee_saved_area_gpr_padding_bytes. */
|
||||
sp_adjust = cfun->machine->local_size
|
||||
+ cfun->machine->out_args_size
|
||||
+ cfun->machine->callee_saved_area_gpr_padding_bytes;
|
||||
|
|
|
|||
Loading…
Reference in New Issue