Changeset 231 in dev for trunk/abdev/BasicCompiler32/Compile_Calc_PushVar.cpp
- Timestamp:
- Jul 25, 2007, 12:02:30 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Calc_PushVar.cpp
r229 r231 162 162 if(pRelativeVar->bOffsetOffset){ 163 163 //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 ); 169 165 170 166 //push dword ptr[ebp+ecx] … … 178 174 else{ 179 175 //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 ); 185 177 } 186 178 } 187 179 else if(pRelativeVar->dwKind==VAR_REFLOCAL){ 188 180 //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 ); 194 182 195 183 if(pRelativeVar->bOffsetOffset){
Note:
See TracChangeset
for help on using the changeset viewer.