Changeset 230 in dev for trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp
- Timestamp:
- Jul 24, 2007, 7:11:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp
r225 r230 95 95 if(pRelativeVar->bOffsetOffset){ 96 96 //fstp ptr[ecx+offset] 97 compiler.codeGenerator.op_fstp_base_offset(VarType,REG_ECX,(int)pRelativeVar->offset); 98 obp-=sizeof(long); 99 pobj_GlobalVarSchedule->add(); 100 obp+=sizeof(long); 97 compiler.codeGenerator.op_fstp_base_offset(VarType,REG_ECX,(int)pRelativeVar->offset, Schedule::GlobalVar ); 101 98 } 102 99 else{ 103 100 //mov ecx,offset 104 compiler.codeGenerator.op_mov_RV(REG_ECX,(int)pRelativeVar->offset); 105 obp-=sizeof(long); 106 pobj_GlobalVarSchedule->add(); 107 obp+=sizeof(long); 101 compiler.codeGenerator.op_mov_RV(REG_ECX,(int)pRelativeVar->offset, Schedule::GlobalVar ); 108 102 109 103 //fstp ptr[ecx] … … 114 108 if(pRelativeVar->bOffsetOffset){ 115 109 //add ecx,qword ptr[offset] 116 compiler.codeGenerator.op_add_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32 );110 compiler.codeGenerator.op_add_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32, Schedule::GlobalVar ); 117 111 } 118 112 else{ 119 113 //mov ecx,qword ptr[offset] 120 compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32); 121 } 122 obp-=sizeof(long); 123 pobj_GlobalVarSchedule->add(); 124 obp+=sizeof(long); 114 compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32, Schedule::GlobalVar ); 115 } 125 116 126 117 goto directmem; … … 129 120 if(pRelativeVar->bOffsetOffset){ 130 121 //fstp ptr[ebp+ecx+offset] 131 compiler.codeGenerator.op_fstp_base_offset_ex(VarType,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET );122 compiler.codeGenerator.op_fstp_base_offset_ex(VarType,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET, Schedule::LocalVar ); 132 123 } 133 124 else{ 134 125 //fstp ptr[ebp+offset] 135 compiler.codeGenerator.op_fstp_base_offset(VarType,REG_EBP,(int)pRelativeVar->offset); 136 } 137 obp-=sizeof(long); 138 AddLocalVarAddrSchedule(); 139 obp+=sizeof(long); 126 compiler.codeGenerator.op_fstp_base_offset(VarType,REG_EBP,(int)pRelativeVar->offset, Schedule::LocalVar ); 127 } 140 128 } 141 129 else if(pRelativeVar->dwKind==VAR_REFLOCAL){ 142 130 if(pRelativeVar->bOffsetOffset){ 143 131 //add ecx,qword ptr[ebp+offset] 144 compiler.codeGenerator.op_add_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32 );132 compiler.codeGenerator.op_add_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 145 133 } 146 134 else{ 147 135 //mov ecx,qword ptr[ebp+offset] 148 compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32); 149 } 150 obp-=sizeof(long); 151 AddLocalVarAddrSchedule(); 152 obp+=sizeof(long); 136 compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 137 } 153 138 154 139 goto directmem; … … 328 313 if(pRelative->bOffsetOffset){ 329 314 //mov ptr[ecx+offset],eax/ax/al 330 compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,REG_ECX,(int)pRelative->offset,MOD_BASE_DISP32 );315 compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,REG_ECX,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::GlobalVar ); 331 316 } 332 317 else{ 333 318 //mov ptr[offset],eax/ax/al 334 compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,0,(int)pRelative->offset,MOD_DISP32); 335 } 336 obp-=sizeof(long); 337 pobj_GlobalVarSchedule->add(); 338 obp+=sizeof(long); 319 compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,0,(int)pRelative->offset,MOD_DISP32, Schedule::GlobalVar ); 320 } 339 321 } 340 322 else if(pRelative->dwKind==VAR_REFGLOBAL){ … … 344 326 if(pRelative->bOffsetOffset){ 345 327 //add ecx,qword ptr[offset] 346 compiler.codeGenerator.op_add_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32 );328 compiler.codeGenerator.op_add_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32, Schedule::GlobalVar ); 347 329 } 348 330 else{ 349 331 //mov ecx,qword ptr[offset] 350 compiler.codeGenerator.op_mov_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32); 351 } 352 obp-=sizeof(long); 353 pobj_GlobalVarSchedule->add(); 354 obp+=sizeof(long); 332 compiler.codeGenerator.op_mov_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32, Schedule::GlobalVar ); 333 } 355 334 356 335 goto directmem; … … 359 338 if(pRelative->bOffsetOffset){ 360 339 //mov ptr[ebp+ecx+offset],eax/ax/al 361 compiler.codeGenerator.op_mov_MR_ex(varSize,REG_EAX,REG_EBP,REG_ECX,(int)pRelative->offset,USE_OFFSET );340 compiler.codeGenerator.op_mov_MR_ex(varSize,REG_EAX,REG_EBP,REG_ECX,(int)pRelative->offset,USE_OFFSET, Schedule::LocalVar ); 362 341 } 363 342 else{ 364 343 //mov ptr[ebp+offset],eax/ax/al 365 compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32); 366 } 367 obp-=sizeof(long); 368 AddLocalVarAddrSchedule(); 369 obp+=sizeof(long); 344 compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 345 } 370 346 } 371 347 else if(pRelative->dwKind==VAR_REFLOCAL){ 372 348 if(pRelative->bOffsetOffset){ 373 349 //add ecx,ptr[ebp+offset] 374 compiler.codeGenerator.op_add_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32 );350 compiler.codeGenerator.op_add_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 375 351 } 376 352 else{ 377 353 //mov ecx,ptr[ebp+offset] 378 compiler.codeGenerator.op_mov_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32); 379 } 380 obp-=sizeof(long); 381 AddLocalVarAddrSchedule(); 382 obp+=sizeof(long); 354 compiler.codeGenerator.op_mov_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 355 } 383 356 384 357 goto directmem;
Note:
See TracChangeset
for help on using the changeset viewer.