[NDS32] Refine prologue and epilogue code generation.
authorMonk Chiang <sh.chiang04@gmail.com>
Mon, 12 Mar 2018 01:21:57 +0000 (01:21 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Mon, 12 Mar 2018 01:21:57 +0000 (01:21 +0000)
commita6c7e7779ad2330a0e14c87ba0e339367679ed9e
tree6b0eb6a8d947dd718adb5c3b41c4b4a914480296
parent1fdffa310b8ec30ba048c9857316e7f54432d992
[NDS32] Refine prologue and epilogue code generation.

gcc/
* config/nds32/nds32.c (nds32_compute_stack_frame,
nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
* config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
* config/nds32/nds32.md (prologue, epilogue): Use macro
NDS32_V3PUSH_AVAILABLE_P to do checking.

Co-Authored-By: Chung-Ju Wu <jasonwucj@gmail.com>
Co-Authored-By: Kito Cheng <kito.cheng@gmail.com>
From-SVN: r258442
gcc/ChangeLog
gcc/config/nds32/nds32.c
gcc/config/nds32/nds32.h
gcc/config/nds32/nds32.md