This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

registers used for passing parameters and returning

I am writing an application in which I need to mix C and assembly.
I need to write the most optimized code for which I need the answer to the following questions
1) When passing parameters, is there any predetermined method in which the parameters will be passed? Like for eg. param1 will be passed thorugh r6, parameter 2 will be assed thorugh r7 etc?
2) When returning from a function is there any standard fixed way of returning like , say the return value is always in register r7 ?

If these things are predetermined then I can do a lot of speed optimizations in my code

Will appreciate if you could help.

Thank you.
Regards
Gaurav

0