[NDS32] new attribute no_prologue and new option -mret-in-naked-func.
authorChung-Ju Wu <jasonwucj@gmail.com>
Sun, 27 May 2018 06:46:43 +0000 (06:46 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Sun, 27 May 2018 06:46:43 +0000 (06:46 +0000)
commit54c537e66c26882d8b3202a3e72a6fb9464d9969
tree3406836ef47f427b56a8e7ba400723c56b59becc
parent4cdb54eaaeffa42f23d34a71d09dde49cfc641df
[NDS32] new attribute no_prologue and new option -mret-in-naked-func.

gcc/
* config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
(nds32_init_machine_status): Initialize machine->attr_naked_p and
machine->attr_no_prologue_p.
(nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
(nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
(nds32_expand_epilogue): Consider attr_naked_p.
(nds32_expand_epilogue_v3pop): Likewise.
(nds32_can_use_return_insn): Likewise.
* config/nds32/nds32.h (machine_function): Add attr_naked_p and
attr_no_prologue_p fields.
* config/nds32/nds32.opt (mret-in-naked-func): New option.

From-SVN: r260803
gcc/ChangeLog
gcc/config/nds32/nds32.c
gcc/config/nds32/nds32.h
gcc/config/nds32/nds32.opt