Changeset 308 in dev for trunk/abdev/BasicCompiler64/Compile_Calc.cpp
- Timestamp:
- Aug 29, 2007, 9:05:22 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/Compile_Calc.cpp
r266 r308 9 9 #include "Opcode.h" 10 10 11 void SetVariableFromRax( int VarType,int CalcType,RELATIVE_VAR *pRelativeVar){11 void SetVariableFromRax( const Type &varType, int CalcType,RELATIVE_VAR *pRelativeVar){ 12 12 ///////////////////////////////////////////////// 13 13 // raxの内容を変数にコピーするコードを抽出 14 14 ///////////////////////////////////////////////// 15 15 16 if(VarType==DEF_BOOLEAN){ 16 if( varType.IsBoolean() ) 17 { 17 18 //bool 18 19 SetBooleanVariable(CalcType,pRelativeVar); 19 20 } 20 else if( IsRealNumberType( VarType ) ){ 21 else if( varType.IsReal() ) 22 { 21 23 // Double/Single型変数へレジスタの値を代入 22 SetRealVariable(VarType, CalcType, pRelativeVar); 23 } 24 else if( IsWholeNumberType( VarType ) || VarType == DEF_OBJECT ){ 25 int typeSize = GetTypeSize( VarType, -1 ); 26 24 SetRealVariable(varType.GetBasicType(), CalcType, pRelativeVar); 25 } 26 else if( varType.IsWhole() || varType.IsObject() ) 27 { 27 28 //整数変数へraxの値を格納する 28 SetWholeVariable( typeSize, CalcType, pRelativeVar );29 SetWholeVariable( varType.GetSize(), CalcType, pRelativeVar ); 29 30 } 30 31 else{ … … 265 266 // rax(実数はxmm0)の内容を変数にコピー 266 267 ///////////////////////////////////////////////// 267 SetVariableFromRax(varType .GetBasicType(),calcType.GetBasicType(),&VarRelativeVar);268 SetVariableFromRax(varType,calcType.GetBasicType(),&VarRelativeVar); 268 269 }
Note:
See TracChangeset
for help on using the changeset viewer.