Logo Search packages:      
Sourcecode: ktechlab version File versions

bool Register::affectsExternal (  )  const

From the Optimizer's perspective, it is OK to remove, change or add any instruction so long as there are no visible external changes that go against the original intention of the microbe source (a general guiding principle). Therefore, this function returns true for PORT and TRIS registers, false for everything else.

Definition at line 469 of file instruction.cpp.

Referenced by Optimizer::optimizeInstructions().

      switch ( m_type )
            case PORTA:
            case TRISA:
            case PORTB:
            case TRISB:
            case PORTC:
            case TRISC:
            case PORTD:
            case TRISD:
            case PORTE:
            case TRISE:
            case INTCON:
            case ADCON0:
            case ADCON1:
            case TMR0:
            case OPTION_REG:
            case PCL:
            case STATUS:
            case FSR:
            case EEDATA:
            case EECON1:
            case EEADR:
            case EECON2:
            case PCLATH:
            case GPR:
//--------------------------------FINAL LAST-------------//
            case PIR1:
            case PIR2:
            case TMR1L:
            case TMR2:
            case TMR1H:
            case T1CON:
            case T2CON:
            case SSPBUF:
            case SSPCON:
            case CCPR1L:
            case CCPR1H:
            case CCP1CON:
            case CCPR2L:
            case CCPR2H:
            case CCP2CON:
            case ADRESH:
            case PIE1:
            case PIE2:
            case PCON:
            case SSPCON2:
            case PR2:
            case SSPADD:
            case SSPSTAT:
            case TXSTA:
            case SPBRG:
            case ADRESL:
            case EEDATH:
            case EEADRH:
            case RCSTA:
            case TXREG:
            case RCREG:
            case CMCON:
            case VRCON:
                  return true;
            case WORKING:
            case none:
                  return false;
      return false;

Generated by  Doxygen 1.6.0   Back to index