Ignore:
Timestamp:
Jul 26, 2007, 3:58:18 AM (17 years ago)
Author:
dai_9181
Message:
 
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler32/x86CodeGenerator.cpp

    r236 r237  
    2020
    2121void CodeGenerator::set_mod_rm_sib_disp(char mod,int reg,int scale,int index_reg,int base_reg,long disp, Schedule::Type scheduleType ){
     22
     23    // エラーチェック
     24    if( ! ( mod == MOD_BASE
     25        || mod == MOD_DISP32
     26        || mod == MOD_BASE_DISP8
     27        || mod == MOD_BASE_DISP32
     28        || mod == MOD_REG ) )
     29    {
     30        SetError();
     31    }
     32
    2233    if(mod==MOD_DISP32){
    2334        //ModR/Mバイト
     
    695706    __op_format(0,(char)0x50,reg);
    696707}
    697 void CodeGenerator::op_push_V(long data){
     708void CodeGenerator::op_push_V(long data, Schedule::Type scheduleType ){
    698709    //スタックにリテラル値をプッシュ
    699     if(-128<=data&&data<=127){
     710    if(-128<=data&&data<=127 && scheduleType == Schedule::None ){
    700711        //push 8ビット値
    701712        pNativeCode->Put( (char)0x6A );
     
    705716        //push 32ビット値
    706717        pNativeCode->Put( (char)0x68 );
    707         pNativeCode->Put( data );
     718        pNativeCode->Put( data, scheduleType );
    708719    }
    709720}
Note: See TracChangeset for help on using the changeset viewer.