Function inlining replaces a call to a function with the body of the function. This speeds up program execution by eliminating the call/return code, the code required to pass parameters, and the code required for return values. But how to asign the __inline switch to my assembler function:
//********************************************************************* // 32*32 bit signed/unsigned multiply in ARM Assembler // Returns 64 bit result in R0,R1 //********************************************************************* AREA ?C?bla, CODE, READONLY, ALIGN=2 PUBLIC S_MUL32x32?A S_MUL32x32?A PROC CODE32 SMULL R2,R0,R1,R0 ; R0,R2 := R1*R0 mov R1,R2 bx lr ENDP PUBLIC U_MUL32x32?A U_MUL32x32?A PROC CODE32 UMULL R2,R0,R1,R0 ; R0,R2 := R1*R0 mov R1,R2 bx lr ENDP END //*********************************************************************
In the following function declarations the "__inline" switch does not have an effect:
extern __inline unsigned long long U_MUL32x32(unsigned int,unsigned int); extern __inline unsigned long long S_MUL32x32(unsigned int,unsigned int);