예제 #1
0
extern unsigned DepthAlign( unsigned depth )
/******************************************/
{
    static unsigned char AlignArray[10] = { 0 };

    if( AlignArray[0] == 0 || depth == PROC_ALIGN ) {
        unsigned char *align_info_bytes = FEAuxInfo( NULL, CODE_LABEL_ALIGNMENT );
        Copy( align_info_bytes, AlignArray, align_info_bytes[0] + 1 );
    }
    if( OptForSize )
        return( 1 );
    if( _CPULevel( CPU_486 ) ) {
        if( depth == PROC_ALIGN || depth == DEEP_LOOP_ALIGN )
            return( 16 );
        return( 1 );
    }
    if( _CPULevel( CPU_386 ) ) {
        if( depth == PROC_ALIGN || depth == DEEP_LOOP_ALIGN )
            return( 4 );
        return( 1 );
    }
    if( depth == PROC_ALIGN || depth == DEEP_LOOP_ALIGN ) {
        return( AlignArray[1] );
    }
    if( depth == 0 )
        depth = 1;
    if( depth >= AlignArray[0] ) {
        depth = AlignArray[0] - 1;
    }
    return( AlignArray[depth + 1] );
}
예제 #2
0
FU_entry const *FUEntry( instruction *ins )
{
    if( _CPULevel( CPU_586 ) ) {
        return( &FUnits586[ ins->u.gen_table->func_unit ] );
    } else {
        return( &FUnits486[ ins->u.gen_table->func_unit ] );
    }
}