Content originally posted in LPCWare by OA santana on Tue Feb 28 05:49:21 MST 2012
My solution. I know it is not an inline command but it might help you.
/************************* some code ************************* /
/**
* @param r0=a
* @param r1=b
* @param r2=c
* @retval r0
*/
__ASM volatile int16_t somemath (int16_t a,int16_t b,int16_t c) {
[INDENT]muls r0,r1,r0
adds r0, r2,r0
BX lr[/INDENT]
}
int main () {
[INDENT] int16_t tmp;
tmp = somemath (10,3,4);
if (tmp != 34) {
/* error */
} else {
/*expected value. */
}[/INDENT]
return(0);
}
/************************* end code ************************* /
Information that might be of your interest :
Procedure Call Standard for the ARM® Architecture
(Document number: ARM IHI 0042D, current through ABI release 2.08)
Hope that helped you.