ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
holds etiss::instr::Instruction instances and handles automatic instruction tree creation. More...
#include <Instruction.h>
Public Member Functions | |
etiss_del_como (InstructionSet) VariableInstructionSet &parent_ | |
InstructionSet (VariableInstructionSet &parent, unsigned width, const std::string &name, unsigned c_size=4) | |
~InstructionSet () | |
Instruction * | get (const OPCode &key) |
Instruction & | open (const OPCode &key, const std::string &name) |
Instruction * | create (const OPCode &key, const std::string &name) |
template<typename T > | |
Instruction & | open (T code, T val, const std::string &name) |
bool | compile () |
bool | compile (Node *node, BitArray code, Instruction *instr) |
Instruction * | resolve (BitArray &instr) |
Instruction * | resolve (Node *node, BitArray &instr) |
std::string | print (std::string prefix, bool printunused=false) |
Instruction & | getInvalid () |
void | foreach (std::function< void(Instruction &)> func) |
size_t | size () |
std::string | toString () const |
![]() | |
ToString () | |
virtual | ~ToString () |
Public Attributes | |
const std::string | name_ |
const unsigned | width_ |
const unsigned | chunk_size |
Private Attributes | |
std::map< const OPCode *, Instruction *, etiss::instr::less > | instrmap_ |
Node ** | root_ |
Instruction | invalid |
holds etiss::instr::Instruction instances and handles automatic instruction tree creation.
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 441 of file Instruction.h.
etiss::instr::InstructionSet::InstructionSet | ( | VariableInstructionSet & | parent, |
unsigned | width, | ||
const std::string & | name, | ||
unsigned | c_size = 4 |
||
) |
Definition at line 351 of file Instruction.cpp.
etiss::instr::InstructionSet::~InstructionSet | ( | ) |
Definition at line 357 of file Instruction.cpp.
References chunk_size, instrmap_, root_, and width_.
bool etiss::instr::InstructionSet::compile | ( | ) |
Definition at line 413 of file Instruction.cpp.
References chunk_size, etiss::instr::BitArray::get_range(), instrmap_, etiss::instr::BitArray::permutate(), pow, root_, and width_.
bool etiss::instr::InstructionSet::compile | ( | Node * | node, |
BitArray | code, | ||
Instruction * | instr | ||
) |
Instruction * etiss::instr::InstructionSet::create | ( | const OPCode & | key, |
const std::string & | name | ||
) |
Definition at line 396 of file Instruction.cpp.
References etiss::ERROR, instrmap_, etiss::log(), and etiss::instr::Instruction::opc_.
Referenced by etiss::instr::InstructionGroup::addTo(), and open().
etiss::instr::InstructionSet::etiss_del_como | ( | InstructionSet | ) | & |
void etiss::instr::InstructionSet::foreach | ( | std::function< void(Instruction &)> | func | ) |
Definition at line 503 of file Instruction.cpp.
References etiss::ERROR, instrmap_, and etiss::log().
Referenced by CPUArch_finalizeInstrSet(), etiss::plugin::InstructionAccurateCallback::finalizeInstrSet(), etiss::plugin::InstructionSpecificAddressCallback::finalizeInstrSet(), etiss::plugin::PrintInstruction::finalizeInstrSet(), etiss::plugin::VariableValueLogger::finalizeInstrSet(), etiss::DataSheetAccurateTiming::initInstrSet(), and Server_finalizeInstrSet().
Instruction * etiss::instr::InstructionSet::get | ( | const OPCode & | key | ) |
Definition at line 373 of file Instruction.cpp.
References instrmap_.
Referenced by open().
Instruction & etiss::instr::InstructionSet::getInvalid | ( | ) |
Definition at line 498 of file Instruction.cpp.
References invalid.
Referenced by RV32IMACFDArch::initInstrSet(), RV64IMACFDArch::initInstrSet(), and etiss::Translation::translateBlock().
Instruction & etiss::instr::InstructionSet::open | ( | const OPCode & | key, |
const std::string & | name | ||
) |
Definition at line 382 of file Instruction.cpp.
References create(), etiss_log, etiss::FATALERROR, and get().
Referenced by open(), and etiss::instr::VariableInstructionSet::open().
|
inline |
Definition at line 458 of file Instruction.h.
References open(), and width_.
Definition at line 484 of file Instruction.cpp.
References name_, root_, and width_.
Referenced by etiss::instr::VariableInstructionSet::print().
Instruction * etiss::instr::InstructionSet::resolve | ( | BitArray & | instr | ) |
Definition at line 451 of file Instruction.cpp.
References chunk_size, etiss::instr::BitArray::get_range(), get_metrics::results, and root_.
Referenced by etiss::Translation::disasm(), and etiss::Translation::translateBlock().
Instruction* etiss::instr::InstructionSet::resolve | ( | Node * | node, |
BitArray & | instr | ||
) |
size_t etiss::instr::InstructionSet::size | ( | ) |
Definition at line 522 of file Instruction.cpp.
References instrmap_.
|
inline |
Definition at line 477 of file Instruction.h.
References name_.
const unsigned etiss::instr::InstructionSet::chunk_size |
Definition at line 449 of file Instruction.h.
Referenced by compile(), resolve(), and ~InstructionSet().
|
private |
Definition at line 480 of file Instruction.h.
Referenced by compile(), create(), foreach(), get(), size(), and ~InstructionSet().
|
private |
Definition at line 484 of file Instruction.h.
Referenced by getInvalid().
const std::string etiss::instr::InstructionSet::name_ |
Definition at line 447 of file Instruction.h.
Referenced by print(), and toString().
|
private |
Definition at line 482 of file Instruction.h.
Referenced by compile(), print(), resolve(), and ~InstructionSet().
const unsigned etiss::instr::InstructionSet::width_ |
Definition at line 448 of file Instruction.h.
Referenced by compile(), open(), print(), and ~InstructionSet().