Changeset 357 in dev for trunk/abdev/BasicCompiler64


Ignore:
Timestamp:
Nov 5, 2007, 3:26:20 AM (17 years ago)
Author:
dai_9181
Message:

例外処理機構実装中...

Location:
trunk/abdev/BasicCompiler64
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler64/CodeGenerator.cpp

    r317 r357  
    157157///////////////////
    158158
    159 void CodeGenerator::op_mov_RV(int op_size,int reg,long i32data, Schedule::Type scheduleType ){
     159const PertialSchedule *CodeGenerator::op_mov_RV(int op_size,int reg,long i32data, Schedule::Type scheduleType, bool isPertialSchedule ){
    160160    //mov reg,i32data
    161161
     
    176176
    177177    //即値
     178    const PertialSchedule *pPertialSchedule = NULL;
     179    if( isPertialSchedule )
     180    {
     181        pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) );
     182        pPertialSchedule = pertialSchedules.back();
     183    }
    178184    pNativeCode->PutEx( i32data, scheduleType );
    179 }
    180 void CodeGenerator::op_mov_RV64(int reg,_int64 i64data){
     185
     186    return pPertialSchedule;
     187}
     188const PertialSchedule *CodeGenerator::op_mov_RV64( int reg, _int64 i64data, bool isPertialSchedule )
     189{
    181190    //mov reg,i64data
    182191
     
    188197
    189198    //即値
     199    const PertialSchedule *pPertialSchedule = NULL;
     200    if( isPertialSchedule )
     201    {
     202        pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(_int64) ) );
     203        pPertialSchedule = pertialSchedules.back();
     204    }
    190205    pNativeCode->Put( i64data );
     206
     207    return pPertialSchedule;
    191208}
    192209const PertialSchedule *CodeGenerator::op_mov_RM(int op_size,int reg,int base_reg,long offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){
  • trunk/abdev/BasicCompiler64/Compile_Func.cpp

    r349 r357  
    1616    if( lstrcmpi( FuncName, "__delegate_dynamicmethod_call" ) == 0 )    return FUNC_DELEGATE_DYNAMICMETHOD_CALL;
    1717    if( lstrcmpi( FuncName, "__delegate_staticmethod_call" ) == 0 )     return FUNC_DELEGATE_STATICMETHOD_CALL;
     18    if( lstrcmpi( FuncName, "_System_GetNowScopeCatchAddresses" ) == 0 )return FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS;
    1819    if( lstrcmpi( FuncName, "GetDouble" ) == 0 )        return FUNC_GETDOUBLE;
    1920    if( lstrcmpi( FuncName, "GetSingle" ) == 0 )        return FUNC_GETSINGLE;
     
    441442}
    442443
     444void Opcode_Func_System_Get_Bp()
     445{
     446    //mov rax,rbp
     447    compiler.codeGenerator.op_mov_RR(REG_RAX,REG_RBP);
     448}
     449
    443450void Opcode_Func_GetPtrData( const char *Parameter, const int type ){
    444451    int reg=REG_RAX;
     
    492499            Opcode_Func_delegate_call( Parameter, resultType, false, isCallOn );
    493500            break;
     501        case FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS:
     502            if( isCallOn ) Exception::Opcode_Func_System_GetNowScopeCatchAddress();
     503            resultType.SetBasicType( DEF_LONG );
     504            break;
     505        case FUNC_SYSTEM_GET_BP:
     506            if( isCallOn ) Opcode_Func_System_Get_Bp();
     507            resultType.SetBasicType( DEF_LONG );
     508            break;
    494509
    495510        case FUNC_GETDOUBLE:
  • trunk/abdev/BasicCompiler64/FunctionValue.h

    r330 r357  
    1616#define FUNC_DELEGATE_DYNAMICMETHOD_CALL    0x0621
    1717#define FUNC_DELEGATE_STATICMETHOD_CALL     0x0622
     18#define FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS 0x0623
     19#define FUNC_SYSTEM_GET_BP  0x0624
    1820
    1921//ポインタ
  • trunk/abdev/BasicCompiler64/MakePeHdr.cpp

    r355 r357  
    10771077    compiler.linker.SetImageBase( ImageBase );
    10781078    compiler.linker.ResolveDataTableSchedules( MemPos_DataSection );
     1079    compiler.linker.ResolveCatchAddressSchedules( MemPos_CodeSection );
    10791080    compiler.linker.ResolveDllProcSchedules( MemPos_CodeSection, MemPos_ImportSection, LookupSize, HintSize );
    10801081    compiler.linker.ResolveUserProcSchedules( MemPos_CodeSection );
Note: See TracChangeset for help on using the changeset viewer.