[NDS32] Consider varargs situation when creating stack operation assembly code.
commit775c6f73c5399491b379731d99d7dca53212d9a4
authorjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Sep 2014 08:57:02 +0000 (3 08:57 +0000)
committerjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Sep 2014 08:57:02 +0000 (3 08:57 +0000)
tree3d780b782ef18d1f3a43d38cf23c58bca8ec5cfb
parenta80047437f1d82653fa5507126a05db37e1711cc
[NDS32] Consider varargs situation when creating stack operation assembly code.

  -- In fact, we only need to take care of 'push.s' situation,
     because we have to push all the nameless arguments into stack.
  -- We do not have to use 'pop.s' to restore them back to registers,
     because we can just adjust stack pointer to set frame location.
     This operation should be done in epilogue expanding.
  -- Because 'pop25' instruction also performs return operation, we will
     not use v3push/v3pop on isr and vararg functions.
     Therefore, their instruction length should be 4 bytes.

* config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push):
Check rtx for varargs implementation.
(nds32_output_stack_pop): Likewise.
* config/nds32/nds32-protos.h: Have a rtx argument for
nds32_output_stack_push and nds32_output_stack_pop.
* config/nds32/nds32.md: Likewise.

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