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>
|
2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
|
||||||
Jakub Jelinek <jakub@redhat.com>
|
Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -275,8 +275,8 @@ nds32_compute_stack_frame (void)
|
||||||
cfun->machine->fp_size
|
cfun->machine->fp_size
|
||||||
cfun->machine->gp_size
|
cfun->machine->gp_size
|
||||||
cfun->machine->lp_size
|
cfun->machine->lp_size
|
||||||
cfun->machine->callee_saved_regs_first_regno
|
cfun->machine->callee_saved_first_gpr_regno
|
||||||
cfun->machine->callee_saved_regs_last_regno */
|
cfun->machine->callee_saved_last_gpr_regno */
|
||||||
|
|
||||||
/* For v3push instructions, $fp, $gp, and $lp are always saved. */
|
/* For v3push instructions, $fp, $gp, and $lp are always saved. */
|
||||||
cfun->machine->fp_size = 4;
|
cfun->machine->fp_size = 4;
|
||||||
|
|
@ -319,11 +319,11 @@ nds32_compute_stack_frame (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We have correctly set callee_saved_regs_first_regno
|
/* We have correctly set callee_saved_first_gpr_regno
|
||||||
and callee_saved_regs_last_regno.
|
and callee_saved_last_gpr_regno.
|
||||||
Initially, the callee_saved_regs_size is supposed to be 0.
|
Initially, the callee_saved_gpr_regs_size is supposed to be 0.
|
||||||
As long as callee_saved_regs_last_regno is not SP_REGNUM,
|
As long as callee_saved_last_gpr_regno is not SP_REGNUM,
|
||||||
we can update callee_saved_regs_size with new size. */
|
we can update callee_saved_gpr_regs_size with new size. */
|
||||||
if (cfun->machine->callee_saved_last_gpr_regno != SP_REGNUM)
|
if (cfun->machine->callee_saved_last_gpr_regno != SP_REGNUM)
|
||||||
{
|
{
|
||||||
/* Compute pushed size of callee-saved registers. */
|
/* Compute pushed size of callee-saved registers. */
|
||||||
|
|
@ -334,7 +334,7 @@ nds32_compute_stack_frame (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Important: We need to make sure that
|
/* 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.
|
is 8-byte alignment.
|
||||||
If it is not, calculate the padding bytes. */
|
If it is not, calculate the padding bytes. */
|
||||||
block_size = cfun->machine->fp_size
|
block_size = cfun->machine->fp_size
|
||||||
|
|
@ -1672,7 +1672,7 @@ nds32_asm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
|
||||||
static bool
|
static bool
|
||||||
nds32_warn_func_return (tree decl)
|
nds32_warn_func_return (tree decl)
|
||||||
{
|
{
|
||||||
/* Naked functions are implemented entirely in assembly, including the
|
/* Naked functions are implemented entirely in assembly, including the
|
||||||
return sequence, so suppress warnings about this. */
|
return sequence, so suppress warnings about this. */
|
||||||
return !nds32_naked_function_p (decl);
|
return !nds32_naked_function_p (decl);
|
||||||
}
|
}
|
||||||
|
|
@ -1911,7 +1911,6 @@ nds32_legitimate_address_p (machine_mode mode, rtx x, bool strict)
|
||||||
&& nds32_legitimate_index_p (mode, XEXP (x, 1), strict)
|
&& nds32_legitimate_index_p (mode, XEXP (x, 1), strict)
|
||||||
&& CONST_INT_P (XEXP (x, 1)))
|
&& CONST_INT_P (XEXP (x, 1)))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
else if (nds32_address_register_rtx_p (XEXP (x, 1), strict)
|
else if (nds32_address_register_rtx_p (XEXP (x, 1), strict)
|
||||||
&& nds32_legitimate_index_p (mode, XEXP (x, 0), strict)
|
&& nds32_legitimate_index_p (mode, XEXP (x, 0), strict)
|
||||||
&& CONST_INT_P (XEXP (x, 0)))
|
&& 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 ();
|
nds32_compute_stack_frame ();
|
||||||
|
|
||||||
/* Remember to consider
|
/* Remember to consider
|
||||||
cfun->machine->callee_saved_area_padding_bytes
|
cfun->machine->callee_saved_area_gpr_padding_bytes
|
||||||
when calculating offset. */
|
when calculating offset. */
|
||||||
if (from_reg == ARG_POINTER_REGNUM && to_reg == STACK_POINTER_REGNUM)
|
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)
|
/* adjust $fp = $sp + ($fp size) + ($gp size) + ($lp size)
|
||||||
+ (4 * callee-saved-registers)
|
+ (4 * callee-saved-registers)
|
||||||
Note: No need to adjust
|
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
|
because, at this point, stack pointer is just
|
||||||
at the position after push instruction. */
|
at the position after push instruction. */
|
||||||
fp_adjust = cfun->machine->fp_size
|
fp_adjust = cfun->machine->fp_size
|
||||||
|
|
@ -2989,7 +2988,7 @@ nds32_expand_prologue (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Adjust $sp = $sp - local_size - out_args_size
|
/* 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
|
sp_adjust = cfun->machine->local_size
|
||||||
+ cfun->machine->out_args_size
|
+ cfun->machine->out_args_size
|
||||||
+ cfun->machine->callee_saved_area_gpr_padding_bytes;
|
+ 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)
|
/* adjust $sp = $fp - ($fp size) - ($gp size) - ($lp size)
|
||||||
- (4 * callee-saved-registers)
|
- (4 * callee-saved-registers)
|
||||||
Note: No need to adjust
|
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
|
because we want to adjust stack pointer
|
||||||
to the position for pop instruction. */
|
to the position for pop instruction. */
|
||||||
sp_adjust = cfun->machine->fp_size
|
sp_adjust = cfun->machine->fp_size
|
||||||
|
|
@ -3371,7 +3370,7 @@ nds32_expand_epilogue_v3pop (bool sibcall_p)
|
||||||
- 4 ($lp size)
|
- 4 ($lp size)
|
||||||
- (4 * n) (callee-saved registers)
|
- (4 * n) (callee-saved registers)
|
||||||
Note: No need to adjust
|
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
|
because we want to adjust stack pointer
|
||||||
to the position for pop instruction. */
|
to the position for pop instruction. */
|
||||||
sp_adjust = cfun->machine->fp_size
|
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. */
|
so we have to deal with it as well. */
|
||||||
|
|
||||||
/* Adjust $sp = $sp + local_size + out_args_size
|
/* 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
|
sp_adjust = cfun->machine->local_size
|
||||||
+ cfun->machine->out_args_size
|
+ cfun->machine->out_args_size
|
||||||
+ cfun->machine->callee_saved_area_gpr_padding_bytes;
|
+ cfun->machine->callee_saved_area_gpr_padding_bytes;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue