|
ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
|
holds etiss::instr::VariableInstructionSet instances for different modes. More...
#include <Instruction.h>

Public Member Functions | |
| etiss_del_como(ModedInstructionSet) ModedInstructionSet(const std | ~ModedInstructionSet () |
| VariableInstructionSet * | get (uint32_t mode) |
| VariableInstructionSet * | create (uint32_t mode, unsigned width, const std::string &name=std::string()) |
| VariableInstructionSet & | open (uint32_t mode, unsigned width, const std::string &name=std::string()) |
| template<typename T > | |
| Instruction & | open (uint32_t mode, unsigned width, unsigned bits, T code, T mask, const char *instrname) |
| uint32_t | getMode (VariableInstructionSet *vis) |
| uint32_t | getMode (VariableInstructionSet &vis) |
| void | foreach (std::function< void(VariableInstructionSet &)> call) |
| bool | compile () |
| std::string | print (std::string prefix=std::string()) |
Public Attributes | |
| const std::string | archname_ |
Private Attributes | |
| std::map< uint32_t, std::string > | modetostring_ |
| std::map< std::string, uint32_t > | stringtomode_ |
| std::map< uint32_t, VariableInstructionSet * > | vismap_ |
| std::map< VariableInstructionSet *, uint32_t > | invvismap_ |
holds etiss::instr::VariableInstructionSet instances for different modes.
The field ETISS_CPU::mode selects the matching VariableInstructionSet from this ModedInstructionSet.
ETISS includes a mode check at the start of a translation block to check if the translated block was compiled with the same mode as the current mode. If the modes mismatch the block will be discarded and translated again.
Location in an instruction translation tree:
ModedInstructionSet
↳ VariableInstructionSet (e.g. for mode 0)
↳ InstructionSet (e.g. 32 bit)
↳ Instruction (e.g. LDR, STR)
↳ InstructionSet (e.g. 16 bit)
Definition at line 516 of file Instruction.h.
| etiss::instr::ModedInstructionSet::~ModedInstructionSet | ( | ) |
Definition at line 601 of file Instruction.cpp.
References vismap_.
| bool etiss::instr::ModedInstructionSet::compile | ( | ) |
Definition at line 674 of file Instruction.cpp.
References etiss::instr::VariableInstructionSet::compile().
Referenced by etiss::Translation::init(), RV32IMACFDArch::initInstrSet(), and RV64IMACFDArch::initInstrSet().


| VariableInstructionSet * etiss::instr::ModedInstructionSet::create | ( | uint32_t | mode, |
| unsigned | width, | ||
| const std::string & | name = std::string() |
||
| ) |
Definition at line 616 of file Instruction.cpp.
References etiss::ERROR, etiss_log, invvismap_, and vismap_.
Referenced by open().

| void etiss::instr::ModedInstructionSet::foreach | ( | std::function< void(VariableInstructionSet &)> | call | ) |
Definition at line 659 of file Instruction.cpp.
References etiss::ERROR, etiss_log, and vismap_.
Referenced by etiss::CPUArch::finalizeInstrSet(), etiss::plugin::InstructionAccurateCallback::finalizeInstrSet(), etiss::plugin::InstructionSpecificAddressCallback::finalizeInstrSet(), etiss::plugin::PrintInstruction::finalizeInstrSet(), etiss::plugin::VariableValueLogger::finalizeInstrSet(), etiss::plugin::gdb::Server::finalizeInstrSet(), and etiss::DataSheetAccurateTiming::initInstrSet().

| VariableInstructionSet * etiss::instr::ModedInstructionSet::get | ( | uint32_t | mode | ) |
Definition at line 609 of file Instruction.cpp.
References vismap_.
Referenced by etiss::Translation::disasm(), RV32IMACFDArch::initInstrSet(), RV64IMACFDArch::initInstrSet(), open(), and etiss::Translation::translateBlock().

|
inline |
Definition at line 547 of file Instruction.h.
References getMode().
Referenced by getMode().


| uint32_t etiss::instr::ModedInstructionSet::getMode | ( | VariableInstructionSet * | vis | ) |
Definition at line 649 of file Instruction.cpp.
References etiss::ERROR, etiss_log, invvismap_, and uint32_t.
Referenced by etiss::DataSheetAccurateTiming::initInstrSet(), and print().

| VariableInstructionSet & etiss::instr::ModedInstructionSet::open | ( | uint32_t | mode, |
| unsigned | width, | ||
| const std::string & | name = std::string() |
||
| ) |
Definition at line 634 of file Instruction.cpp.
References create(), etiss::ERROR, etiss_log, get(), and etiss::instr::VariableInstructionSet::width_.
Referenced by etiss::instr::InstructionCollection::addTo(), and open().


|
inline |
Definition at line 541 of file Instruction.h.
References open(), and etiss::instr::VariableInstructionSet::open().

| std::string etiss::instr::ModedInstructionSet::print | ( | std::string | prefix = std::string() | ) |
Definition at line 682 of file Instruction.cpp.
References archname_, getMode(), etiss::instr::VariableInstructionSet::parent_, and etiss::instr::VariableInstructionSet::print().
Referenced by RV32IMACFDArch::initInstrSet(), and RV64IMACFDArch::initInstrSet().


| const std::string etiss::instr::ModedInstructionSet::archname_ |
Definition at line 525 of file Instruction.h.
Referenced by print().
|
private |
Definition at line 522 of file Instruction.h.
|
private |
Definition at line 519 of file Instruction.h.
|
private |
Definition at line 520 of file Instruction.h.
|
private |
Definition at line 521 of file Instruction.h.
Referenced by create(), foreach(), get(), and ~ModedInstructionSet().