Changeset 220 in dev
- Timestamp:
- Jul 18, 2007, 4:23:29 AM (17 years ago)
- Location:
- trunk/abdev
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/BasicCompiler.vcproj
r219 r220 478 478 <Tool 479 479 Name="VCCLCompilerTool" 480 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"481 480 UsePrecompiledHeader="0" 482 481 BrowseInformation="0" … … 501 500 <Tool 502 501 Name="VCCLCompilerTool" 503 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"504 502 UsePrecompiledHeader="0" 505 503 BrowseInformation="0" … … 524 522 <Tool 525 523 Name="VCCLCompilerTool" 526 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"527 524 UsePrecompiledHeader="0" 528 525 BrowseInformation="0" … … 547 544 <Tool 548 545 Name="VCCLCompilerTool" 549 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"550 546 UsePrecompiledHeader="0" 551 547 BrowseInformation="0" … … 573 569 <Tool 574 570 Name="VCCLCompilerTool" 575 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"576 571 UsePrecompiledHeader="0" 577 572 BrowseInformation="0" … … 596 591 <Tool 597 592 Name="VCCLCompilerTool" 598 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"599 593 UsePrecompiledHeader="0" 600 594 BrowseInformation="0" … … 619 613 <Tool 620 614 Name="VCCLCompilerTool" 621 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"622 615 UsePrecompiledHeader="0" 623 616 BrowseInformation="0" … … 646 639 <Tool 647 640 Name="VCCLCompilerTool" 648 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"649 641 UsePrecompiledHeader="0" 650 642 BrowseInformation="0" … … 669 661 <Tool 670 662 Name="VCCLCompilerTool" 671 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"672 663 UsePrecompiledHeader="0" 673 664 BrowseInformation="0" … … 692 683 <Tool 693 684 Name="VCCLCompilerTool" 694 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"695 685 UsePrecompiledHeader="0" 696 686 BrowseInformation="0" … … 715 705 <Tool 716 706 Name="VCCLCompilerTool" 717 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"718 707 UsePrecompiledHeader="0" 719 708 BrowseInformation="0" … … 738 727 <Tool 739 728 Name="VCCLCompilerTool" 740 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"741 729 UsePrecompiledHeader="0" 742 730 BrowseInformation="0" … … 777 765 <Tool 778 766 Name="VCCLCompilerTool" 779 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"780 767 UsePrecompiledHeader="0" 781 768 BrowseInformation="0" … … 816 803 <Tool 817 804 Name="VCCLCompilerTool" 818 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"819 805 UsePrecompiledHeader="0" 820 806 BrowseInformation="0" … … 839 825 <Tool 840 826 Name="VCCLCompilerTool" 841 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"842 827 UsePrecompiledHeader="0" 843 828 BrowseInformation="0" … … 1136 1121 RelativePath="..\BasicCompiler_Common\src\BoostSerializationSupport.cpp" 1137 1122 > 1123 <FileConfiguration 1124 Name="Debug|Win32" 1125 > 1126 <Tool 1127 Name="VCCLCompilerTool" 1128 AdditionalOptions="/bigobj" 1129 /> 1130 </FileConfiguration> 1138 1131 <FileConfiguration 1139 1132 Name="Release|Win32" -
trunk/abdev/BasicCompiler64/Compile_ProcOp.cpp
r206 r220 63 63 64 64 //add rsp,スタックフレームサイズ 65 op_add_RV(REG_RSP,pobj_sf->GetFrameSize( ));65 op_add_RV(REG_RSP,pobj_sf->GetFrameSize(0)); 66 66 67 67 //スタックフレームスケジュール(subコマンドに渡す値) 68 *((long *)(OpBuffer+StackFrameSchedule))=pobj_sf->GetFrameSize( );68 *((long *)(OpBuffer+StackFrameSchedule))=pobj_sf->GetFrameSize(0); 69 69 70 70 UserProc::CompileStartForUserProc( pBackUserProc ); … … 100 100 101 101 //add rsp,スタックフレームサイズ 102 op_add_RV(REG_RSP,pobj_sf->GetFrameSize( ));102 op_add_RV(REG_RSP,pobj_sf->GetFrameSize(0)); 103 103 104 104 //スタックフレームスケジュール(subコマンドに渡す値) 105 *((long *)(OpBuffer+StackFrameSchedule))=pobj_sf->GetFrameSize( );105 *((long *)(OpBuffer+StackFrameSchedule))=pobj_sf->GetFrameSize(0); 106 106 107 107 //ret … … 735 735 } 736 736 737 if( pUserProc->GetName() == "test" ) 738 { 739 int test=0; 740 } 741 737 742 //ローカル変数領域のサイズをスタックフレームに通知 738 int iLocalParmSize; 739 iLocalParmSize=AllLocalVarSize-BaseLocalVar; 740 pobj_sf->SetLocalParmSize(iLocalParmSize); 743 int localParmSize = AllLocalVarSize - BaseLocalVar; 744 int stackFrameSize = pobj_sf->GetFrameSize( AllLocalVarSize ); 741 745 742 746 //ローカル変数アドレススケジュール 743 747 for(i3=0;i3<LocalVarAddrScheduleNum;i3++){ 744 *((long *)(OpBuffer+pLocalVarAddrSchedule[i3])) +=AllLocalVarSize+pobj_sf->GetFrameSize();748 *((long *)(OpBuffer+pLocalVarAddrSchedule[i3])) += AllLocalVarSize + stackFrameSize; 745 749 } 746 750 HeapDefaultFree(pLocalVarAddrSchedule); … … 748 752 //後にデバッグで利用する 749 753 pVar->SetOffsetAddress( 750 AllLocalVarSize + pobj_sf->GetFrameSize()- pVar->GetOffsetAddress()754 AllLocalVarSize + stackFrameSize - pVar->GetOffsetAddress() 751 755 ); 752 756 } … … 761 765 pobj_sf->pop(REG_RBX); 762 766 763 int iStackFrameSize; 764 iStackFrameSize=iLocalParmSize + pobj_sf->GetFrameSize(); 767 int stackFrameAndLocalParamSize = localParmSize + stackFrameSize; 765 768 766 769 //add rsp,スタックフレームサイズ 767 op_add_rsp( iStackFrameSize);770 op_add_rsp(stackFrameAndLocalParamSize); 768 771 769 772 //ret … … 773 776 //デバッグ用 774 777 if(RspOffsetSchedule){ 775 *((long *)(OpBuffer+RspOffsetSchedule))= iStackFrameSize;776 *((long *)(OpBuffer+RspOffsetSchedule2))= iStackFrameSize+sizeof(_int64);778 *((long *)(OpBuffer+RspOffsetSchedule))=stackFrameAndLocalParamSize; 779 *((long *)(OpBuffer+RspOffsetSchedule2))=stackFrameAndLocalParamSize+sizeof(_int64); 777 780 } 778 781 779 782 780 783 //スタックフレームスケジュール(subコマンド) 781 *((long *)(OpBuffer+StackFrameSchedule))= iStackFrameSize;784 *((long *)(OpBuffer+StackFrameSchedule))=stackFrameAndLocalParamSize; 782 785 783 786 //スタックフレームスケジュールを実行 784 pobj_sf->RunningSchedule( );787 pobj_sf->RunningSchedule( stackFrameSize ); 785 788 delete pobj_sf; 786 789 pobj_sf=0; -
trunk/abdev/BasicCompiler64/MakePeHdr.cpp
r218 r220 449 449 450 450 //add rsp,スタックフレームサイズ 451 op_add_RV(REG_RSP,pobj_sf->GetFrameSize()); 451 int stackFrameSize = pobj_sf->GetFrameSize(0); 452 op_add_RV( REG_RSP, stackFrameSize ); 452 453 453 454 //xor rax,rax(raxを0に初期化する) … … 462 463 463 464 //スタックフレームスケジュール(subコマンドに渡す値) 464 *((long *)(OpBuffer+StackFrameSchedule)) =pobj_sf->GetFrameSize();465 *((long *)(OpBuffer+StackFrameSchedule)) = stackFrameSize; 465 466 466 467 //スタックフレームスケジュールを実行 467 pobj_sf->RunningSchedule( );468 pobj_sf->RunningSchedule( stackFrameSize ); 468 469 delete pobj_sf; 469 470 pobj_sf=0; -
trunk/abdev/BasicCompiler64/Opcode.h
r206 r220 117 117 int now_sp; //スタックポインタ 118 118 int max_parm_size; //パラメータの最大サイズ 119 int local_parm_size; //ローカル領域のパラメータサイズ120 119 121 120 public: … … 126 125 ~CStackFrame(); 127 126 128 void SetLocalParmSize(int size); 129 int GetFrameSize(); 127 int GetFrameSize( int localParamSize ); 130 128 int GetNowSp(); 131 129 void mov_sp( int reg ); … … 138 136 void pop(int xmm_reg,int varSize); 139 137 void parameter_allocate(int size); 140 void RunningSchedule( void);138 void RunningSchedule( int stackFrameSize ); 141 139 142 140 void error_check(void); -
trunk/abdev/BasicCompiler64/stack_frame.cpp
r206 r220 12 12 lowest_sp=0; 13 13 now_sp=0; 14 local_parm_size=0;15 14 max_parm_size=0; 16 15 } … … 19 18 error_check(); 20 19 } 21 void CStackFrame::SetLocalParmSize(int size){ 22 local_parm_size=size; 23 } 24 int CStackFrame::GetFrameSize(){ 20 int CStackFrame::GetFrameSize( int localParamSize ){ 25 21 int answer_sp; 26 22 27 23 answer_sp=lowest_sp-max_parm_size; 28 24 29 if((local _parm_size%0x10)==0){25 if((localParamSize%0x10)){ 30 26 if((answer_sp%0x10)==0){ 31 27 //関数のエントリポイントで128ビット境界ラインに合わせるため … … 142 138 if(max_parm_size<size) max_parm_size=size; 143 139 } 144 void CStackFrame::RunningSchedule(void){ 145 int i; 146 int all_size; 147 all_size=GetFrameSize(); 148 for(i=0;i<num;i++){ 149 *((long *)(OpBuffer+pObpValues[i]))+=all_size; 140 void CStackFrame::RunningSchedule( int stackFrameSize ){ 141 for(int i=0;i<num;i++){ 142 *((long *)(OpBuffer+pObpValues[i])) += stackFrameSize; 150 143 } 151 144 } -
trunk/abdev/BasicCompiler_Common/VarList.cpp
r208 r220 225 225 UseCount[i]=-2; 226 226 MemCounter=0; 227 i--; 227 228 while(1){ 228 229 UseCount[i]++;
Note:
See TracChangeset
for help on using the changeset viewer.