In the ARM ABI documentation I come across functions defined like:
__value_in_regs struct bar foo(int a, int b) { ... }
but GCC(4.3
I'm not sure if this will work, but you can try using the pcs function attribute:
pcs
struct bar foo(int a, int b) __attribute__((pcs("aapcs"))); struct bar foo(int a, int b) { ... }