Ignore:
Timestamp:
Jan 20, 2007, 4:55:26 AM (17 years ago)
Author:
dai_9181
Message:

Boolean型に対応。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/Compile_Set_Var.cpp

    r28 r36  
    298298    }
    299299}
     300void SetBooleanVariable(int type,RELATIVE_VAR *pRelative){
     301    if(type==DEF_DOUBLE){
     302        //Double型
     303
     304        //cvttsd2si rax,xmm0
     305        op_cvttsd2si_xmm(sizeof(_int64),REG_RAX,REG_XMM0);
     306    }
     307    else if(type==DEF_SINGLE){
     308        //Single型
     309
     310        //cvttss2si rax,xmm0
     311        op_cvttss2si_xmm(sizeof(_int64),REG_RAX,REG_XMM0);
     312    }
     313
     314    //cmp rax,0
     315    op_cmp_value(GetTypeSize(type,-1),REG_RAX,0);
     316
     317    //setne al
     318    op_setne( REG_RAX );
     319
     320    SetWholeVariable( sizeof(char), DEF_BYTE, pRelative);
     321}
    300322void SetWholeVariable(int var_size,int type,RELATIVE_VAR *pRelative){
    301323    if(type==DEF_DOUBLE){
Note: See TracChangeset for help on using the changeset viewer.