This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]