53 #ifndef ETISS_TIMING_H
54 #define ETISS_TIMING_H
84 std::function<
bool(
unsigned )> matchesWidth,
95 void addRule(
const std::tuple<std::regex, std::regex, std::regex,
100 addRule(make_tuple(std::get<0>(tuple), std::get<1>(tuple), std::get<2>(tuple),
104 template <
unsigned cycles,
bool isNotAdditionalTime = true>
113 "etiss::DataSheetAccurateTiming::handleMatch_cycles may not be used with cycle = 0 and "
114 "isNoteAdditionalTime = false");
118 code =
"cpu->cpuTime_ps += cpu->cpuCycleTime_ps; //DataSheetAccurateTiming\n";
123 " * cpu->cpuCycleTime_ps; //DataSheetAccurateTiming\n";
133 isNotAdditionalTime ? ((
uint32_t)etiss::instr::Instruction::BUILTINGROUP::CPUTIMEUPDATE) : 0);
139 template <
typename A,
typename... T>
149 template <
typename... T>
#define static_assert(x, y)
contains container classes to store instruction definitions + translation functions and build a trans...
general configuration and logging
plugins for extensions to code translation and instruction execution
static __inline__ uint32_t
Contains a small code snipped.
RegisterSet & getAffectedRegisters()
CodePart & prepend(CodePart::TYPE type)
void ctor_hlpr(const A &arg, const T &... rules)
handles the argument list passed to the template constructor
void addRule(const std::tuple< std::regex, std::regex, std::regex, void(*)(etiss::instr::Instruction &)> &tuple)
std::string _getPluginName() const
static void handleMatch_cycles(etiss::instr::Instruction &instr)
simple template function that adds the given number of cycles to the cpu time if the related rule mat...
virtual void initInstrSet(etiss::instr::ModedInstructionSet &) const
performs lookups for instructions that are in the modded instruction set to add timing code (e....
std::list< Rule * > rules_
void ctor_hlpr()
terminates recursion
DataSheetAccurateTiming(const std::string &name, const T &... rules)
void addRule(std::function< bool(uint32_t)> matchesMode, std::function< bool(unsigned)> matchesWidth, std::function< bool(etiss::instr::Instruction &)> matchesInstr, std::function< void(etiss::instr::Instruction &)> handleMatch)
this is the main add rule function.
virtual ~DataSheetAccurateTiming()
allows to add code to the translation of instructions
this class contains parameters that persist in between instruction lookpus/translation within a trans...
holds information and translation callbacks for an instruction.
bool addCallback(std::function< bool(BitArray &, etiss::CodeSet &, InstructionContext &)> callback, uint32_t builtinGroups, const std::set< uint32_t > &groups=std::set< uint32_t >())
holds etiss::instr::VariableInstructionSet instances for different modes.
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
std::string toString(const T &val)
conversion of type T to std::string.
std::function< void(etiss::instr::Instruction &)> handler
std::function< bool(etiss::instr::Instruction &)> instr
std::function< bool(unsigned)> width
std::function< bool(uint32_t)> mode