开发者

function argument in register

开发者 https://www.devze.com 2022-12-29 05:32 出处:网络
Is t开发者_JAVA百科here a way to disable passing function arguments in registers using gcc 3.3.1 for ARM?Yes.I see dwelch gave a global answer, but if you\'d like to do this on a function by function

Is t开发者_JAVA百科here a way to disable passing function arguments in registers using gcc 3.3.1 for ARM?


Yes. I see dwelch gave a global answer, but if you'd like to do this on a function by function basis then use the gcc __attribute__ with regparm. iirc, it should look like this:

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


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 it, would probably be a compile time option (when gcc is compiled).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号