Changeset 62 in dev for BasicCompiler32/increment.cpp
- Timestamp:
- Feb 22, 2007, 3:57:56 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/increment.cpp
r55 r62 23 23 } 24 24 } 25 else if(pRelativeVar->dwKind==VAR_REFGLOBAL){ 26 if(pRelativeVar->bOffsetOffset){ 27 //add ecx,qword ptr[offset] 28 op_add_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32); 29 } 30 else{ 31 //mov ecx,qword ptr[offset] 32 op_mov_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32); 33 } 34 obp-=sizeof(long); 35 pobj_GlobalVarSchedule->add(); 36 obp+=sizeof(long); 37 38 goto directmem; 39 } 25 40 else if(pRelativeVar->dwKind==VAR_LOCAL){ 26 41 if(pRelativeVar->bOffsetOffset){ 27 42 //fstp ptr[ebp+ecx+offset] 28 43 op_fstp_base_offset_ex(type,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET); 29 obp-=sizeof(long);30 AddLocalVarAddrSchedule();31 obp+=sizeof(long);32 44 } 33 45 else{ 34 46 //fstp ptr[ebp+offset] 35 47 op_fstp_base_offset(type,REG_EBP,(int)pRelativeVar->offset); 36 obp-=sizeof(long);37 AddLocalVarAddrSchedule();38 obp+=sizeof(long);39 }48 } 49 obp-=sizeof(long); 50 AddLocalVarAddrSchedule(); 51 obp+=sizeof(long); 40 52 } 41 53 else if(pRelativeVar->dwKind==VAR_REFLOCAL){ … … 43 55 //add ecx,qword ptr[ebp+offset] 44 56 op_add_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32); 45 obp-=sizeof(long);46 AddLocalVarAddrSchedule();47 obp+=sizeof(long);48 57 } 49 58 else{ 50 59 //mov ecx,qword ptr[ebp+offset] 51 60 op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32); 52 obp-=sizeof(long);53 AddLocalVarAddrSchedule();54 obp+=sizeof(long);55 }61 } 62 obp-=sizeof(long); 63 AddLocalVarAddrSchedule(); 64 obp+=sizeof(long); 56 65 57 66 goto directmem; … … 151 160 //mov ptr[ecx+offset],eax/ax/al 152 161 op_mov_MR(var_size,reg,REG_ECX,(int)pRelative->offset,MOD_BASE_DISP32); 153 obp-=sizeof(long);154 pobj_GlobalVarSchedule->add();155 obp+=sizeof(long);156 162 } 157 163 else{ 158 164 //mov ptr[offset],eax/ax/al 159 165 op_mov_MR(var_size,reg,0,(int)pRelative->offset,MOD_DISP32); 160 obp-=sizeof(long); 161 pobj_GlobalVarSchedule->add(); 162 obp+=sizeof(long); 163 } 166 } 167 obp-=sizeof(long); 168 pobj_GlobalVarSchedule->add(); 169 obp+=sizeof(long); 170 } 171 else if(pRelative->dwKind==VAR_REFGLOBAL){ 172 if(pRelative->bOffsetOffset){ 173 //add ecx,qword ptr[offset] 174 op_add_RM(var_size,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32); 175 } 176 else{ 177 //mov ecx,qword ptr[offset] 178 op_mov_RM(var_size,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32); 179 } 180 obp-=sizeof(long); 181 pobj_GlobalVarSchedule->add(); 182 obp+=sizeof(long); 183 184 goto directmem; 164 185 } 165 186 else if(pRelative->dwKind==VAR_LOCAL){ … … 167 188 //mov ptr[ebp+ecx+offset],eax/ax/al 168 189 op_mov_MR_ex(var_size,reg,REG_EBP,REG_ECX,(int)pRelative->offset,USE_OFFSET); 169 obp-=sizeof(long);170 AddLocalVarAddrSchedule();171 obp+=sizeof(long);172 190 } 173 191 else{ 174 192 //mov ptr[ebp+offset],eax/ax/al 175 193 op_mov_MR(var_size,reg,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32); 176 obp-=sizeof(long);177 AddLocalVarAddrSchedule();178 obp+=sizeof(long);179 }194 } 195 obp-=sizeof(long); 196 AddLocalVarAddrSchedule(); 197 obp+=sizeof(long); 180 198 } 181 199 else if(pRelative->dwKind==VAR_REFLOCAL){ … … 183 201 //add ecx,qword ptr[ebp+offset] 184 202 op_add_RM(var_size,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32); 185 obp-=sizeof(long);186 AddLocalVarAddrSchedule();187 obp+=sizeof(long);188 203 } 189 204 else{ 190 205 //mov ecx,qword ptr[ebp+offset] 191 206 op_mov_RM(var_size,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32); 192 obp-=sizeof(long);193 AddLocalVarAddrSchedule();194 obp+=sizeof(long);195 }207 } 208 obp-=sizeof(long); 209 AddLocalVarAddrSchedule(); 210 obp+=sizeof(long); 196 211 197 212 goto directmem;
Note:
See TracChangeset
for help on using the changeset viewer.