Changeset 62 in dev for BasicCompiler64/Compile_Var.cpp
- Timestamp:
- Feb 22, 2007, 3:57:56 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/Compile_Var.cpp
r56 r62 647 647 pRelativeVar->offset=GlobalVar[i].offset; 648 648 pRelativeVar->bOffsetOffset=0; 649 pRelativeVar->dwKind=VAR_GLOBAL; 649 if(GlobalVar[i].fRef){ 650 // 参照型 651 pRelativeVar->dwKind = VAR_REFGLOBAL; 652 } 653 else pRelativeVar->dwKind=VAR_GLOBAL; 650 654 *pType=GlobalVar[i].type; 651 655 lpIndex=GlobalVar[i].u.index; … … 1181 1185 GetNowStaticVarFullName(VarName,temporary); 1182 1186 1183 AddGlobalVariable( temporary,SubScripts,&TypeInfo,TypeSize,InitBuf,ConstractParameter,dwFlags);1187 AddGlobalVariable(isRef,temporary,SubScripts,&TypeInfo,TypeSize,InitBuf,ConstractParameter,dwFlags); 1184 1188 1185 1189 /* … … 1194 1198 ///////////////////////// 1195 1199 1196 AddGlobalVariable( VarName,SubScripts,&TypeInfo,TypeSize,InitBuf,ConstractParameter,dwFlags);1200 AddGlobalVariable(isRef,VarName,SubScripts,&TypeInfo,TypeSize,InitBuf,ConstractParameter,dwFlags); 1197 1201 } 1198 1202 else{ … … 1367 1371 } 1368 1372 } 1373 else if( pRelativeVar->dwKind == VAR_REFGLOBAL ){ 1374 if(pRelativeVar->bOffsetOffset){ 1375 //add r11,qword ptr[offset] 1376 op_add_RM( sizeof(_int64), REG_R11, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 ); 1377 obp-=sizeof(long); 1378 pobj_GlobalVarSchedule->add(); 1379 obp+=sizeof(long); 1380 } 1381 else{ 1382 //mov r11,qword ptr[offset] 1383 op_mov_RM(sizeof(_int64),REG_R11,REG_NON,(int)pRelativeVar->offset,MOD_DISP32); 1384 obp-=sizeof(long); 1385 pobj_GlobalVarSchedule->add(); 1386 obp+=sizeof(long); 1387 } 1388 1389 goto directmem; 1390 } 1369 1391 else if(pRelativeVar->dwKind==VAR_LOCAL){ 1370 1392 if(pRelativeVar->bOffsetOffset){
Note:
See TracChangeset
for help on using the changeset viewer.