ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
Contains a small code snipped. More...
#include <CodePart.h>
Public Types | |
enum | TYPE { PREINITIALDEBUGRETURNING , INITIALREQUIRED , OPTIONALMIDDLE , APPENDEDREQUIRED , APPENDEDOPTIONAL , APPENDEDRETURNINGREQUIRED } |
defines position,optionality and the ability to return a code for a CodePart. More... | |
Public Member Functions | |
CodePart () | |
CodePart (const std::string &code, const RegisterSet ®isterDependencies=RegisterSet(), const RegisterSet &affectedRegisters=RegisterSet()) | |
RegisterSet & | getRegisterDependencies () |
RegisterSet & | getAffectedRegisters () |
std::string & | getCode () |
std::string & | code () |
const std::string & | code () const |
const RegisterSet & | getRegisterDependencies () const |
const RegisterSet & | getAffectedRegisters () const |
const std::string & | getCode () const |
const bool & | fullRegistersDependency () const |
Private Attributes | |
std::string | code_ |
RegisterSet | registerDependencies_ |
RegisterSet | affectedRegisters_ |
bool | flag_requireAll_ |
Contains a small code snipped.
usually mulatiple CodeParts are used in a CodeSet to translate on instruction.
Each code part consists of a code snipped (e.g. "cpu->R[1] = cpu->R[2] + 42;") a set of register dependencies (e.g. "R2") and a set of affected registers (e.g. "R1"). CodeParts are assembled in a CodeSet where they can be possitioned in defferent consecutive sections (CodePart::TYPE).
Definition at line 385 of file CodePart.h.
defines position,optionality and the ability to return a code for a CodePart.
The order of declaration of these types is also the order of code sections
Only PREINITIALDEBUGRETURNING and APPENDEDRETURNINGREQUIRED may be chosen for CodeParts that contain a return statement (e.g. "return 0;"). If a TYPE contains the sequence OPTIONAL then the affected registers are inspected to decide if the CodePart is needed
Enumerator | |
---|---|
PREINITIALDEBUGRETURNING | |
INITIALREQUIRED | |
OPTIONALMIDDLE | |
APPENDEDREQUIRED | |
APPENDEDOPTIONAL | |
APPENDEDRETURNINGREQUIRED |
Definition at line 395 of file CodePart.h.
|
inline |
Definition at line 404 of file CodePart.h.
|
inline |
Definition at line 405 of file CodePart.h.
|
inline |
Definition at line 416 of file CodePart.h.
References code_.
Referenced by etiss::plugin::InstructionAccurateCallback::finalizeInstrSet(), etiss::plugin::VariableValueLogger::finalizeInstrSet(), etiss::DataSheetAccurateTiming::handleMatch_cycles(), RV32IMACFDArch::initInstrSet(), RV64IMACFDArch::initInstrSet(), and Server_finalizeInstrSet().
|
inline |
Definition at line 417 of file CodePart.h.
References code_.
|
inline |
Definition at line 421 of file CodePart.h.
References flag_requireAll_.
|
inline |
Definition at line 414 of file CodePart.h.
References affectedRegisters_.
Referenced by etiss::DataSheetAccurateTiming::handleMatch_cycles(), RV32IMACFDArch::initInstrSet(), and RV64IMACFDArch::initInstrSet().
|
inline |
Definition at line 419 of file CodePart.h.
References affectedRegisters_.
|
inline |
Definition at line 415 of file CodePart.h.
References code_.
|
inline |
Definition at line 420 of file CodePart.h.
References code_.
|
inline |
Definition at line 413 of file CodePart.h.
References registerDependencies_.
Referenced by etiss::plugin::InstructionAccurateCallback::finalizeInstrSet(), and etiss::plugin::VariableValueLogger::finalizeInstrSet().
|
inline |
Definition at line 418 of file CodePart.h.
References registerDependencies_.
|
private |
Definition at line 426 of file CodePart.h.
Referenced by getAffectedRegisters().
|
private |
Definition at line 424 of file CodePart.h.
|
private |
Definition at line 427 of file CodePart.h.
Referenced by fullRegistersDependency().
|
private |
Definition at line 425 of file CodePart.h.
Referenced by getRegisterDependencies().