Changeset 235 in dev for trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
- Timestamp:
- Jul 25, 2007, 11:54:20 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
r231 r235 18 18 if( userProc.GetName() == "_System_GetEip" ){ 19 19 //mov eax,dword ptr[esp] 20 OpBuffer[obp++]=(char)0x8B; 21 OpBuffer[obp++]=(char)0x04; 22 OpBuffer[obp++]=(char)0x24; 20 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_ESP, 0, MOD_BASE ); 23 21 24 22 //ret … … 379 377 380 378 //mov ebp,esp 381 OpBuffer[obp++]=(char)0x8B; 382 OpBuffer[obp++]=(char)0xEC; 379 compiler.codeGenerator.op_mov_RR( REG_EBP, REG_ESP ); 383 380 384 381 //push ebx … … 386 383 387 384 //push esi 388 OpBuffer[obp++]=(char)0x56;385 compiler.codeGenerator.op_push( REG_ESI ); 389 386 390 387 //push edi 391 OpBuffer[obp++]=(char)0x57;388 compiler.codeGenerator.op_push( REG_EDI ); 392 389 393 390 if( !pUserProc->ReturnType().IsNull() ){ … … 457 454 458 455 //push dword ptr[ebp](以前のebp) 459 OpBuffer[obp++]=(char)0xFF; 460 OpBuffer[obp++]=(char)0x75; 461 OpBuffer[obp++]=(char)0x00; 456 compiler.codeGenerator.op_push_M( REG_EBP ); 462 457 463 458 //call _DebugSys_StartProc … … 728 723 729 724 //pop edi 730 OpBuffer[obp++]=(char)0x5F;725 compiler.codeGenerator.op_pop( REG_EDI ); 731 726 732 727 //pop esi 733 OpBuffer[obp++]=(char)0x5E;728 compiler.codeGenerator.op_pop( REG_ESI ); 734 729 735 730 //pop ebx … … 752 747 753 748 //mov esp,ebp 754 OpBuffer[obp++]=(char)0x8B; 755 OpBuffer[obp++]=(char)0xE5; 749 compiler.codeGenerator.op_mov_RR( REG_ESP, REG_EBP ); 756 750 757 751 //pop ebp
Note:
See TracChangeset
for help on using the changeset viewer.