Changeset 220 in dev for trunk/abdev/BasicCompiler64/Compile_ProcOp.cpp
- Timestamp:
- Jul 18, 2007, 4:23:29 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.