EE-GCC and EE-G++ caling conventions
Posted: Thu Jun 29, 2006 9:33 am
I want to call c++ or c functions compiled with e-gcc or e-g++ from my assembly code but i am not sure how the compilers handle passing of arguments and return values.
Do they use the stack or registers $a0-$a3 and $v0-$v1 ?
a simple test program compiled with the -S assembly source option showed that it uses the registers but a few online message boards say GCC compilers use the stack.
Does this differ depending on how many arguments there are?
I'd be grateful for any information on this or a link to an article that covers this. thanks.
Do they use the stack or registers $a0-$a3 and $v0-$v1 ?
a simple test program compiled with the -S assembly source option showed that it uses the registers but a few online message boards say GCC compilers use the stack.
Does this differ depending on how many arguments there are?
I'd be grateful for any information on this or a link to an article that covers this. thanks.