This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
INIT_CUMULATIVE_ARGS(): bug?
- From: Anders Ådland <adland at stud dot ntnu dot no>
- To: gcc at gcc dot gnu dot org
- Date: 25 Mar 2003 14:46:13 +0100
- Subject: INIT_CUMULATIVE_ARGS(): bug?
Thanks for all the help you have given me so fare. I need some more...
I am using INIT_CUMULATIVE_ARGS(cum, fntype, libname, indirect) to
initialize the cum variable. The first register to use for passing
arguments depends on the size of the argument. A long long int is using
the register pair r11:r10 while an int is using r12. Is fntype
representing the type of the first argument? It looks like it is
representing the type of the return value:
In the function
long long int foo(int arg1, int arg2) { ... }
TREE_INT_CST_LOW(TYPE_SIZE(TREE_TYPE(fntype))) is equal to 64, but in
the function
int foo(int arg1, int arg2) { ... }
TREE_INT_CST_LOW(TYPE_SIZE(TREE_TYPE(fntype))) is equal to 32. Why?
Is this how it should be? I am using r12 as return register.
Anders