We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi!
Is anyone knows what compiler directive to use to force the parameters passed in by the order of R0, R1, R2 and R3(R0 is the first one, and R3 the last)? I found some functions didn't follow this rule(my armcc version is v4.0.0.524).
Best Regards,
R0-R3 can be abused for any purpose by a called function, and that is generally arranged by the compiler. In fact, that is part of the ABI (happy now, Zuisti, everybody's friend?)
If it does not happen, it is probably because the registers were used for another purpose.
Tapeer,
Well done my freind. this is the good example to show how repetition can be a useful tool. But you were a reluctant student ;-<>
Remaining alway's you're freind.
Zeusti.
(retired advisor to Neville Anderson)
Not sure whether the below information is correct. Maybe our ARM ABI expert Mr. Zeusti can clarify this.
en.wikipedia.org/.../Calling_convention
* r0 to r3: used to hold argument values passed to a subroutine ... and also hold results returned from a subroutine.
If the type of value returned is too large to fit in r0 to r3, or whose size cannot be determined statically at compile time, then the caller must allocate space for that value at run time, and pass a pointer to that space in r0.
were a reluctant student
Ache, tupisti, tupisti, you have no idea...