Home > Back-end >  How to prove the inline function in the compile phase was replaced with the code?
How to prove the inline function in the compile phase was replaced with the code?

Time:09-20

RT
I'm in vs experiment about

The following code
 

The inline int g_fun (int, int j)
{

//int ca=111, jj=12, aa=1, DDD=2, ff=3, gg=4, hh=5, JJS=6, KKK=7;
The return I + j;
}


Int main ()
{

/* int I=10, j=19;
Int * pI=& amp; i; */
//int * p=new int (77);
G_fun (10, 12);
return 0;
}






In principle should not generate call instructions to jump but still generate the
The inline see the face of the compiler
That I don't want to how to prove the inline will generate call instructions
?

 

14: int main ()
15: {
00 e11800 55 push ebp
00 e11801 8 b EC mov ebp, esp
00 e11803 81 EC C0 00 00 00 sub esp, 0 c0h
00 e11809 53 push ebx
00 e1180a 56 push esi
00 e1180b 57 push edi
00 e1180c 8 d BD 40 FF FF FF lea edi, [ebp c0h] 0
30 00 00 00 00 e11812 B9 mov ecx, 30 h
00 e11817 B8 CC CC CC CC mov eax, 0 CCCCCCCCH
00 e1181c F3 AB rep stos dword PTR es: (edi)
16:
17:/* int I=10, j=19;
18: int * pI=& amp; i; */
19://int * p=new int (77);
20: g_fun (10, 12);
00 e1181e 6 a push 0 0 c ch
00 e11820 6 a 0 a push ah 0
00 e11822 E8 DD F8 FF FF call g_fun e11104h) (0
00 e11827 83 C4 08 add esp, 8
21: return 0;
00 e1182a 33 C0 xor eax, eax
22:}



00 e11822 E8 DD F8 FF FF call g_fun e11104h) (0
  • Related