2010-10-20 01:57 PM
handling function parameters in assembly
2011-05-17 05:12 AM
First the first 4 parameters use ARM registers, they will be R0, R1, R2, R3, others will be pushed on the stack, local variables can either be in registers or relative to the stack frame. A 32-bit return value will be returned in R0. Look at the code generated by the compiler to get some worked examples.
You want to review thehttp://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.swdev.abi/index.html
and specifically thehttp://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf
http://www.codesourcery.com/sgpp/lite/arm/portal/kbentry32
2011-05-17 05:12 AM