Changeset 235 in dev for trunk/abdev/BasicCompiler32/Compile_Func.cpp
- Timestamp:
- Jul 25, 2007, 11:54:20 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Func.cpp
r227 r235 154 154 155 155 //push 0 156 OpBuffer[obp++]=(char)0x6A; 157 OpBuffer[obp++]=(char)0x00; 156 compiler.codeGenerator.op_push_V( 0 ); 158 157 159 158 //push eax … … 161 160 162 161 //fild qword ptr[esp] 163 OpBuffer[obp++]=(char)0xDF; 164 OpBuffer[obp++]=(char)0x2C; 165 OpBuffer[obp++]=(char)0x24; 162 compiler.codeGenerator.op_fld_ptr_esp(DEF_INT64); 166 163 167 164 //add esp,8 … … 213 210 if(bArrayHead) typeSize*=JumpSubScripts(subscripts); 214 211 215 //mov eax,TypeSize 216 OpBuffer[obp++]=(char)0xB8; 217 *((long *)(OpBuffer+obp))=typeSize; 218 obp+=sizeof(long); 212 //mov eax,typeSize 213 compiler.codeGenerator.op_mov_RV( REG_EAX, typeSize ); 219 214 } 220 215 void Opcode_Func_AddressOf( const char *name ){ … … 296 291 297 292 //mov edx,dword ptr[ecx] 298 OpBuffer[obp++]=(char)0x8B; 299 OpBuffer[obp++]=(char)0x11; 293 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EDX, REG_ECX, 0, MOD_BASE ); 300 294 301 295 int i2 = pobj_c->GetFuncNumInVtbl( pUserProc ); … … 419 413 420 414 //fld qword ptr[eax] 421 OpBuffer[obp++]=(char)0xDD; 422 OpBuffer[obp++]=(char)0x00; 415 compiler.codeGenerator.PutOld( 416 (char)0xDD, 417 (char)0x00 418 ); 423 419 } 424 420 else if(type==DEF_SINGLE||type==DEF_DWORD){ … … 427 423 428 424 //mov eax,dword ptr[eax] 429 OpBuffer[obp++]=(char)0x8B; 430 OpBuffer[obp++]=(char)0x00; 425 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EAX, 0, MOD_BASE ); 431 426 } 432 427 else if(type==DEF_QWORD){ … … 448 443 449 444 //mov ax,word ptr[ebx] 450 OpBuffer[obp++]=(char)0x66; 451 OpBuffer[obp++]=(char)0x8B; 452 OpBuffer[obp++]=(char)0x03; 445 compiler.codeGenerator.op_mov_RM( sizeof(short), REG_EAX, REG_EBX, 0, MOD_BASE ); 453 446 } 454 447 else if(type==DEF_BYTE){ … … 460 453 461 454 //mov al,byte ptr[ebx] 462 OpBuffer[obp++]=(char)0x8A; 463 OpBuffer[obp++]=(char)0x03; 455 compiler.codeGenerator.op_mov_RM( sizeof(char), REG_EAX, REG_EBX, 0, MOD_BASE ); 464 456 } 465 457 }
Note:
See TracChangeset
for help on using the changeset viewer.