This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Function Inlining ?

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)

Parents Reply Children
No data