Ignore:
Timestamp:
Jul 25, 2007, 12:02:30 AM (17 years ago)
Author:
dai_9181
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler32/Compile_Calc_PushVar.cpp

    r229 r231  
    162162        if(pRelativeVar->bOffsetOffset){
    163163            //add ecx,offset
    164             OpBuffer[obp++]=(char)0x81;
    165             OpBuffer[obp++]=(char)0xC1;
    166             *((long *)(OpBuffer+obp))=pRelativeVar->offset;
    167             AddLocalVarAddrSchedule();
    168             obp+=sizeof(long);
     164            compiler.codeGenerator.op_add_RV( REG_ECX, pRelativeVar->offset, Schedule::LocalVar );
    169165
    170166            //push dword ptr[ebp+ecx]
     
    178174        else{
    179175            //push dword ptr[ebp+offset]
    180             OpBuffer[obp++]=(char)0xFF;
    181             OpBuffer[obp++]=(char)0xB5;
    182             *((long *)(OpBuffer+obp))=pRelativeVar->offset;
    183             AddLocalVarAddrSchedule();
    184             obp+=sizeof(long);
     176            compiler.codeGenerator.op_push_M( REG_EBP, pRelativeVar->offset, Schedule::LocalVar );
    185177        }
    186178    }
    187179    else if(pRelativeVar->dwKind==VAR_REFLOCAL){
    188180        //mov eax,dword ptr[ebp+offset]
    189         OpBuffer[obp++]=(char)0x8B;
    190         OpBuffer[obp++]=(char)0x85;
    191         *((long *)(OpBuffer+obp))=pRelativeVar->offset;
    192         AddLocalVarAddrSchedule();
    193         obp+=sizeof(long);
     181        compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EBP, pRelativeVar->offset, MOD_BASE_DISP32, Schedule::LocalVar );
    194182
    195183        if(pRelativeVar->bOffsetOffset){
Note: See TracChangeset for help on using the changeset viewer.