Changeset 75 in dev for BasicCompiler64/Compile_Set_Var.cpp
- Timestamp:
- Mar 20, 2007, 4:36:16 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/Compile_Set_Var.cpp
r73 r75 7 7 } 8 8 9 void SetStructVariableFromRax( LONG_PTR lpVarIndex,int CalcType,LONG_PTR lpCalcIndex,RELATIVE_VAR *pRelativeVar,BOOL bUseHeap){9 void SetStructVariableFromRax( const Type &varType, const Type &calcType, RELATIVE_VAR *pRelativeVar,BOOL bUseHeap){ 10 10 int RightTermReg; 11 11 pobj_reg=new CRegister(REG_RCX); … … 17 17 18 18 //右辺 19 if( IsRealNumberType(CalcType)){19 if( calcType.IsReal() ){ 20 20 RightTermReg=pobj_reg->LockXmmReg(); 21 21 22 if( CalcType==DEF_DOUBLE){22 if( calcType.IsDouble() ){ 23 23 //movlsd RightTermReg,xmm0 24 24 op_movsd_RR(RightTermReg,REG_XMM0); 25 25 } 26 else if( CalcType==DEF_SINGLE){26 else if( calcType.IsSingle() ){ 27 27 //movlss RightTermReg,xmm0 28 28 op_movss_RR(RightTermReg,REG_XMM0); … … 62 62 */ 63 63 //右辺用レジスタを解除 64 if( IsRealNumberType(CalcType)) pobj_reg->UnlockXmmReg();64 if( calcType.IsReal() ) pobj_reg->UnlockXmmReg(); 65 65 else pobj_reg->UnlockReg(); 66 66 … … 73 73 74 74 75 if( CalcType == DEF_STRUCT ){ 76 CClass *pVarClass = (CClass *)lpVarIndex; 77 CClass *pCalcClass = (CClass *)lpCalcIndex; 78 79 if( pVarClass->IsEquals( pCalcClass ) ){ //等しい 75 if( calcType.IsStruct() ){ 76 if( varType.GetClass().IsEquals( &calcType.GetClass() ) ){ //等しい 80 77 81 78 //双方のオブジェクト型が一致、または派生・継承関係にあるとき … … 88 85 op_mov_RR(REG_RDI,VarReg); 89 86 90 CClass *pClass = (CClass *)lpVarIndex; 91 int object_size = pClass->GetSize(); 87 int object_size = varType.GetClass().GetSize(); 92 88 93 89 //mov rcx,object_size … … 107 103 108 104 //call free 109 extern SubInfo*pSub_free;105 extern UserProc *pSub_free; 110 106 op_call(pSub_free); 111 107 }
Note:
See TracChangeset
for help on using the changeset viewer.