ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | Public Attributes | Private Attributes | List of all members
etiss::instr::VariableInstructionSet Class Reference

holds etiss::instr::InstructionSet instances with different bit widths. More...

#include <Instruction.h>

Collaboration diagram for etiss::instr::VariableInstructionSet:
Collaboration graph
[legend]

Public Member Functions

 etiss_del_como (VariableInstructionSet) VariableInstructionSet(ModedInstructionSet &
 
 ~VariableInstructionSet ()
 
bool compile ()
 
InstructionSetget (unsigned width)
 
InstructionSetcreate (unsigned width, const std::string &name=std::string())
 
InstructionSetopen (unsigned width, const std::string &name=std::string())
 
InstructionSetgetMain ()
 
InstructionSetcreateMain (const std::string &name=std::string())
 
InstructionSetopenMain (const std::string &name=std::string())
 
template<typename T >
Instructionopen (unsigned bits, T code, T mask, const char *name)
 
void foreach (std::function< void(InstructionSet &)> func)
 
std::string print (std::string prefix=std::string())
 

Public Attributes

ModedInstructionSetparent_
 
unsigned width_
 
const std::string archname_
 
std::function< void(VariableInstructionSet &, InstructionContext &, BitArray &)> length_updater_
 
unsigned width
 
unsigned const std::string & archname
 

Private Attributes

std::map< unsigned, InstructionSet * > ismap_
 

Detailed Description

holds etiss::instr::InstructionSet instances with different bit widths.

    Location in an instruction translation tree:
    ModedInstructionSetVariableInstructionSet (e.g. for mode 0)
            ↳ InstructionSet (e.g. 32 bit)
                ↳ Instruction (e.g. LDR, STR)
            ↳ InstructionSet (e.g. 16 bit)

Definition at line 499 of file Instruction.h.

Constructor & Destructor Documentation

◆ ~VariableInstructionSet()

etiss::instr::VariableInstructionSet::~VariableInstructionSet ( )

Definition at line 535 of file Instruction.cpp.

References ismap_.

Member Function Documentation

◆ compile()

bool etiss::instr::VariableInstructionSet::compile ( )

Definition at line 544 of file Instruction.cpp.

References ismap_, etiss::log(), etiss::WARNING, and width_.

Referenced by etiss::instr::ModedInstructionSet::compile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create()

InstructionSet * etiss::instr::VariableInstructionSet::create ( unsigned  width,
const std::string &  name = std::string() 
)

Definition at line 572 of file Instruction.cpp.

References ismap_, and width.

Referenced by createMain(), and open().

Here is the caller graph for this function:

◆ createMain()

InstructionSet* etiss::instr::VariableInstructionSet::createMain ( const std::string &  name = std::string())
inline

Definition at line 521 of file Instruction.h.

References create(), and width_.

Here is the call graph for this function:

◆ etiss_del_como()

etiss::instr::VariableInstructionSet::etiss_del_como ( VariableInstructionSet  ) &

◆ foreach()

void etiss::instr::VariableInstructionSet::foreach ( std::function< void(InstructionSet &)>  func)

◆ get()

InstructionSet * etiss::instr::VariableInstructionSet::get ( unsigned  width)

Definition at line 565 of file Instruction.cpp.

References ismap_, and width.

Referenced by etiss::Translation::disasm(), getMain(), RV32IMACFDArch::initInstrSet(), RV64IMACFDArch::initInstrSet(), open(), and etiss::Translation::translateBlock().

Here is the caller graph for this function:

◆ getMain()

InstructionSet* etiss::instr::VariableInstructionSet::getMain ( )
inline

Definition at line 520 of file Instruction.h.

References get(), and width_.

Referenced by etiss::Translation::translateBlock().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ open() [1/2]

template<typename T >
Instruction& etiss::instr::VariableInstructionSet::open ( unsigned  bits,
code,
mask,
const char *  name 
)
inline

Definition at line 525 of file Instruction.h.

References etiss::ERROR, etiss_log, etiss::instr::InstructionSet::open(), and open().

Here is the call graph for this function:

◆ open() [2/2]

InstructionSet & etiss::instr::VariableInstructionSet::open ( unsigned  width,
const std::string &  name = std::string() 
)

Definition at line 581 of file Instruction.cpp.

References create(), get(), and width.

Referenced by etiss::instr::InstructionClass::addTo(), etiss::instr::ModedInstructionSet::open(), open(), and openMain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ openMain()

InstructionSet& etiss::instr::VariableInstructionSet::openMain ( const std::string &  name = std::string())
inline

Definition at line 522 of file Instruction.h.

References open(), and width_.

Here is the call graph for this function:

◆ print()

std::string etiss::instr::VariableInstructionSet::print ( std::string  prefix = std::string())

Definition at line 606 of file Instruction.cpp.

References archname_, etiss::instr::InstructionSet::print(), and width_.

Referenced by etiss::instr::ModedInstructionSet::print().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ archname

unsigned const std::string& etiss::instr::VariableInstructionSet::archname

Definition at line 513 of file Instruction.h.

◆ archname_

const std::string etiss::instr::VariableInstructionSet::archname_

Definition at line 507 of file Instruction.h.

Referenced by print().

◆ ismap_

std::map<unsigned, InstructionSet *> etiss::instr::VariableInstructionSet::ismap_
private

Definition at line 502 of file Instruction.h.

Referenced by compile(), create(), foreach(), get(), and ~VariableInstructionSet().

◆ length_updater_

std::function<void(VariableInstructionSet &, InstructionContext &, BitArray &)> etiss::instr::VariableInstructionSet::length_updater_

◆ parent_

ModedInstructionSet& etiss::instr::VariableInstructionSet::parent_

◆ width

unsigned etiss::instr::VariableInstructionSet::width

Definition at line 513 of file Instruction.h.

Referenced by create(), get(), and open().

◆ width_

unsigned etiss::instr::VariableInstructionSet::width_

The documentation for this class was generated from the following files: