|
ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
|
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 |
Public Member Functions inherited from etiss::ToString | |
| 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 396 of file Instruction.h.
| etiss::instr::InstructionSet::InstructionSet | ( | VariableInstructionSet & | parent, |
| unsigned | width, | ||
| const std::string & | name, | ||
| unsigned | c_size = 4 |
||
| ) |
Definition at line 324 of file Instruction.cpp.
| etiss::instr::InstructionSet::~InstructionSet | ( | ) |
Definition at line 329 of file Instruction.cpp.
References chunk_size, instrmap_, root_, and width_.
| bool etiss::instr::InstructionSet::compile | ( | ) |
Definition at line 385 of file Instruction.cpp.
References chunk_size, etiss::instr::BitArray::get_range(), instrmap_, etiss::instr::BitArray::permutate(), 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 368 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 487 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 345 of file Instruction.cpp.
References instrmap_.
Referenced by open().

| Instruction & etiss::instr::InstructionSet::getInvalid | ( | ) |
Definition at line 482 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 354 of file Instruction.cpp.
References create(), etiss_log, etiss::FATALERROR, and get().
Referenced by open(), and etiss::instr::VariableInstructionSet::open().


|
inline |
Definition at line 413 of file Instruction.h.
References open(), and width_.

Definition at line 468 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 427 of file Instruction.cpp.
References chunk_size, etiss::instr::BitArray::get_range(), 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 506 of file Instruction.cpp.
References instrmap_.
|
inline |
Definition at line 432 of file Instruction.h.
References name_.
| const unsigned etiss::instr::InstructionSet::chunk_size |
Definition at line 404 of file Instruction.h.
Referenced by compile(), resolve(), and ~InstructionSet().
|
private |
Definition at line 435 of file Instruction.h.
Referenced by compile(), create(), foreach(), get(), size(), and ~InstructionSet().
|
private |
Definition at line 439 of file Instruction.h.
Referenced by getInvalid().
| const std::string etiss::instr::InstructionSet::name_ |
Definition at line 402 of file Instruction.h.
Referenced by print(), and toString().
|
private |
Definition at line 437 of file Instruction.h.
Referenced by compile(), print(), resolve(), and ~InstructionSet().
| const unsigned etiss::instr::InstructionSet::width_ |
Definition at line 403 of file Instruction.h.
Referenced by compile(), etiss::DataSheetAccurateTiming::initInstrSet(), open(), print(), and ~InstructionSet().