Exemplo n.º 1
0
extern void DirInit( void )
//*************************
{
    dir_table   *curr;
    sym_handle  sym;
    int         i, n;

    n = sizeof( asm_directives ) / sizeof( asm_directives[0] );
    for( i = 0; i < n; i++ ) {
        curr = &asm_directives[i];
        sym = SymAdd( curr->name, SYM_DIRECTIVE );
        SymSetLink( sym, curr );
    }
    autoAlignment = TRUE;
    AsDirSetOptions = NONE;
    _DirSet( AT );
    _DirSet( MACRO );
    _DirSet( REORDER );
}
Exemplo n.º 2
0
static bool dirFuncSetOption( directive_t *dir, dir_table_enum parm )
//*******************************************************************
{
    char    *str;

    /* unused parameters */ (void)parm;

    if( dirHasOperand( dir ) ) {
        assert( dir->num_operands == 1 );
        assert( dir->operand_list->type == DIROP_LINE );
        str = STRING_CONTENT( dir->operand_list );
        if( optionString( str, "at" ) ) {
            _DirSet( AT );
        } else if( optionString( str, "noat" ) ) {
            _DirUnSet( AT );
        } else if( optionString( str, "macro" ) ) {
            _DirSet( MACRO );
        } else if( optionString( str, "nomacro" ) ) {
            _DirUnSet( MACRO );
        } else if( optionString( str, "reorder" ) ) {
            _DirSet( REORDER );
        } else if( optionString( str, "noreorder" ) ) {
            _DirUnSet( REORDER );
        } else if( optionString( str, "volatile" ) ) {
            // ignore this for now
            // _DirSet( VOLATILE );
        } else if( optionString( str, "novolatile" ) ) {
            // ignore this for now
            // _DirUnSet( VOLATILE );
        } else if( optionString( str, "move" ) ) {
            // ignore this for now
            // _DirSet( MOVE );
        } else if( optionString( str, "nomove" ) ) {
            // ignore this for now
            // _DirUnSet( MOVE );
        } else {
            Error( IMPROPER_SET_DIRECTIVE, str );
        }
    }
    return( true );
}