Function argument in register

Is there a way to disable passing function arguments in registers using gcc 3.3.1 for ARM?

+2


a source to share


2 answers


Yes. I can see that dwelch gave a global answer, but if you want to do this based on a function use gcc __attribute__

with regparm

. iirc, it should look like this:



int __attribute__((regparm(0))) function(int a, char b) { ... }

      

+2


a source


Perhaps one of these options is what you are looking for

-mabi = name
Generate code for the specified ABI. Permissible values ​​are: `apcs-gnu ',` atpcs', `aapcs',` aapcs-linux' and `iwmmxt '.


if not, and if there is anything there will probably be a compile time option (when gcc is compiled).

0


a source







All Articles