Changeset 687 in dev for trunk/ab5.0/abdev/compiler_x64/Compile_Func.cpp
- Timestamp:
- Jul 13, 2008, 2:56:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/compiler_x64/Compile_Func.cpp
r672 r687 7 7 8 8 #include "FunctionValue.h" 9 10 void Opcode_Func_ObjPtr( const char *Parameter, Type &resultType, bool isCallOn, int resultReg = REG_RAX ); 9 11 10 12 int GetFunctionFromName(char *FuncName){ … … 239 241 } 240 242 241 // オブジェクト ポインタを取得 242 RELATIVE_VAR relativeVar; 243 GetVarOffsetReadOnly( thisPtrName, &relativeVar, type ); 244 if( !type.IsObject() ) 245 { 246 extern int cp; 247 compiler.errorMessenger.Output(1,NULL,cp); 248 return; 249 } 250 251 SetVarPtrToReg( REG_RAX, &relativeVar ); 252 253 //mov rcx,dword ptr[rax] 254 compiler.codeGenerator.op_mov_RM( sizeof(_int64), REG_RCX, REG_RAX, 0, MOD_BASE ); 243 // オブジェクト ポインタをrcxに取得 244 Opcode_Func_ObjPtr( thisPtrName, type, true, REG_RCX ); 255 245 256 246 pobj_BlockReg->unlock( REG_RDX ); … … 419 409 } 420 410 411 if( lstrcmpi( Parameter, "This" )==0 ) 412 { 413 compiler.errorMessenger.Output( 144, "", cp ); 414 } 415 421 416 RELATIVE_VAR RelativeVar; 422 417 … … 441 436 }*/ 442 437 } 443 void Opcode_Func_ObjPtr( const char *Parameter, Type &resultType, bool isCallOn ){438 void Opcode_Func_ObjPtr( const char *Parameter, Type &resultType, bool isCallOn, int resultReg ){ 444 439 if( isCallOn == false ){ 445 440 // 戻り値の型を取得するだけ … … 462 457 resultType.PtrLevelUp(); 463 458 464 SetVarPtrToReg( REG_RAX,&RelativeVar);459 SetVarPtrToReg(resultReg,&RelativeVar); 465 460 466 461 if( lstrcmpi( Parameter, "This" )==0 ){ … … 470 465 //参照をオブジェクトポインタに変更 471 466 472 //mov r ax,qword ptr[rax]473 compiler.codeGenerator.op_mov_RM( sizeof(_int64), REG_RAX, REG_RAX, 0, MOD_BASE );467 //mov resultReg,qword ptr[resultReg] 468 compiler.codeGenerator.op_mov_RM( sizeof(_int64), resultReg, resultReg, 0, MOD_BASE ); 474 469 } 475 470 else{
Note:
See TracChangeset
for help on using the changeset viewer.