[NDS32] Deal with nameless arguments in nds32_function_arg and nds32_function_arg_adv...
commit74022996bccc6fac0c6227649fafadb57d3d07a2
authorjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Sep 2014 09:55:28 +0000 (3 09:55 +0000)
committerjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Sep 2014 09:55:28 +0000 (3 09:55 +0000)
tree84c7d09e05d0df11d11b81726f282263ee893fbf
parenta855b5c492e6eb989ae58eacc92a6f8fe09b9d4f
[NDS32] Deal with nameless arguments in nds32_function_arg and nds32_function_arg_advance.

  1. We have caller prepare nameless arguments in the way of calling a normal function.

     e.g. Assume a function: void va_test (int n, ...);
          When calling "va_test (6, 11, 22, 33, 44, 55, 66);",
               r0    <- 6
               r1    <- 11
               r2    <- 22
               r3    <- 33
               r4    <- 44
               r5    <- 55
            [sp + 0] <- 66

  2. Note that we DO NOT handle it for TARGET_HARD_FLOAT case.
     The TARGET_HARD_FLOAT should push all the nameless arguments into
     stack and GCC is able to take care of them itself.
     In addition, we have not implemented hard float on trunk yet.

* config/nds32/nds32.c (nds32_function_arg): Deal with nameless
arguments.
(nds32_function_arg_advance): Deal with nameless arguments.
* config/nds32/nds32.h (NDS32_ARG_PASS_IN_REG_P): Split it into ...
(NDS32_ARG_ENTIRE_IN_GPR_REG_P): ... this one and ...
(NDS32_ARG_PARTIAL_IN_GPR_REG_P): ... this one.

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