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.
How does inlining work ? static __inline int MULT_16x16R16(int a, int b) { return ( (int)((a * (long)b) >> 16)); } appears to produce the following unexpected snippet... ; FUNCTION MULT_16x16R16 (BEGIN RMASK = @0x6030) ; SOURCE LINE # 1915 ;---- Variable 'b' assigned to Register 'R9' ---- ;---- Variable 'a' assigned to Register 'R8' ---- ; SOURCE LINE # 1917 1442 0B89 MUL R8,R9 1444 F2F50CFE MOV R5,MDH 1448 F2F40EFE MOV R4,MDL 144C F045 MOV R4,R5 ; SOURCE LINE # 1918 144E DB00 RETS ; FUNCTION MULT_16x16R16 (END RMASK = @0x6030)
Take a look at http://www.keil.com/support/man/docs/c166/c166_le_inlinefuncs.htm. Have you simplified how you are calling the inline function? Jon