Commit 13116651 by Chung-Ju Wu Committed by Chung-Ju Wu

[NDS32] Add new option -malways-save-lp.

gcc/
	* config/nds32/nds32.c (nds32_compute_stack_frame): Consider
	flag_always_save_lp condition.
	* config/nds32/nds32.opt (malways-save-lp): New option.

From-SVN: r259553
parent c411e9aa
2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_compute_stack_frame): Consider
flag_always_save_lp condition.
* config/nds32/nds32.opt (malways-save-lp): New option.
2018-04-22 Shiva Chen <shiva0217@gmail.com>
* config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
......
......@@ -436,7 +436,8 @@ nds32_compute_stack_frame (void)
/* If $lp value is required to be saved on stack, it needs 4 bytes space.
Check whether $lp is ever live. */
cfun->machine->lp_size = (df_regs_ever_live_p (LP_REGNUM)) ? 4 : 0;
cfun->machine->lp_size
= (flag_always_save_lp || df_regs_ever_live_p (LP_REGNUM)) ? 4 : 0;
/* Initially there is no padding bytes. */
cfun->machine->callee_saved_area_gpr_padding_bytes = 0;
......
......@@ -321,6 +321,10 @@ mext-fpu-dp
Target Report Mask(FPU_DOUBLE)
Generate double-precision floating-point instructions.
malways-save-lp
Target Var(flag_always_save_lp) Init(0)
Always save $lp in the stack.
munaligned-access
Target Report Var(flag_unaligned_access) Init(0)
Enable unaligned word and halfword accesses to packed data.
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