[NDS32] Consider varargs situation when creating stack operation assembly code.
authorChung-Ju Wu <jasonwucj@gmail.com>
Wed, 3 Sep 2014 08:57:02 +0000 (08:57 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Wed, 3 Sep 2014 08:57:02 +0000 (08:57 +0000)
commit6f3d3f9c7c6db3468b8d0269bbca946df2c48d5f
tree3d780b782ef18d1f3a43d38cf23c58bca8ec5cfb
parent126b11c6921e3e0b8eb29b60e5bf5b4dd83797d4
[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.

From-SVN: r214856
gcc/ChangeLog
gcc/config/nds32/nds32-md-auxiliary.c
gcc/config/nds32/nds32-protos.h
gcc/config/nds32/nds32.md