Пример #1
0
void CondInfoSetup(             // SETUP UP CONDITIONAL INFORMATION
    unsigned index,             // - index of flag
    COND_INFO* cond,            // - conditional information
    FN_CTL* fctl )              // - function information
{
    unsigned flag_offset;       // - offset within flags vector

    fctl = fctl;
    flag_offset = index >> 3;
    cond->mask = 0x01 << ( index & 7 );
    cond->sym = FstabRw();
    if( cond->sym == NULL ) {
        cond->sym = dtor_cond_sym;
        cond->offset = flag_offset;
    } else {
        cond->offset = flag_offset + CgbkInfo.size_rw_base;
    }
}
Пример #2
0
void CondInfoSetup(             // SETUP UP CONDITIONAL INFORMATION
    unsigned index,             // - index of flag
    COND_INFO* cond,            // - conditional information
    FN_CTL* fctl )              // - function information
{
    target_offset_t flag_offset;    // - offset within flags vector

    /* unused parameters */ (void)fctl;

    flag_offset = BITARR_OFFS( index );
    cond->mask = BITARR_MASK( index );
    cond->sym = FstabRw();
    if( cond->sym == NULL ) {
        cond->sym = dtor_cond_sym;
        cond->offset = flag_offset;
    } else {
        cond->offset = flag_offset + CgbkInfo.size_rw_base;
    }
}
Пример #3
0
static cg_name ctorFlagSet(     // SET/RESET CTOR FLAG
    FN_CTL* fctl,               // - function info
    cg_op opcode,               // - set/reset opcode
    patch_handle* a_ph )        // - addr[ patch_handle ]
{
    unsigned offset;            // - offset of flag byte
    unsigned mask;              // - mask for byte
    cg_name op_flg;             // - expression for code-gen

    mask = FnCtlCondFlagCtor( fctl );
    offset = mask / 8;
    mask &= 7;
    op_flg = CgSymbolPlusOffset( FstabRw(), offset + CgbkInfo.size_rw_base );
    *a_ph = BEPatch();
    op_flg = CGLVPreGets( opcode
                        , op_flg
                        , CGPatchNode( *a_ph, TY_UINT_1 )
                        , TY_UINT_1 );
    return op_flg;
}