1,返回int值
int CTest::fun() { return 3; } mov eax, 3
2,返回dobule值
double CTest::fun() { return 3.0; } fld QWORD PTR __real@4008000000000000
3,修改int&入参
class CTest { public: void CTest::fun(short& x); int m_x ; }; void CTest::fun(short& x) { x = 3; m_x = 4; } ; _this$ = ecx ; _x$ = eax x = 3; mov WORD PTR [eax], 3 m_x = 4; mov DWORD PTR [ecx], 4
4,全局变量
int g_x = 0 ; void CTest::fun() { g_x =3 ; } g_x =3 ; mov DWORD PTR ?g_x@@3HA, 3 ; g_x
5,静态全局变量
sx++; add DWORD PTR ?sx@?1??fun@CTest@@QAEXXZ@4HA, 1