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.
The fifth parameter (and all those after it) always goes onto the stack, never r4 or r12. For more information, see [url="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042c/index.html"]infocenter.arm.com/.../url]To access it you can "LDR r4,[sp,#0]", but be sure to have saved the value in r4 before you change it, since it will need to be restored to the previous value when you exit the function. I have used fifth argument as following way.void routine(signed char *a, int b, signed char *c, unsigned char *d, unsigned int *e){asm volatile{ "PUSH {r4,r5,r6,r7,r8,r9,10,r11,r12}\n\t" "LDR r4, [sp, #36]\n\t" ........assembly syntaxs........................................................ "POP {r4,r5,r6,r7,r8,r9,10,r11,r12}\n\t"};} But here, I didn't get output of as per expected and if I use this function in other application which call only this routine then I am getting result as per expected.I am unsure about what you are asking in the last question. The ARM ABI defines how parameters are passed in the above document, so following it should result in a function that can be safely used from other places.