參數調用約定



	1、int __cdecl Plus(int a, int b)					
	{					
		return a+b;				
	}					
						
	push        2					
	push        1					
	call        @ILT+15(Plus) (00401014)					
	add         esp,8					
						
						
	2、int __stdcall Plus(int a, int b)					
	{					
		return a+b;				
	}					
						
	push        2					
	push        1					
	call        @ILT+10(Plus) (0040100f)					
						
	函數內部:					
						
	ret         8					
						
						
	3、int __fastcall Plus(int a, int b)					
	{					
		return a+b;				
	}					
						
	mov         edx,2					
	mov         ecx,1					
	call        @ILT+0(Plus) (00401005)					
						
	函數內部:					
						
	ret         					
						
	4、int __fastcall Plus4(int a, int b,int c,int d)					
	{					
		return a+b+c+d;				
	}					
						
	push        4					
	push        3					
	mov         edx,2					
	mov         ecx,1					
	call        @ILT+5(Plus) (0040100a)					
						
	函數內部:					
						
	ret         8					


發佈了41 篇原創文章 · 獲贊 26 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章