Changeset 241 in dev for trunk/abdev/BasicCompiler32/Compile_Var.cpp
- Timestamp:
- Jul 27, 2007, 12:06:11 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Var.cpp
r237 r241 140 140 141 141 //add dword ptr[esp],eax 142 OpBuffer[obp++]=(char)0x01; 143 OpBuffer[obp++]=(char)0x04; 144 OpBuffer[obp++]=(char)0x24; 142 compiler.codeGenerator.PutOld( 143 (char)0x01, 144 (char)0x04, 145 (char)0x24 146 ); 145 147 146 148 HeapDefaultFree(pParm[i]); … … 238 240 if(offset){ 239 241 //add ecx,offset 240 OpBuffer[obp++]=(char)0x81; 241 OpBuffer[obp++]=(char)0xC1; 242 *((long *)(OpBuffer+obp))=offset; 243 obp+=sizeof(long); 242 compiler.codeGenerator.op_add_RV( REG_ECX, offset ); 244 243 } 245 244 … … 314 313 315 314 //mov ecx,dword ptr[ecx] 316 OpBuffer[obp++]=(char)0x8B; 317 OpBuffer[obp++]=(char)0x09; 315 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_ECX, REG_ECX, 0, MOD_BASE ); 318 316 } 319 317 else{ … … 669 667 670 668 //mov ecx,dword ptr[eax] 671 OpBuffer[obp++]=(char)0x8B; 672 OpBuffer[obp++]=(char)0x08; 669 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_ECX, REG_EAX, 0, MOD_BASE ); 673 670 } 674 671 } … … 690 687 691 688 //mov ecx,dword ptr[eax] 692 OpBuffer[obp++]=(char)0x8B; 693 OpBuffer[obp++]=(char)0x08; 689 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_ECX, REG_EAX, 0, MOD_BASE ); 694 690 } 695 691 else{ … … 964 960 if( type.IsDouble() ){ 965 961 //mov eax,HILONG(dbl) 966 OpBuffer[obp++]=(char)0xB8; 967 *((long *)(OpBuffer+obp))=(long)*(long *)(((char *)(&dbl))+4); 968 obp+=sizeof(long); 962 compiler.codeGenerator.op_mov_RV( REG_EAX, *(long *)(((char *)(&dbl))+4) ); 969 963 970 964 //mov dword ptr[ebp+offset+sizeof(long)],eax … … 1133 1127 1134 1128 //mov eax,ebp 1135 OpBuffer[obp++]=(char)0x8B; 1136 OpBuffer[obp++]=(char)0xC5; 1129 compiler.codeGenerator.op_mov_RR( REG_EAX, REG_EBP ); 1137 1130 1138 1131 //add eax,offset … … 1192 1185 if(pRelativeVar->bOffsetOffset){ 1193 1186 //mov eax,ecx 1194 OpBuffer[obp++]=(char)0x8B; 1195 OpBuffer[obp++]=(char)0xC1; 1187 compiler.codeGenerator.op_mov_RR( REG_EAX, REG_ECX ); 1196 1188 1197 1189 //add eax,dword ptr[offset] … … 1209 1201 1210 1202 //lea eax,dword ptr[ebp+ecx] 1211 OpBuffer[obp++]=(char)0x8D; 1212 OpBuffer[obp++]=(char)0x44; 1213 OpBuffer[obp++]=(char)0x0D; 1214 OpBuffer[obp++]=(char)0x00; 1203 compiler.codeGenerator.PutOld( 1204 (char)0x8D, 1205 (char)0x44, 1206 (char)0x0D, 1207 (char)0x00 1208 ); 1215 1209 } 1216 1210 else{
Note:
See TracChangeset
for help on using the changeset viewer.