Base class of core instruction. More...
#include <decoder.h>
Inherited by avr_op_ADC, avr_op_ADD, avr_op_ADIW, avr_op_AND, avr_op_ANDI, avr_op_ASR, avr_op_BCLR, avr_op_BLD, avr_op_BRBC, avr_op_BRBS, avr_op_BREAK, avr_op_BSET, avr_op_BST, avr_op_CALL, avr_op_CBI, avr_op_COM, avr_op_CP, avr_op_CPC, avr_op_CPI, avr_op_CPSE, avr_op_DEC, avr_op_EICALL, avr_op_EIJMP, avr_op_ELPM, avr_op_ELPM_Z, avr_op_ELPM_Z_incr, avr_op_EOR, avr_op_ESPM, avr_op_FMUL, avr_op_FMULS, avr_op_FMULSU, avr_op_ICALL, avr_op_IJMP, avr_op_ILLEGAL, avr_op_IN, avr_op_INC, avr_op_JMP, avr_op_LD_X, avr_op_LD_X_decr, avr_op_LD_X_incr, avr_op_LD_Y_decr, avr_op_LD_Y_incr, avr_op_LD_Z_decr, avr_op_LD_Z_incr, avr_op_LDD_Y, avr_op_LDD_Z, avr_op_LDI, avr_op_LDS, avr_op_LPM, avr_op_LPM_Z, avr_op_LPM_Z_incr, avr_op_LSR, avr_op_MOV, avr_op_MOVW, avr_op_MUL, avr_op_MULS, avr_op_MULSU, avr_op_NEG, avr_op_NOP, avr_op_OR, avr_op_ORI, avr_op_OUT, avr_op_POP, avr_op_PUSH, avr_op_RCALL, avr_op_RET, avr_op_RETI, avr_op_RJMP, avr_op_ROR, avr_op_SBC, avr_op_SBCI, avr_op_SBI, avr_op_SBIC, avr_op_SBIS, avr_op_SBIW, avr_op_SBRC, avr_op_SBRS, avr_op_SLEEP, avr_op_SPM, avr_op_ST_X, avr_op_ST_X_decr, avr_op_ST_X_incr, avr_op_ST_Y_decr, avr_op_ST_Y_incr, avr_op_ST_Z_decr, avr_op_ST_Z_incr, avr_op_STD_Y, avr_op_STD_Z, avr_op_STS, avr_op_SUB, avr_op_SUBI, avr_op_SWAP, and avr_op_WDR.
Public Member Functions | |
DecodedInstruction (AvrDevice *c, bool s2w=false) | |
virtual | ~DecodedInstruction () |
bool | IsInstruction2Words () |
Returns true, if instruction need 2 words (4byte). | |
virtual int | operator() ()=0 |
Performs instruction. | |
virtual int | Trace ()=0 |
Performs instruction and write out instruction mnemonic for trace. | |
virtual unsigned char | GetModifiedR () const |
If this instruction modifies a R0-R31 register then return its number, otherwise -1. | |
virtual unsigned char | GetModifiedRHi () const |
If this instruction modifies a pair of R0-R31 registers then ... | |
Protected Attributes | |
AvrDevice * | core |
Link to device instance. | |
bool | size2Word |
Flag: true, if instruction has 2 words. |
Base class of core instruction.
All instruction are derived from this class
Definition at line 39 of file decoder.h.
DecodedInstruction::DecodedInstruction | ( | AvrDevice * | c, | |
bool | s2w = false | |||
) | [inline] |
virtual DecodedInstruction::~DecodedInstruction | ( | ) | [inline, virtual] |
virtual unsigned char DecodedInstruction::GetModifiedR | ( | ) | const [inline, virtual] |
If this instruction modifies a R0-R31 register then return its number, otherwise -1.
Reimplemented in avr_op_ADC, avr_op_ADD, avr_op_ADIW, avr_op_LDI, avr_op_SBC, avr_op_SBCI, avr_op_SBIW, avr_op_SUB, and avr_op_SUBI.
Definition at line 57 of file decoder.h.
Referenced by AvrFlash::LooksLikeContextSwitch().
virtual unsigned char DecodedInstruction::GetModifiedRHi | ( | ) | const [inline, virtual] |
If this instruction modifies a pair of R0-R31 registers then ...
Reimplemented in avr_op_ADIW, and avr_op_SBIW.
Definition at line 59 of file decoder.h.
Referenced by AvrFlash::LooksLikeContextSwitch().
bool DecodedInstruction::IsInstruction2Words | ( | ) | [inline] |
virtual int DecodedInstruction::operator() | ( | ) | [pure virtual] |
Performs instruction.
Implemented in avr_op_ADC, avr_op_ADD, avr_op_ADIW, avr_op_AND, avr_op_ANDI, avr_op_ASR, avr_op_BCLR, avr_op_BLD, avr_op_BRBC, avr_op_BRBS, avr_op_BSET, avr_op_BST, avr_op_CALL, avr_op_CBI, avr_op_COM, avr_op_CP, avr_op_CPC, avr_op_CPI, avr_op_CPSE, avr_op_DEC, avr_op_EICALL, avr_op_EIJMP, avr_op_ELPM_Z, avr_op_ELPM_Z_incr, avr_op_ELPM, avr_op_EOR, avr_op_ESPM, avr_op_FMUL, avr_op_FMULS, avr_op_FMULSU, avr_op_ICALL, avr_op_IJMP, avr_op_IN, avr_op_INC, avr_op_JMP, avr_op_LDD_Y, avr_op_LDD_Z, avr_op_LDI, avr_op_LDS, avr_op_LD_X, avr_op_LD_X_decr, avr_op_LD_X_incr, avr_op_LD_Y_decr, avr_op_LD_Y_incr, avr_op_LD_Z_incr, avr_op_LD_Z_decr, avr_op_LPM_Z, avr_op_LPM, avr_op_LPM_Z_incr, avr_op_LSR, avr_op_MOV, avr_op_MOVW, avr_op_MUL, avr_op_MULS, avr_op_MULSU, avr_op_NEG, avr_op_NOP, avr_op_OR, avr_op_ORI, avr_op_OUT, avr_op_POP, avr_op_PUSH, avr_op_RCALL, avr_op_RET, avr_op_RETI, avr_op_RJMP, avr_op_ROR, avr_op_SBC, avr_op_SBCI, avr_op_SBI, avr_op_SBIC, avr_op_SBIS, avr_op_SBIW, avr_op_SBRC, avr_op_SBRS, avr_op_SLEEP, avr_op_SPM, avr_op_STD_Y, avr_op_STD_Z, avr_op_STS, avr_op_ST_X, avr_op_ST_X_decr, avr_op_ST_X_incr, avr_op_ST_Y_decr, avr_op_ST_Y_incr, avr_op_ST_Z_decr, avr_op_ST_Z_incr, avr_op_SUB, avr_op_SUBI, avr_op_SWAP, avr_op_WDR, avr_op_BREAK, and avr_op_ILLEGAL.
virtual int DecodedInstruction::Trace | ( | ) | [pure virtual] |
Performs instruction and write out instruction mnemonic for trace.
Implemented in avr_op_ADC, avr_op_ADD, avr_op_ADIW, avr_op_AND, avr_op_ANDI, avr_op_ASR, avr_op_BCLR, avr_op_BLD, avr_op_BRBC, avr_op_BRBS, avr_op_BSET, avr_op_BST, avr_op_CALL, avr_op_CBI, avr_op_COM, avr_op_CP, avr_op_CPC, avr_op_CPI, avr_op_CPSE, avr_op_DEC, avr_op_EICALL, avr_op_EIJMP, avr_op_ELPM_Z, avr_op_ELPM_Z_incr, avr_op_ELPM, avr_op_EOR, avr_op_ESPM, avr_op_FMUL, avr_op_FMULS, avr_op_FMULSU, avr_op_ICALL, avr_op_IJMP, avr_op_IN, avr_op_INC, avr_op_JMP, avr_op_LDD_Y, avr_op_LDD_Z, avr_op_LDI, avr_op_LDS, avr_op_LD_X, avr_op_LD_X_decr, avr_op_LD_X_incr, avr_op_LD_Y_decr, avr_op_LD_Y_incr, avr_op_LD_Z_incr, avr_op_LD_Z_decr, avr_op_LPM_Z, avr_op_LPM, avr_op_LPM_Z_incr, avr_op_LSR, avr_op_MOV, avr_op_MOVW, avr_op_MUL, avr_op_MULS, avr_op_MULSU, avr_op_NEG, avr_op_NOP, avr_op_OR, avr_op_ORI, avr_op_OUT, avr_op_POP, avr_op_PUSH, avr_op_RCALL, avr_op_RET, avr_op_RETI, avr_op_RJMP, avr_op_ROR, avr_op_SBC, avr_op_SBCI, avr_op_SBI, avr_op_SBIC, avr_op_SBIS, avr_op_SBIW, avr_op_SBRC, avr_op_SBRS, avr_op_SLEEP, avr_op_SPM, avr_op_STD_Y, avr_op_STD_Z, avr_op_STS, avr_op_ST_X, avr_op_ST_X_decr, avr_op_ST_X_incr, avr_op_ST_Y_decr, avr_op_ST_Y_incr, avr_op_ST_Z_decr, avr_op_ST_Z_incr, avr_op_SUB, avr_op_SUBI, avr_op_SWAP, avr_op_WDR, avr_op_BREAK, and avr_op_ILLEGAL.
Referenced by AvrDevice::Step().
AvrDevice* DecodedInstruction::core [protected] |
Link to device instance.
Definition at line 42 of file decoder.h.
Referenced by avr_op_ILLEGAL::operator()(), avr_op_WDR::operator()(), avr_op_SWAP::operator()(), avr_op_SUBI::operator()(), avr_op_SUB::operator()(), avr_op_ST_Z_incr::operator()(), avr_op_ST_Z_decr::operator()(), avr_op_ST_Y_incr::operator()(), avr_op_ST_Y_decr::operator()(), avr_op_ST_X_incr::operator()(), avr_op_ST_X_decr::operator()(), avr_op_ST_X::operator()(), avr_op_STS::operator()(), avr_op_STD_Z::operator()(), avr_op_STD_Y::operator()(), avr_op_SPM::operator()(), avr_op_SLEEP::operator()(), avr_op_SBRS::operator()(), avr_op_SBRC::operator()(), avr_op_SBIW::operator()(), avr_op_SBIS::operator()(), avr_op_SBIC::operator()(), avr_op_SBI::operator()(), avr_op_SBCI::operator()(), avr_op_SBC::operator()(), avr_op_ROR::operator()(), avr_op_RJMP::operator()(), avr_op_RETI::operator()(), avr_op_RET::operator()(), avr_op_RCALL::operator()(), avr_op_PUSH::operator()(), avr_op_POP::operator()(), avr_op_OUT::operator()(), avr_op_ORI::operator()(), avr_op_OR::operator()(), avr_op_NEG::operator()(), avr_op_MULSU::operator()(), avr_op_MULS::operator()(), avr_op_MUL::operator()(), avr_op_MOVW::operator()(), avr_op_MOV::operator()(), avr_op_LSR::operator()(), avr_op_LPM_Z_incr::operator()(), avr_op_LPM::operator()(), avr_op_LPM_Z::operator()(), avr_op_LD_Z_decr::operator()(), avr_op_LD_Z_incr::operator()(), avr_op_LD_Y_incr::operator()(), avr_op_LD_Y_decr::operator()(), avr_op_LD_X_incr::operator()(), avr_op_LD_X_decr::operator()(), avr_op_LD_X::operator()(), avr_op_LDS::operator()(), avr_op_LDI::operator()(), avr_op_LDD_Z::operator()(), avr_op_LDD_Y::operator()(), avr_op_JMP::operator()(), avr_op_INC::operator()(), avr_op_IN::operator()(), avr_op_IJMP::operator()(), avr_op_ICALL::operator()(), avr_op_FMULSU::operator()(), avr_op_FMULS::operator()(), avr_op_FMUL::operator()(), avr_op_ESPM::operator()(), avr_op_EOR::operator()(), avr_op_ELPM::operator()(), avr_op_ELPM_Z_incr::operator()(), avr_op_ELPM_Z::operator()(), avr_op_EIJMP::operator()(), avr_op_EICALL::operator()(), avr_op_DEC::operator()(), avr_op_CPSE::operator()(), avr_op_CPI::operator()(), avr_op_CPC::operator()(), avr_op_CP::operator()(), avr_op_COM::operator()(), avr_op_CBI::operator()(), avr_op_CALL::operator()(), avr_op_BST::operator()(), avr_op_BSET::operator()(), avr_op_BRBS::operator()(), avr_op_BRBC::operator()(), avr_op_BLD::operator()(), avr_op_ASR::operator()(), avr_op_ANDI::operator()(), avr_op_AND::operator()(), avr_op_ADIW::operator()(), avr_op_ADD::operator()(), avr_op_ADC::operator()(), avr_op_STS::Trace(), avr_op_RJMP::Trace(), avr_op_RCALL::Trace(), avr_op_LPM_Z_incr::Trace(), avr_op_LPM::Trace(), avr_op_LPM_Z::Trace(), avr_op_LDS::Trace(), avr_op_JMP::Trace(), avr_op_ELPM::Trace(), avr_op_ELPM_Z_incr::Trace(), avr_op_ELPM_Z::Trace(), avr_op_CALL::Trace(), avr_op_BRBS::Trace(), and avr_op_BRBC::Trace().
bool DecodedInstruction::size2Word [protected] |
Flag: true, if instruction has 2 words.
Definition at line 43 of file decoder.h.
Referenced by IsInstruction2Words().