ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
this class contains parameters that persist in between instruction lookpus/translation within a translation block. More...
#include <Instruction.h>
Public Member Functions | |
etiss_del_como (InstructionContext) inline InstructionContext() | |
instruction context is initialized by etiss::Translation class More... | |
unsigned & | ufield (std::string name) |
template<typename T > | |
uint64_t & | ufield (const T &plugin, std::string name) |
returns a persistent field More... | |
Public Attributes | |
bool | is_not_default_width_ |
if true the this instruction is not as long as the width of the variable instruction set More... | |
unsigned | instr_width_ |
bool | instr_width_fully_evaluated_ |
if true the length_updater_ function will be called again after instr_width_ bits are available More... | |
bool | force_append_next_instr_ |
if true then the block will continue with the next instruction and cannot be terminated More... | |
bool | force_block_end_ |
if true then the block ends after the current instruction. More... | |
uint64_t | current_address_ |
start address of current instruction More... | |
uint64_t | current_local_address_ |
address within the current block More... | |
unsigned | cf_delay_slot_ |
Private Attributes | |
std::map< std::string, unsigned > | ufields_ |
additional fields that can be used by any plugin/architecture. More... | |
std::map< void *, std::map< std::string, uint64_t > > | lufields_ |
additonal fields that are local (private) to a plugin/architecture. More... | |
this class contains parameters that persist in between instruction lookpus/translation within a translation block.
the instruction context passed is guaranteed to have been passed to all previous instruction lookups in order.
the or1k architecture implementaion for example uses this class to store information about a delay slot instruction and forces the translaton block to newver separate jump and delay slot instructions
if an architecture needs to pass additional information in between instruction translations the ufield function can be used to create additional variables. such variable names should alway be prefixed with a unique string to avoid collision with plugins
Definition at line 336 of file Instruction.h.
|
inline |
instruction context is initialized by etiss::Translation class
Definition at line 340 of file Instruction.h.
|
inline |
returns a persistent field
plugin | should always be the plugin to which the field belongs. Should almost always be (*this). |
Definition at line 362 of file Instruction.h.
References lufields_.
unsigned & etiss::instr::InstructionContext::ufield | ( | std::string | name | ) |
Definition at line 261 of file Instruction.cpp.
References ufields_.
unsigned etiss::instr::InstructionContext::cf_delay_slot_ |
Definition at line 372 of file Instruction.h.
Referenced by etiss::Translation::translateBlock().
uint64_t etiss::instr::InstructionContext::current_address_ |
start address of current instruction
Definition at line 366 of file Instruction.h.
Referenced by etiss::plugin::InstructionSpecificAddressCallback::finalizeInstrSet(), etiss::plugin::PrintInstruction::finalizeInstrSet(), RV32IMACFDArch::initInstrSet(), RV64IMACFDArch::initInstrSet(), and etiss::Translation::translateBlock().
uint64_t etiss::instr::InstructionContext::current_local_address_ |
address within the current block
Definition at line 367 of file Instruction.h.
Referenced by etiss::Translation::translateBlock().
bool etiss::instr::InstructionContext::force_append_next_instr_ |
if true then the block will continue with the next instruction and cannot be terminated
Definition at line 351 of file Instruction.h.
Referenced by etiss::Translation::translateBlock().
bool etiss::instr::InstructionContext::force_block_end_ |
if true then the block ends after the current instruction.
will be overridden by force_append_next_instr_
Definition at line 353 of file Instruction.h.
Referenced by etiss::Translation::translateBlock().
unsigned etiss::instr::InstructionContext::instr_width_ |
Definition at line 348 of file Instruction.h.
Referenced by RV32IMACFDArch::initInstrSet(), RV64IMACFDArch::initInstrSet(), and etiss::Translation::translateBlock().
bool etiss::instr::InstructionContext::instr_width_fully_evaluated_ |
if true the length_updater_ function will be called again after instr_width_ bits are available
Definition at line 349 of file Instruction.h.
Referenced by RV32IMACFDArch::initInstrSet(), RV64IMACFDArch::initInstrSet(), and etiss::Translation::translateBlock().
bool etiss::instr::InstructionContext::is_not_default_width_ |
if true the this instruction is not as long as the width of the variable instruction set
Definition at line 346 of file Instruction.h.
Referenced by RV32IMACFDArch::initInstrSet(), RV64IMACFDArch::initInstrSet(), and etiss::Translation::translateBlock().
|
private |
additonal fields that are local (private) to a plugin/architecture.
Definition at line 378 of file Instruction.h.
Referenced by ufield().
|
private |
additional fields that can be used by any plugin/architecture.
field names must consider this (as in: use descriptive,long names).
Definition at line 375 of file Instruction.h.
Referenced by ufield().