Changeset 253 in dev for trunk/abdev/BasicCompiler32
- Timestamp:
- Jul 30, 2007, 4:12:54 PM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler32
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Calc_PushVar.cpp
r231 r253 26 26 if(pRelativeVar->bOffsetOffset){ 27 27 //fld ptr[ebp+ecx+offset] 28 compiler.codeGenerator.op_fld_base_offset_ex(type,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET, Schedule::LocalVar ); 28 compiler.codeGenerator.localVarPertialSchedules.push_back( 29 compiler.codeGenerator.op_fld_base_offset_ex(type,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET, Schedule::None, true ) 30 ); 29 31 } 30 32 else{ 31 33 //fld ptr[ebp+offset] 32 compiler.codeGenerator.op_fld_base_offset(type,REG_EBP,(int)pRelativeVar->offset, Schedule::LocalVar ); 34 compiler.codeGenerator.localVarPertialSchedules.push_back( 35 compiler.codeGenerator.op_fld_base_offset(type,REG_EBP,(int)pRelativeVar->offset, Schedule::None, true ) 36 ); 33 37 } 34 38 } … … 36 40 if(pRelativeVar->bOffsetOffset){ 37 41 //add ecx,qword ptr[ebp+offset] 38 compiler.codeGenerator.op_add_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 42 compiler.codeGenerator.localVarPertialSchedules.push_back( 43 compiler.codeGenerator.op_add_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true ) 44 ); 39 45 } 40 46 else{ 41 47 //mov ecx,qword ptr[ebp+offset] 42 compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 48 compiler.codeGenerator.localVarPertialSchedules.push_back( 49 compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true ) 50 ); 43 51 } 44 52 … … 102 110 if(pRelativeVar->bOffsetOffset){ 103 111 //mov reg, ptr[ebp+ecx+offset] 104 compiler.codeGenerator.op_mov_RM_ex(varSize,reg,REG_EBP,REG_ECX,(int)pRelativeVar->offset + offsetOf64Head,USE_OFFSET, Schedule::LocalVar ); 112 compiler.codeGenerator.localVarPertialSchedules.push_back( 113 compiler.codeGenerator.op_mov_RM_ex(varSize,reg,REG_EBP,REG_ECX,(int)pRelativeVar->offset + offsetOf64Head,USE_OFFSET, Schedule::None, true ) 114 ); 105 115 } 106 116 else{ 107 117 //mov reg, ptr[ebp+offset] 108 compiler.codeGenerator.op_mov_RM(varSize,reg,REG_EBP,(int)pRelativeVar->offset + offsetOf64Head,MOD_BASE_DISP32, Schedule::LocalVar ); 118 compiler.codeGenerator.localVarPertialSchedules.push_back( 119 compiler.codeGenerator.op_mov_RM(varSize,reg,REG_EBP,(int)pRelativeVar->offset + offsetOf64Head,MOD_BASE_DISP32, Schedule::None, true ) 120 ); 109 121 } 110 122 } … … 112 124 if(pRelativeVar->bOffsetOffset){ 113 125 //add ecx,qword ptr[ebp+offset] 114 compiler.codeGenerator.op_add_RM(varSize,REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 126 compiler.codeGenerator.localVarPertialSchedules.push_back( 127 compiler.codeGenerator.op_add_RM(varSize,REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true ) 128 ); 115 129 } 116 130 else{ 117 131 //mov ecx,qword ptr[ebp+offset] 118 compiler.codeGenerator.op_mov_RM(varSize,REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 132 compiler.codeGenerator.localVarPertialSchedules.push_back( 133 compiler.codeGenerator.op_mov_RM(varSize,REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true ) 134 ); 119 135 } 120 136 … … 162 178 if(pRelativeVar->bOffsetOffset){ 163 179 //add ecx,offset 164 compiler.codeGenerator.op_add_RV( REG_ECX, pRelativeVar->offset, Schedule::LocalVar ); 180 compiler.codeGenerator.localVarPertialSchedules.push_back( 181 compiler.codeGenerator.op_add_RV( REG_ECX, pRelativeVar->offset, Schedule::None, true ) 182 ); 165 183 166 184 //push dword ptr[ebp+ecx] … … 174 192 else{ 175 193 //push dword ptr[ebp+offset] 176 compiler.codeGenerator.op_push_M( REG_EBP, pRelativeVar->offset, Schedule::LocalVar ); 194 compiler.codeGenerator.localVarPertialSchedules.push_back( 195 compiler.codeGenerator.op_push_M( REG_EBP, pRelativeVar->offset, Schedule::None, true ) 196 ); 177 197 } 178 198 } 179 199 else if(pRelativeVar->dwKind==VAR_REFLOCAL){ 180 200 //mov eax,dword ptr[ebp+offset] 181 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EBP, pRelativeVar->offset, MOD_BASE_DISP32, Schedule::LocalVar ); 201 compiler.codeGenerator.localVarPertialSchedules.push_back( 202 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EBP, pRelativeVar->offset, MOD_BASE_DISP32, Schedule::None, true ) 203 ); 182 204 183 205 if(pRelativeVar->bOffsetOffset){ -
trunk/abdev/BasicCompiler32/Compile_CallProc.cpp
r250 r253 7 7 #include "../BasicCompiler_Common/common.h" 8 8 #include "Opcode.h" 9 10 //ローカル変数アドレススケジュール11 DWORD *pLocalVarAddrSchedule;12 int LocalVarAddrScheduleNum;13 9 14 10 void Call_DebugSys_SaveContext(){ … … 27 23 compiler.codeGenerator.op_call(pSub_DebugSys_SaveContext); 28 24 } 29 30 void AddLocalVarAddrSchedule(){31 extern HANDLE hHeap;32 33 //ローカル変数アドレススケジュールに追加する34 pLocalVarAddrSchedule=(DWORD *)HeapReAlloc(hHeap,0,pLocalVarAddrSchedule,(LocalVarAddrScheduleNum+1)*sizeof(DWORD));35 pLocalVarAddrSchedule[LocalVarAddrScheduleNum]=obp;36 LocalVarAddrScheduleNum++;37 }38 39 25 40 26 bool Opcode_CallProcPtr( const char *variable, const char *lpszParms,ProcPointer *pProcPointer){ -
trunk/abdev/BasicCompiler32/Compile_Object.cpp
r250 r253 16 16 //をセットしておかなければならない 17 17 18 int jnz_back; 19 20 21 //jnzの番地 22 jnz_back=obp; 18 //jnzのジャンプ先番地 19 extern int obp; 20 int jnz_back = obp; 23 21 24 22 if(bSomeObjects){ … … 263 261 264 262 //jnzの番地 265 int jnz_back;266 jnz_back=obp;263 extern int obp; 264 int jnz_back = obp; 267 265 268 266 //push ecx -
trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
r252 r253 236 236 extern HANDLE hHeap; 237 237 extern BOOL bDebugCompile; 238 int i3,i4, LocalVarSchedule,BaseOffset;238 int i3,i4,BaseOffset; 239 239 char temporary[VN_SIZE]; 240 240 … … 263 263 else bDebugSupportProc=0; 264 264 265 extern int obp; 265 266 pUserProc->SetBeginOpAddress( obp ); 266 267 … … 306 307 extern int AllLocalVarSize; 307 308 AllLocalVarSize=0; 308 309 //ローカル変数アドレススケジュール310 extern DWORD *pLocalVarAddrSchedule;311 extern int LocalVarAddrScheduleNum;312 pLocalVarAddrSchedule=(DWORD *)HeapAlloc(hHeap,0,1);313 LocalVarAddrScheduleNum=0;314 309 315 310 //パラメータ用の変数データを考慮 … … 362 357 363 358 //sub esp,AllLocalVarSize(スケジュール) 364 compiler.codeGenerator.op_sub_esp(0xFFFFFFFF); 365 LocalVarSchedule=obp-sizeof(long); 359 const PertialSchedule *pAllLocalVarPertialSchedule = compiler.codeGenerator.op_sub_esp( 0, true ); 366 360 367 361 //push ebp … … 641 635 { 642 636 //fld qword ptr[ebp+offset] 643 compiler.codeGenerator.op_fld_base_offset( i3, REG_EBP, RelativeVar.offset, Schedule::LocalVar ); 637 compiler.codeGenerator.localVarPertialSchedules.push_back( 638 compiler.codeGenerator.op_fld_base_offset( i3, REG_EBP, RelativeVar.offset, Schedule::None, true ) 639 ); 644 640 } 645 641 else if(i3==DEF_INT64||i3==DEF_QWORD){ 646 642 //mov eax,dword ptr[ebp+offset] 647 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::LocalVar ); 643 compiler.codeGenerator.localVarPertialSchedules.push_back( 644 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::None, true ) 645 ); 648 646 649 647 //mov edx,dword ptr[ebp+offset+sizeof(long)] 650 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EDX, REG_EBP, RelativeVar.offset+sizeof(long), MOD_BASE_DISP32, Schedule::LocalVar ); 648 compiler.codeGenerator.localVarPertialSchedules.push_back( 649 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EDX, REG_EBP, RelativeVar.offset+sizeof(long), MOD_BASE_DISP32, Schedule::None, true ) 650 ); 651 651 } 652 652 else if(i3==DEF_LONG||i3==DEF_DWORD|| 653 IsPtrType(i3)){ 653 IsPtrType(i3)) 654 { 654 655 //mov eax,dword ptr[ebp+offset] 655 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::LocalVar ); 656 compiler.codeGenerator.localVarPertialSchedules.push_back( 657 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::None, true ) 658 ); 656 659 } 657 660 else if(i3==DEF_INTEGER||i3==DEF_WORD || (Smoothie::IsUnicode()&&i3==DEF_CHAR)){ … … 660 663 661 664 //mov ax,word ptr[ebp+offset] 662 compiler.codeGenerator.op_mov_RM( sizeof(short), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::LocalVar ); 665 compiler.codeGenerator.localVarPertialSchedules.push_back( 666 compiler.codeGenerator.op_mov_RM( sizeof(short), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::None, true ) 667 ); 663 668 } 664 669 else if(i3==DEF_SBYTE||i3==DEF_BYTE||i3==DEF_BOOLEAN || (Smoothie::IsUnicode()==false&&i3==DEF_CHAR)){ … … 667 672 668 673 //mov al,byte ptr[ebp+offset] 669 compiler.codeGenerator.op_mov_RM( sizeof(char), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::LocalVar ); 674 compiler.codeGenerator.localVarPertialSchedules.push_back( 675 compiler.codeGenerator.op_mov_RM( sizeof(char), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::None, true ) 676 ); 670 677 } 671 678 } 672 679 673 680 //ローカル変数アドレススケジュール 674 for(i3=0;i3<LocalVarAddrScheduleNum;i3++){ 675 *((long *)(OpBuffer+pLocalVarAddrSchedule[i3]))+=AllLocalVarSize; 676 } 677 HeapDefaultFree(pLocalVarAddrSchedule); 681 BOOST_FOREACH( const PertialSchedule *pPertialSchedule, compiler.codeGenerator.localVarPertialSchedules ) 682 { 683 compiler.codeGenerator.opfix_offset( pPertialSchedule, AllLocalVarSize ); 684 } 685 compiler.codeGenerator.localVarPertialSchedules.clear(); 678 686 BOOST_FOREACH( Variable *pVar, pUserProc->GetLocalVars() ){ 679 687 //後にデバッグで利用する … … 685 693 686 694 //ローカル変数用メモリを確保するためのスケジュール(subコマンド) 687 *((long *)(OpBuffer+LocalVarSchedule))=AllLocalVarSize-BaseOffset;695 compiler.codeGenerator.opfix( pAllLocalVarPertialSchedule, AllLocalVarSize - BaseOffset ); 688 696 689 697 //pop edi -
trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp
r236 r253 120 120 if(pRelativeVar->bOffsetOffset){ 121 121 //fstp ptr[ebp+ecx+offset] 122 compiler.codeGenerator.op_fstp_base_offset_ex(VarType,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET, Schedule::LocalVar ); 122 compiler.codeGenerator.localVarPertialSchedules.push_back( 123 compiler.codeGenerator.op_fstp_base_offset_ex(VarType,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET, Schedule::None, true ) 124 ); 123 125 } 124 126 else{ 125 127 //fstp ptr[ebp+offset] 126 compiler.codeGenerator.op_fstp_base_offset(VarType,REG_EBP,(int)pRelativeVar->offset, Schedule::LocalVar ); 128 compiler.codeGenerator.localVarPertialSchedules.push_back( 129 compiler.codeGenerator.op_fstp_base_offset(VarType,REG_EBP,(int)pRelativeVar->offset, Schedule::None, true ) 130 ); 127 131 } 128 132 } … … 130 134 if(pRelativeVar->bOffsetOffset){ 131 135 //add ecx,qword ptr[ebp+offset] 132 compiler.codeGenerator.op_add_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 136 compiler.codeGenerator.localVarPertialSchedules.push_back( 137 compiler.codeGenerator.op_add_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true ) 138 ); 133 139 } 134 140 else{ 135 141 //mov ecx,qword ptr[ebp+offset] 136 compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 142 compiler.codeGenerator.localVarPertialSchedules.push_back( 143 compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true ) 144 ); 137 145 } 138 146 … … 239 247 // 64bitへ 240 248 // st(0) -> edx:eax 241 breakpoint;242 249 243 250 //push … … 338 345 if(pRelative->bOffsetOffset){ 339 346 //mov ptr[ebp+ecx+offset],eax/ax/al 340 compiler.codeGenerator.op_mov_MR_ex(varSize,REG_EAX,REG_EBP,REG_ECX,(int)pRelative->offset,USE_OFFSET, Schedule::LocalVar ); 347 compiler.codeGenerator.localVarPertialSchedules.push_back( 348 compiler.codeGenerator.op_mov_MR_ex(varSize,REG_EAX,REG_EBP,REG_ECX,(int)pRelative->offset,USE_OFFSET, Schedule::None, true ) 349 ); 341 350 } 342 351 else{ 343 352 //mov ptr[ebp+offset],eax/ax/al 344 compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 353 compiler.codeGenerator.localVarPertialSchedules.push_back( 354 compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::None, true ) 355 ); 345 356 } 346 357 } … … 348 359 if(pRelative->bOffsetOffset){ 349 360 //add ecx,ptr[ebp+offset] 350 compiler.codeGenerator.op_add_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 361 compiler.codeGenerator.localVarPertialSchedules.push_back( 362 compiler.codeGenerator.op_add_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::None, true ) 363 ); 351 364 } 352 365 else{ 353 366 //mov ecx,ptr[ebp+offset] 354 compiler.codeGenerator.op_mov_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 367 compiler.codeGenerator.localVarPertialSchedules.push_back( 368 compiler.codeGenerator.op_mov_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::None, true ) 369 ); 355 370 } 356 371 -
trunk/abdev/BasicCompiler32/Compile_Statement.cpp
r250 r253 240 240 241 241 //レキシカルスコープをレベルアップ 242 extern int obp; 242 243 compiler.codeGenerator.lexicalScopes.Start( obp, LexicalScope::SCOPE_TYPE_IF ); 243 244 … … 308 309 { 309 310 //jmp ...(schedule) 310 compiler.codeGenerator.op_jmp_goto_schedule( GotoLabelSchedule( (const std::string)(Parameter + 1), obp, cp ) ); 311 extern int obp; 312 compiler.codeGenerator.op_jmp_goto_schedule( (const std::string)(Parameter + 1), 0, cp ); 311 313 } 312 314 else 313 315 { 314 316 //jmp ... 317 extern int obp; 315 318 compiler.codeGenerator.op_jmp( i-obp, sizeof(long), false, true ); 316 319 } … … 323 326 { 324 327 //jmp ...(schedule) 325 compiler.codeGenerator.op_jmp_goto_schedule( GotoLabelSchedule( LineNum, obp, cp ) ); 328 extern int obp; 329 compiler.codeGenerator.op_jmp_goto_schedule( "", LineNum, cp ); 326 330 } 327 331 else 328 332 { 329 333 //jmp ... 334 extern int obp; 330 335 compiler.codeGenerator.op_jmp( i-obp, sizeof(long), false, true ); 331 336 } … … 436 441 437 442 //レキシカルスコープをレベルアップ 443 extern int obp; 438 444 compiler.codeGenerator.lexicalScopes.Start( obp, LexicalScope::SCOPE_TYPE_WHILE ); 439 445 … … 552 558 553 559 //レキシカルスコープをレベルアップ 560 extern int obp; 554 561 compiler.codeGenerator.lexicalScopes.Start( obp, LexicalScope::SCOPE_TYPE_FOR ); 555 562 … … 588 595 589 596 //レキシカルスコープをレベルアップ 597 extern int obp; 590 598 compiler.codeGenerator.lexicalScopes.Start( obp, LexicalScope::SCOPE_TYPE_DO ); 591 599 … … 1030 1038 1031 1039 //レキシカルスコープをレベルアップ 1040 extern int obp; 1032 1041 compiler.codeGenerator.lexicalScopes.Start( obp, LexicalScope::SCOPE_TYPE_SELECT ); 1033 1042 … … 1079 1088 void OpcodeGosub(char *Parameter){ 1080 1089 extern HANDLE hHeap; 1090 extern int obp; 1081 1091 int i,LineNum; 1082 1092 … … 1087 1097 { 1088 1098 //jmp ...(schedule) 1089 compiler.codeGenerator.op_jmp_goto_schedule( GotoLabelSchedule( (const std::string)(Parameter + 1), obp, cp ));1099 compiler.codeGenerator.op_jmp_goto_schedule( (const std::string)(Parameter + 1), 0, cp ); 1090 1100 } 1091 1101 else … … 1102 1112 { 1103 1113 //jmp ...(schedule) 1104 compiler.codeGenerator.op_jmp_goto_schedule( GotoLabelSchedule( LineNum, obp, cp ));1114 compiler.codeGenerator.op_jmp_goto_schedule( "", LineNum, cp ); 1105 1115 } 1106 1116 else -
trunk/abdev/BasicCompiler32/Compile_Var.cpp
r250 r253 963 963 964 964 //mov dword ptr[ebp+offset+sizeof(long)],eax 965 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset+sizeof(long), MOD_BASE_DISP32, Schedule::LocalVar ); 965 compiler.codeGenerator.localVarPertialSchedules.push_back( 966 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset+sizeof(long), MOD_BASE_DISP32, Schedule::None, true ) 967 ); 966 968 967 969 //mov eax,LOLONG(dbl) … … 969 971 970 972 //mov dword ptr[ebp+offset],eax 971 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset, MOD_BASE_DISP32, Schedule::LocalVar ); 973 compiler.codeGenerator.localVarPertialSchedules.push_back( 974 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset, MOD_BASE_DISP32, Schedule::None, true ) 975 ); 972 976 } 973 977 else if( type.IsSingle() ){ … … 979 983 980 984 //mov dword ptr[ebp+offset],eax 981 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset, MOD_BASE_DISP32, Schedule::LocalVar ); 985 compiler.codeGenerator.localVarPertialSchedules.push_back( 986 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset, MOD_BASE_DISP32, Schedule::None, true ) 987 ); 982 988 } 983 989 else if( type.Is64() ){ … … 986 992 987 993 //mov dword ptr[ebp+offset+sizeof(long)],eax 988 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset+sizeof(long), MOD_BASE_DISP32, Schedule::LocalVar ); 994 compiler.codeGenerator.localVarPertialSchedules.push_back( 995 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset+sizeof(long), MOD_BASE_DISP32, Schedule::None, true ) 996 ); 989 997 990 998 //mov eax,LOLONG(i64data) … … 992 1000 993 1001 //mov dword ptr[ebp+offset],eax 994 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset, MOD_BASE_DISP32, Schedule::LocalVar ); 1002 compiler.codeGenerator.localVarPertialSchedules.push_back( 1003 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset, MOD_BASE_DISP32, Schedule::None, true ) 1004 ); 995 1005 } 996 1006 else if( type.IsDWord() || type.IsLong() || type.IsPointer() ){ … … 1012 1022 1013 1023 //mov dword ptr[ebp+offset],eax 1014 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset, MOD_BASE_DISP32, Schedule::LocalVar ); 1024 compiler.codeGenerator.localVarPertialSchedules.push_back( 1025 compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_EBP, offset, MOD_BASE_DISP32, Schedule::None, true ) 1026 ); 1015 1027 } 1016 1028 else if( type.IsWord() || type.IsInteger() ){ 1017 1029 //mov word ptr[ebp+offset],InitValue 1018 compiler.codeGenerator.op_mov_MV( sizeof(short), REG_EBP, offset, Schedule::LocalVar, (long)i64data ); 1030 compiler.codeGenerator.localVarPertialSchedules.push_back( 1031 compiler.codeGenerator.op_mov_MV( sizeof(short), REG_EBP, offset, Schedule::None, true, (long)i64data ) 1032 ); 1019 1033 } 1020 1034 else if( type.IsSByte() || type.IsByte() || type.IsBoolean() ){ 1021 1035 //mov byte ptr[ebp+offset],InitValue 1022 compiler.codeGenerator.op_mov_MV( sizeof(char), REG_EBP, offset, Schedule::LocalVar, (long)i64data ); 1036 compiler.codeGenerator.localVarPertialSchedules.push_back( 1037 compiler.codeGenerator.op_mov_MV( sizeof(char), REG_EBP, offset, Schedule::None, true, (long)i64data ) 1038 ); 1023 1039 } 1024 1040 … … 1130 1146 1131 1147 //add eax,offset 1132 compiler.codeGenerator.op_add_RV( REG_EAX, -pVar->GetOffsetAddress(), Schedule::LocalVar ); 1148 compiler.codeGenerator.localVarPertialSchedules.push_back( 1149 compiler.codeGenerator.op_add_RV( REG_EAX, -pVar->GetOffsetAddress(), Schedule::None, true ) 1150 ); 1133 1151 1134 1152 //push eax … … 1193 1211 if(pRelativeVar->bOffsetOffset){ 1194 1212 //add ecx,offset 1195 compiler.codeGenerator.op_add_RV( REG_ECX, pRelativeVar->offset, Schedule::LocalVar ); 1213 compiler.codeGenerator.localVarPertialSchedules.push_back( 1214 compiler.codeGenerator.op_add_RV( REG_ECX, pRelativeVar->offset, Schedule::None, true ) 1215 ); 1196 1216 1197 1217 //lea eax,dword ptr[ebp+ecx] … … 1205 1225 else{ 1206 1226 //lea eax,dword ptr[ecx+offset] 1207 compiler.codeGenerator.op_lea_RM( REG_EAX, REG_EBP, pRelativeVar->offset, MOD_BASE_DISP32, Schedule::LocalVar ); 1227 compiler.codeGenerator.localVarPertialSchedules.push_back( 1228 compiler.codeGenerator.op_lea_RM( REG_EAX, REG_EBP, pRelativeVar->offset, MOD_BASE_DISP32, Schedule::None, true ) 1229 ); 1208 1230 } 1209 1231 } … … 1214 1236 1215 1237 //add eax,dword ptr[ebp+offset] 1216 compiler.codeGenerator.op_add_RM( sizeof(long), REG_EAX, REG_EBP, pRelativeVar->offset, MOD_BASE_DISP32, Schedule::LocalVar ); 1238 compiler.codeGenerator.localVarPertialSchedules.push_back( 1239 compiler.codeGenerator.op_add_RM( sizeof(long), REG_EAX, REG_EBP, pRelativeVar->offset, MOD_BASE_DISP32, Schedule::None, true ) 1240 ); 1217 1241 } 1218 1242 else{ 1219 1243 //mov eax,dword ptr[ebp+offset] 1220 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EBP, pRelativeVar->offset, MOD_BASE_DISP32, Schedule::LocalVar ); 1244 compiler.codeGenerator.localVarPertialSchedules.push_back( 1245 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EBP, pRelativeVar->offset, MOD_BASE_DISP32, Schedule::None, true ) 1246 ); 1221 1247 } 1222 1248 } -
trunk/abdev/BasicCompiler32/MakePeHdr.cpp
r248 r253 382 382 pobj_Reloc=new CReloc(); 383 383 384 extern char *OpBuffer; 385 extern int obp; 384 386 obp_AllocSize=8192*2; 385 387 OpBuffer=(char *)malloc(obp_AllocSize); … … 440 442 441 443 //未完成 442 // OpBuffer[obp++]=(char)0xCC;444 //breakpoint; 443 445 444 446 … … 471 473 472 474 //Goto未知ラベルスケジュールが存在したらエラーにする 473 BOOST_FOREACH( const GotoLabelSchedule &gotoLabelSchedule, compiler.codeGenerator.gotoLabelSchedules )475 BOOST_FOREACH( const GotoLabelSchedule *pGotoLabelSchedule, compiler.codeGenerator.gotoLabelSchedules ) 474 476 { 475 if( gotoLabelSchedule.GetName().size()>0){476 SetError(6, gotoLabelSchedule.GetName(),gotoLabelSchedule.GetSourceCodePos());477 if(pGotoLabelSchedule->GetName().size()>0){ 478 SetError(6,pGotoLabelSchedule->GetName(),pGotoLabelSchedule->GetSourceCodePos()); 477 479 } 478 480 else{ 479 sprintf(temporary,"%d", gotoLabelSchedule.GetLineNum());480 SetError(6,temporary, gotoLabelSchedule.GetSourceCodePos());481 sprintf(temporary,"%d",pGotoLabelSchedule->GetLineNum()); 482 SetError(6,temporary,pGotoLabelSchedule->GetSourceCodePos()); 481 483 } 482 484 } -
trunk/abdev/BasicCompiler32/NumOpe.cpp
r237 r253 631 631 632 632 //リテラル演算の場合を考慮した演算前のバッファ位置 633 int BeforeObp;634 BeforeObp=obp;633 extern int obp; 634 int BeforeObp = obp; 635 635 636 636 //リテラル演算の場合を考慮した演算前のプロシージャスケジュール位置 -
trunk/abdev/BasicCompiler32/Opcode.h
r250 r253 16 16 17 17 extern int cp; 18 extern int obp; 19 extern char *OpBuffer; 20 21 #define breakpoint OpBuffer[obp++]=(char)0xCC; 18 19 #define breakpoint compiler.codeGenerator.PutOld( (char)0xCC ); 22 20 23 21 … … 215 213 216 214 //Compile_CallProc.cpp 217 void AddLocalVarAddrSchedule();218 215 #define PROCFLAG_NEW 1 219 216 bool Opcode_CallProcPtr( const char *variable, const char *lpszParms,ProcPointer *pProcPointer); … … 252 249 253 250 254 ////////////////////////////////255 // IA-32機械語生成に利用する関数郡256 ////////////////////////////////257 258 251 //op32_main.cpp 259 252 BOOL IsSafeReg(int reg); 260 /*261 void op_mov_RV (int reg,int offset);262 void op_mov_RV (int op_size,int reg,int offset);263 void op_mov_RR (int reg1,int reg2);264 void op_mov_RM (int op_size,int reg,int base_reg,int offset,char mod);265 void op_mov_RM_ex (int op_size,int reg,int base_reg1,int base_reg2,int offset,BOOL bUseOffset);266 void op_mov_MR (int op_size,int reg,int base_reg,int offset,char mod);267 void op_mov_MR_ex (int op_size,int reg,int base_reg1,int base_reg2,int offset,BOOL bUseOffset);268 void op_movsx_R32R16 (int reg32,int reg16);269 void op_movsx_R32R8 (int reg32,int reg8);270 void op_movsx_R16R8 (int reg16,int reg8);271 void op_inc (int reg);272 void op_dec (int reg);273 void op_add_RV8 (int reg,char cValue);274 void op_add_RM (int op_size,int reg,int base_reg,int offset,char mod);275 void op_adc_RV8 (int reg,char cValue);276 void op_sub_RV8 (int reg,char cValue);277 void op_sbb_RV8 (int reg,char cValue);278 void op_sbb_RR ( int reg1, int reg2 );279 void op_imul_RR (int reg1,int reg2);280 void op_imul_RV (int reg,int i32data);281 void op_and_RV (int reg,int value);282 void op_or_RR ( int op_size, int reg1, int reg2 );283 void op_neg ( int reg );284 void op_cdq ();285 286 void op_rep_movs (int op_size);287 288 void op_push(int reg);289 void op_push_V(long data);290 void op_pop(int reg = REG_NON);291 void op_add_esp(int num);292 void op_sub_esp(int num);293 void op_cmp_RR( int reg1, int reg2 );294 void op_cmp_value(int op_size,int reg,char byte_data);295 void op_setne( int reg );296 void op_test(int reg1,int reg2);297 void op_fld_ptr_esp(int type);298 void op_fld_basereg (int type,int base_reg);299 void op_fld_base_offset (int type,int base_reg,int offset);300 void op_fld_base_offset_ex (int type,int base_reg1,int base_reg2,int offset,BOOL bUseOffset);301 void op_fstp_basereg (int type,int base_reg);302 void op_fstp_base_offset (int type,int base_reg,int offset);303 void op_fstp_base_offset_ex (int type,int base_reg1,int base_reg2,int offset,BOOL bUseOffset);304 void op_fstp_push ( Type &type );305 void op_fistp_ptr_esp ( int typeSize );306 void op_zero_reg(int reg);307 void fpu_cast();308 void fpu_cast_end();309 310 void op_call(const UserProc *pUserProc);311 void op_ret();312 */ -
trunk/abdev/BasicCompiler32/x86CodeGenerator.cpp
r251 r253 124 124 /////////////////// 125 125 126 void CodeGenerator::op_mov_MV( int op_size, int base_reg, long offset, Schedule::Type offsetScheduleType, long value, Schedule::Type valueScheduleType )126 const PertialSchedule *CodeGenerator::op_mov_MV( int op_size, int base_reg, long offset, Schedule::Type offsetScheduleType, bool isPertialSchedule, long value, Schedule::Type valueScheduleType ) 127 127 { 128 128 //mov ptr[base_reg+offset],value 129 const PertialSchedule *pPertialSchedule = NULL; 129 130 130 131 if( op_size == sizeof(char) ) … … 132 133 pNativeCode->Put( (char)0xC6 ); 133 134 pNativeCode->Put( (char)(0x80|REGISTER_OPERAND(base_reg)) ); 135 136 if( isPertialSchedule ) 137 { 138 pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) ); 139 pPertialSchedule = pertialSchedules.back(); 140 } 134 141 pNativeCode->Put( offset, offsetScheduleType ); 142 135 143 pNativeCode->Put( (char)value ); 136 144 } … … 140 148 pNativeCode->Put( (char)0xC7 ); 141 149 pNativeCode->Put( (char)(0x80|REGISTER_OPERAND(base_reg)) ); 150 151 if( isPertialSchedule ) 152 { 153 pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) ); 154 pPertialSchedule = pertialSchedules.back(); 155 } 142 156 pNativeCode->Put( offset, offsetScheduleType ); 157 143 158 pNativeCode->Put( (short)value ); 144 159 } … … 147 162 pNativeCode->Put( (char)0xC7 ); 148 163 pNativeCode->Put( (char)(0x80|REGISTER_OPERAND(base_reg)) ); 164 165 if( isPertialSchedule ) 166 { 167 pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) ); 168 pPertialSchedule = pertialSchedules.back(); 169 } 149 170 pNativeCode->Put( offset, offsetScheduleType ); 171 150 172 pNativeCode->Put( value, valueScheduleType ); 151 173 } 174 175 return pPertialSchedule; 152 176 } 153 177 void CodeGenerator::op_mov_RV(int reg,long offset, Schedule::Type scheduleType ){ … … 169 193 pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) ); 170 194 } 171 void CodeGenerator::op_mov_RM(int op_size,int reg,int base_reg,int offset,char mod, Schedule::Type scheduleType ){195 const PertialSchedule *CodeGenerator::op_mov_RM(int op_size,int reg,int base_reg,int offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){ 172 196 //mov reg32,dword ptr[base_reg+offset] 173 197 //mov reg16,word ptr[base_reg+offset] … … 183 207 else opcode=(char)0x8B; 184 208 185 __op_format(op_prefix,opcode,0,reg,base_reg,offset,mod, scheduleType );186 } 187 void CodeGenerator::op_mov_RM_ex(int op_size,int reg,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType ){209 return __op_format(op_prefix,opcode,0,reg,base_reg,offset,mod, scheduleType, isPertialSchedule ); 210 } 211 const PertialSchedule *CodeGenerator::op_mov_RM_ex(int op_size,int reg,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType, bool isPertialSchedule ){ 188 212 //mov reg32,dword ptr[base_reg1+base_reg2+offset] 189 213 //mov reg16,word ptr[base_reg1+base_reg2+offset] 190 214 //mov reg8,byte ptr[base_reg1+base_reg2+offset] 215 const PertialSchedule *pPertialSchedule = NULL; 191 216 192 217 if(base_reg1==REG_ESP){ … … 215 240 216 241 //オフセット値 242 if( isPertialSchedule ) 243 { 244 pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) ); 245 pPertialSchedule = pertialSchedules.back(); 246 } 217 247 pNativeCode->Put( offset, scheduleType ); 218 248 } … … 228 258 pNativeCode->Put( (char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2)) ); 229 259 } 230 } 231 void CodeGenerator::op_mov_MR(int op_size,int reg,int base_reg,int offset,char mod, Schedule::Type scheduleType ){ 260 return pPertialSchedule; 261 } 262 const PertialSchedule *CodeGenerator::op_mov_MR(int op_size,int reg,int base_reg,int offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){ 232 263 //mov dword ptr[base_reg+offset],reg32 233 264 //mov word ptr[base_reg+offset],reg16 … … 243 274 else opcode=(char)0x89; 244 275 245 __op_format(op_prefix,opcode,0,reg,base_reg,offset,mod, scheduleType );246 } 247 void CodeGenerator::op_mov_MR_ex(int op_size,int reg,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType ){276 return __op_format(op_prefix,opcode,0,reg,base_reg,offset,mod, scheduleType, isPertialSchedule ); 277 } 278 const PertialSchedule *CodeGenerator::op_mov_MR_ex(int op_size,int reg,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType, bool isPertialSchedule ){ 248 279 //mov dword ptr[base_reg1+base_reg2+offset],reg32 249 280 //mov word ptr[base_reg1+base_reg2+offset],reg16 250 281 //mov byte ptr[base_reg1+base_reg2+offset],reg8 282 const PertialSchedule *pPertialSchedule = NULL; 251 283 252 284 if(base_reg1==REG_ESP){ … … 275 307 276 308 //オフセット値 309 if( isPertialSchedule ) 310 { 311 pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) ); 312 pPertialSchedule = pertialSchedules.back(); 313 } 277 314 pNativeCode->Put( offset, scheduleType ); 278 315 } … … 288 325 pNativeCode->Put( (char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2)) ); 289 326 } 327 return pPertialSchedule; 290 328 } 291 329 … … 355 393 ////////////////////////////////// 356 394 357 void CodeGenerator::op_lea_RM( int reg, int base_reg, long offset, char mod, Schedule::Type scheduleType )395 const PertialSchedule *CodeGenerator::op_lea_RM( int reg, int base_reg, long offset, char mod, Schedule::Type scheduleType, bool isPertialSchedule ) 358 396 { 359 397 //16ビット演算の命令プリフィックス … … 363 401 char opcode=(char)0x8D; 364 402 365 __op_format( op_prefix, opcode, 0, reg, base_reg, offset, mod, scheduleType );403 return __op_format( op_prefix, opcode, 0, reg, base_reg, offset, mod, scheduleType, isPertialSchedule ); 366 404 } 367 405 … … 408 446 pNativeCode->Put( cValue ); 409 447 } 410 void CodeGenerator::op_add_RV( int reg, long offset, Schedule::Type scheduleType )448 const PertialSchedule *CodeGenerator::op_add_RV( int reg, long offset, Schedule::Type scheduleType, bool isPertialSchedule ) 411 449 { 412 450 // add reg,offset 451 const PertialSchedule *pPertialSchedule = NULL; 413 452 414 453 if( reg == REG_EAX ) … … 416 455 // eaxのみ特殊 417 456 pNativeCode->Put( (char)0x05 ); 418 pNativeCode->Put( offset, scheduleType );419 457 } 420 458 else … … 422 460 pNativeCode->Put( (char)0x81 ); 423 461 pNativeCode->Put( (char)(0xC0|REGISTER_OPERAND(reg)) ); 424 pNativeCode->Put( offset, scheduleType ); 425 } 462 } 463 464 // オフセット値 465 if( isPertialSchedule ) 466 { 467 pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) ); 468 pPertialSchedule = pertialSchedules.back(); 469 } 470 pNativeCode->Put( offset, scheduleType ); 471 472 return pPertialSchedule; 426 473 } 427 474 void CodeGenerator::op_add_RR( int reg1, int reg2 ) … … 435 482 __op_format(op_prefix,opcode,0,reg1,reg2,0,MOD_REG); 436 483 } 437 void CodeGenerator::op_add_RM(int op_size,int reg,int base_reg,int offset,char mod, Schedule::Type scheduleType ){484 const PertialSchedule *CodeGenerator::op_add_RM(int op_size,int reg,int base_reg,int offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){ 438 485 //add reg32,dword ptr[base_reg+offset] 439 486 //add reg16,word ptr[base_reg+offset] … … 449 496 else opcode=(char)0x03; 450 497 451 __op_format(op_prefix,opcode,0,reg,base_reg,offset,mod, scheduleType );498 return __op_format(op_prefix,opcode,0,reg,base_reg,offset,mod, scheduleType, isPertialSchedule ); 452 499 } 453 500 void CodeGenerator::op_adc_RV8(int reg,char cValue){ … … 787 834 } 788 835 } 789 void CodeGenerator::op_sub_esp(long num){836 const PertialSchedule *CodeGenerator::op_sub_esp( long num, bool isPertialSchedule ){ 790 837 //スタックポインタの減算(push方向) 838 const PertialSchedule *pPertialSchedule = NULL; 791 839 792 840 //sub esp,num 793 if( 0xFFFFFF80&num){841 if( (0xFFFFFF80&num) != 0 || isPertialSchedule ){ 794 842 pNativeCode->Put( (char)0x81 ); 795 843 pNativeCode->Put( (char)0xEC ); 844 845 if( isPertialSchedule ) 846 { 847 pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) ); 848 pPertialSchedule = pertialSchedules.back(); 849 } 796 850 pNativeCode->Put( num ); 797 851 } … … 802 856 pNativeCode->Put( (char)num ); 803 857 } 858 859 return pPertialSchedule; 804 860 } 805 861 … … 922 978 } 923 979 } 924 void CodeGenerator::op_fld_base_offset(int type,int base_reg,long offset, Schedule::Type scheduleType ){980 const PertialSchedule *CodeGenerator::op_fld_base_offset(int type,int base_reg,long offset, Schedule::Type scheduleType, bool isPertialSchedule ){ 925 981 //fld ptr[reg+offset] 982 const PertialSchedule *pPertialSchedule = NULL; 926 983 927 984 //オペコード … … 940 997 941 998 //オフセット値 999 if( isPertialSchedule ) 1000 { 1001 pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) ); 1002 pPertialSchedule = pertialSchedules.back(); 1003 } 942 1004 pNativeCode->Put( offset, scheduleType ); 943 } 944 void CodeGenerator::op_fld_base_offset_ex(int type,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType ){ 1005 1006 return pPertialSchedule; 1007 } 1008 const PertialSchedule *CodeGenerator::op_fld_base_offset_ex(int type,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType, bool isPertialSchedule ){ 945 1009 //fld ptr[base_reg1+base_reg2+offset] 1010 const PertialSchedule *pPertialSchedule = NULL; 946 1011 947 1012 if(base_reg1==REG_ESP){ … … 969 1034 970 1035 //オフセット値 1036 if( isPertialSchedule ) 1037 { 1038 pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) ); 1039 pPertialSchedule = pertialSchedules.back(); 1040 } 971 1041 pNativeCode->Put( offset, scheduleType ); 972 1042 } … … 982 1052 pNativeCode->Put( (char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2)) ); 983 1053 } 1054 1055 return pPertialSchedule; 984 1056 } 985 1057 void CodeGenerator::op_fstp_basereg(int type,int base_reg){ … … 1003 1075 } 1004 1076 } 1005 void CodeGenerator::op_fstp_base_offset(int type,int base_reg,long offset, Schedule::Type scheduleType ){1077 const PertialSchedule *CodeGenerator::op_fstp_base_offset(int type,int base_reg,long offset, Schedule::Type scheduleType, bool isPertialSchedule ){ 1006 1078 //fstp ptr[reg+offset] 1079 const PertialSchedule *pPertialSchedule = NULL; 1007 1080 1008 1081 //オペコード … … 1021 1094 1022 1095 //オフセット値 1096 if( isPertialSchedule ) 1097 { 1098 pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) ); 1099 pPertialSchedule = pertialSchedules.back(); 1100 } 1023 1101 pNativeCode->Put( offset, scheduleType ); 1024 } 1025 void CodeGenerator::op_fstp_base_offset_ex(int type,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType ){ 1102 1103 return pPertialSchedule; 1104 } 1105 const PertialSchedule *CodeGenerator::op_fstp_base_offset_ex(int type,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType, bool isPertialSchedule ){ 1026 1106 //fstp ptr[base_reg1+base_reg2+offset] 1107 const PertialSchedule *pPertialSchedule = NULL; 1027 1108 1028 1109 if(base_reg1==REG_ESP){ … … 1050 1131 1051 1132 //オフセット値 1133 if( isPertialSchedule ) 1134 { 1135 pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) ); 1136 pPertialSchedule = pertialSchedules.back(); 1137 } 1052 1138 pNativeCode->Put( offset, scheduleType ); 1053 1139 } … … 1063 1149 pNativeCode->Put( (char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2)) ); 1064 1150 } 1151 1152 return pPertialSchedule; 1065 1153 } 1066 1154 void CodeGenerator::op_fistp_ptr_esp( int typeSize ){
Note:
See TracChangeset
for help on using the changeset viewer.