[NDS32] new attribute no_prologue and new option -mret-in-naked-func.
commit646aebde839084c079194c54700b94934f3ba333
authorjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 May 2018 06:46:43 +0000 (27 06:46 +0000)
committerjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 May 2018 06:46:43 +0000 (27 06:46 +0000)
tree3406836ef47f427b56a8e7ba400723c56b59becc
parent639efbdb0ef1d42b2d40423f0a7623173203a821
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260803 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/nds32/nds32.c
gcc/config/nds32/nds32.h
gcc/config/nds32/nds32.opt