static bool LblName( label_handle lbl, bool no_prefix ) /*********************************************************/ { if( !ValidLbl( lbl ) ) return( false ); if( no_prefix ) { if( lbl->lbl.sym == NULL ) { return( false ); } } else { DumpChar( 'L' ); DumpPtr( lbl ); if( lbl->lbl.sym == NULL ) { return( true ); } } DumpChar( '(' ); if( AskIfRTLabel( lbl ) ) { DumpXString( AskRTName( SYM2RTIDX( lbl->lbl.sym ) ) ); } else if( AskIfCommonLabel( lbl ) ) { DumpLiteral( "Common import => [" ); DumpUInt( (unsigned)(pointer_int)lbl->lbl.sym ); DumpLiteral( "] " ); } else { DumpXString( FEName( lbl->lbl.sym ) ); } DumpChar( ')' ); return( true ); }
void DumpOc( ins_entry *ins ) /******************************/ { DumpPtr( ins ); DumpChar( ' ' ); DumpString( CNames[_Class( ins )] ); DumpChar( ' ' ); if( _Class( ins ) != OC_INFO ) { CheckAttr( ins->oc.oc_header.class ); }
extern void DumpOc( ins_entry *ins ) { /****************************************/ DumpPtr( ins ); DumpLiteral( " " ); DumpString( CNames[ _Class( ins ) ] ); DumpLiteral( " " ); if( _Class( ins ) != OC_INFO ) { CheckAttr( ins->oc.oc_header.class ); }
static void DoDump( reg_tree *tree, int indent ) { /****************************************************/ DumpIndent( indent ); DumpRegs( tree->regs ); DumpNL(); DumpIndent( indent ); DumpLiteral( "offset " ); DumpInt( tree->offset ); DumpLiteral( " size " ); DumpInt( tree->size ); DumpNL(); if( tree->temp != NULL ) { DumpIndent( indent ); DumpLiteral( "name " ); DumpPtr( tree->temp ); DumpChar( ' ' ); DumpSym( tree->temp ); DumpNL(); } if( tree->alt != NULL ) { DumpIndent( indent ); DumpLiteral( "alt " ); DumpPtr( tree->alt ); DumpChar( ' ' ); DumpSym( tree->alt ); DumpNL(); } if( tree->hi != NULL ) { DumpIndent( indent ); DumpLiteral( "high " ); DumpNL(); DoDump( tree->hi, indent + 4 ); } if( tree->lo != NULL ) { DumpIndent( indent ); DumpLiteral( "low " ); DumpNL(); DoDump( tree->lo, indent + 4 ); } }
extern void DumpConflicts() { /*******************************/ conflict_node *conf; DumpLiteral( "Conflict graph" ); DumpNL(); for( conf = ConfList; conf != NULL; conf = conf->next_conflict ) { DumpPtr( conf ); DumpChar( ' ' ); DumpAConf( conf ); } DumpNL(); }
static void DoInfo( any_oc *oc ) { /**************************************/ switch( oc->oc_header.class & INFO_MASK ) { case INFO_LINE: DumpLiteral( "LINE " ); DumpInt( oc->oc_linenum.line ); if( oc->oc_linenum.label_line ) { DumpLiteral( " (Label)" ); } break; case INFO_LDONE: DumpLiteral( "LDONE " ); LblName( oc->oc_handle.handle, false ); break; case INFO_DEAD_JMP: DumpLiteral( "DEAD " ); DumpLiteral( "jmp " ); DoRef( &(oc->oc_handle) ); break; case INFO_DBG_RTN_BEG: DumpLiteral( "RTN BEGIN " ); DumpPtr( oc->oc_debug.ptr ); break; case INFO_DBG_BLK_BEG: DumpLiteral( "BLOCK BEGIN " ); DumpPtr( oc->oc_debug.ptr ); break; case INFO_DBG_PRO_END: DumpLiteral( "PROLOG END " ); DumpPtr( oc->oc_debug.ptr ); break; case INFO_DBG_EPI_BEG: DumpLiteral( "EPILOG BEGIN " ); DumpPtr( oc->oc_debug.ptr ); break; case INFO_DBG_BLK_END: DumpLiteral( "BLOCK END " ); DumpPtr( oc->oc_debug.ptr ); break; case INFO_DBG_RTN_END: DumpLiteral( "RTN END " ); DumpPtr( oc->oc_debug.ptr ); break; case INFO_SELECT: DumpLiteral( "SELECT TABLE " ); if( oc->oc_select.starts ) { DumpLiteral( "STARTS" ); } else { DumpLiteral( "ENDS" ); } break; default: DumpLiteral( "*** unknown info ***" ); break; } }
extern void DumpConflicts() { /*******************************/ conflict_node *conf; DumpLiteral( "Conflict graph" ); DumpNL(); conf = ConfList; while( conf != NULL ) { DumpPtr( conf ); DumpLiteral( " " ); DumpAConf( conf ); conf = conf->next_conflict; } DumpNL(); }
static bool LblName( code_lbl *lbl ) { /*****************************************/ if( ValidLbl( lbl ) == FALSE ) return( FALSE ); DumpLiteral( "L" ); DumpPtr( lbl ); if( lbl->lbl.sym == NULL ) return( TRUE ); DumpLiteral( "(" ); if( AskIfRTLabel( lbl ) ) { DumpXString( AskRTName( (rt_class)(pointer_int)lbl->lbl.sym ) ); } else if( AskIfCommonLabel( lbl ) ) { DumpLiteral( "Common import => [" ); DumpInt( (int)(pointer_int)lbl->lbl.sym ); DumpLiteral( "] " ); } else { DumpXString( FEName( lbl->lbl.sym ) ); } DumpLiteral( ")" ); return( TRUE ); }
static bool LblName( label_handle lbl ) { /*****************************************/ if( ValidLbl( lbl ) == false ) return( false ); DumpChar( 'L' ); DumpPtr( lbl ); if( lbl->lbl.sym == NULL ) return( true ); DumpChar( '(' ); if( AskIfRTLabel( lbl ) ) { DumpXString( AskRTName( (rt_class)(pointer_int)lbl->lbl.sym ) ); } else if( AskIfCommonLabel( lbl ) ) { DumpLiteral( "Common import => [" ); DumpInt( (int)(pointer_int)lbl->lbl.sym ); DumpLiteral( "] " ); } else { DumpXString( FEName( lbl->lbl.sym ) ); } DumpChar( ')' ); return( true ); }
extern void DumpAConf( conflict_node *conf ) { /************************************************/ DumpOperand( conf->name ); DumpLiteral( " id " ); DumpGBit( &conf->id.out_of_block ); DumpChar( ' ' ); DumpLBit( &conf->id.within_block ); DumpPossible( conf->possible ); DumpNL(); DumpLiteral( " " ); DumpInsRange( conf ); DumpLiteral( " Start block " ); DumpPtr( conf->start_block ); DumpNL(); DumpLiteral( " Conflicts with " ); DumpGBit( &conf->with.out_of_block ); DumpChar( ' ' ); DumpLBit( &conf->with.within_block ); DumpChar( ' ' ); DumpRegName( conf->with.regs ); DumpNL(); DumpLiteral( " Constrained " ); DumpInt( conf->num_constrained ); DumpLiteral( " vs " ); DumpInt( conf->available ); DumpNL(); if( _Is( conf, CST_SAVINGS_CALCULATED ) ) { DumpLiteral( " Savings " ); DumpLong( conf->savings ); DumpNL(); } if( _Is( conf, CST_CONFLICT_ON_HOLD ) ) { DumpLiteral( " On hold" ); DumpNL(); } if( _Is( conf, CST_CHANGES_OTHERS ) ) { DumpLiteral( " Changes Others" ); DumpNL(); } if( _Is( conf, CST_NEEDS_SEGMENT ) ) { DumpLiteral( " Needs segment" ); DumpNL(); } if( _Is( conf, CST_NEEDS_SEGMENT_SPLIT ) ) { DumpLiteral( " Needs segment split" ); DumpNL(); } if( _Is( conf, CST_SEGMENT_SPLIT ) ) { DumpLiteral( " Is segment split" ); DumpNL(); } if( _Is( conf, CST_NEEDS_INDEX ) ) { DumpLiteral( " Needs index" ); DumpNL(); } if( _Is( conf, CST_NEEDS_INDEX_SPLIT ) ) { DumpLiteral( " Needs index split" ); DumpNL(); } if( _Is( conf, CST_INDEX_SPLIT ) ) { DumpLiteral( " Is index split" ); DumpNL(); } }
extern void DumpIV( induction *var ) { /****************************************/ induction *alias; invariant *invar; DumpPtr( var ); DumpLiteral( " " ); DumpOperand( var->name ); DumpLiteral( " = ( " ); if( _IsV( var, IV_BASIC ) ) { DumpLiteral( "**basic**" ); } else { if( var->ivtimes != NULL ) { DumpOperand( var->ivtimes ); DumpLiteral( " * " ); } if( var->times != 1 ) { DumpLong( var->times ); DumpLiteral( " * " ); } DumpOperand( var->basic->name ); } DumpLiteral( " )" ); if( var->plus != 0 ) { DumpLiteral( " + ( " ); DumpLong( var->plus ); DumpLiteral( " )" ); } if( var->ivtimes != NULL && var->plus2 != 0 ) { DumpLiteral( " + ( " ); DumpOperand( var->ivtimes ); DumpLiteral( " * " ); DumpLong( var->plus2 ); DumpLiteral( " )" ); } for( invar = var->invar; invar != NULL; invar = invar->next ) { DumpLiteral( " + ( " ); if( var->lasttimes >= invar->id ) { DumpOperand( var->ivtimes ); DumpLiteral( " * " ); } if( invar->times != 1 ) { DumpLong( invar->times ); DumpLiteral( " * " ); } DumpOperand( invar->name ); DumpLiteral( " )" ); } DumpNL(); DumpLiteral( " ins=" ); DumpPtr( var->ins ); DumpLiteral( " prev=" ); DumpPtr( var->prev ); DumpLiteral( " basic=" ); DumpOperand( var->basic->name ); if( _IsV( var, IV_ALIAS ) ) { DumpLiteral( " alias=" ); for( alias = var->alias; _IsV( alias, IV_ALIAS ); ) { alias = alias->alias; } DumpPtr( alias ); } DumpNL(); DumpLiteral( " Uses: " ); DumpInt( var->use_count ); DumpChar( ' ' ); if( _IsV( var, IV_BASIC ) ) { DumpLiteral( " Basic" ); } if( _IsV( var, IV_DEAD ) ) { DumpLiteral( " Dead" ); } if( _IsV( var, IV_SURVIVED ) ) { DumpLiteral( " Survived" ); } if( _IsV( var, IV_TOP ) ) { DumpLiteral( " Top" ); } if( _IsV( var, IV_INTRODUCED ) ) { DumpLiteral( " Introduced" ); } if( _IsV( var, IV_ALIAS ) ) { DumpLiteral( " Alias" ); } if( _IsV( var, IV_INDEXED ) ) { DumpLiteral( " Indexed" ); } if( _IsV( var, IV_USED ) ) { DumpLiteral( " Used" ); } DumpNL(); }
void Releaser::Release(ListenerT* listener) { if (netRefCount(listener, "RELEASE FN") == 2) { printf("Removing Event Listener: %s\n", DumpPtr(listener).c_str()); Director::getInstance()->getEventDispatcher()->removeEventListener(listener); } }