handling function parameters in assembly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2010-10-20 1:57 PM
handling function parameters in assembly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5: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
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:12 AM
