Changeset 120 in dev for BasicCompiler64/Compile_Var.cpp


Ignore:
Timestamp:
May 13, 2007, 8:50:04 AM (17 years ago)
Author:
dai_9181
Message:

Parameter::Equals静的メソッドを廃止し、Parameters::Equalsメソッドを用意。
ポインタに要するサイズよりも一回り大きなアラインメントが指定されているときに、呼び出し側のオフセットズレを考慮するよう、修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/Compile_Var.cpp

    r116 r120  
    10901090        if( pVar->IsStruct() ){
    10911091            int alignment = pVar->GetClass().iAlign;
     1092
    10921093            if( alignment ){
    10931094                if( AllLocalVarSize % alignment ){
    10941095                    AllLocalVarSize += alignment - (AllLocalVarSize % alignment);
     1096                }
     1097            }
     1098
     1099            if( alignment == PTR_SIZE*2 ){
     1100                // ポインタに要するサイズよりも一回り大きなアラインメントが指定されているとき
     1101                // (例:CONTEXT構造体など)
     1102                // 呼び出し側のオフセットズレを考慮する
     1103
     1104                if( 0 == ( UserProc::CompilingUserProc().RealParams().GetMemorySize() + PTR_SIZE/*ret分*/ ) % alignment ){
     1105                    AllLocalVarSize += PTR_SIZE;
    10951106                }
    10961107            }
Note: See TracChangeset for help on using the changeset viewer.