Holds the static information about an instruction type. More...
#include <InstructionInfo.h>
Public Types | |
enum | OperandSize { OPSIZE8 = 1, OPSIZE16 = 2, OPSIZE32 = 4, OPSIZE64 = 8, OPSIZE128 = 16 } |
enum | DataDirection { IREG2IREG = 1, IREG2MEM = 2, IREG2FREG = 4, FREG2FREG = 8, FREG2MEM = 16, FREG2IREG = 32, MEM2IREG = 64, MEM2MEM = 128, MEM2FREG = 256 } |
Public Member Functions | |
InstructionInfo () | |
Constructor (but use init() real data). | |
~InstructionInfo () | |
Destructor. | |
void | dumpDebugInfo () |
Dump debug info about instruction record. | |
void | initStaticInfo (char *name, char *operands, char *operation, char *decodeUnit, char *execUnits, char *category) |
Initializer. | |
void | initTimings (unsigned int baseLatency, unsigned int memLatency, unsigned int throughputNum, unsigned int throughputDem) |
Initializer. | |
void | initProbabilities (double occurProb, double loadProb, double storeProb, double useHistogram[]) |
Initializer. | |
void | accumProbabilities (double occurProb, unsigned long long occurs, unsigned long long loads, unsigned long long stores, double useHistogram[]) |
Use this to group together multiple Pin instruction types. | |
InstructionInfo * | findInstructionRecord (const char *mnemonic, unsigned int iOpSize) |
unsigned int | getUseDistance (double prob) |
Given a probability, retrieve matching use distance. | |
bool | isConditionalJump () |
char * | getName () |
InstructionInfo * | getNext () |
void | setNext (InstructionInfo *other) |
Category | getCategory () |
unsigned int | getLatency () |
double | getOccurProb () |
double | getLoadProb () |
double | getStoreProb () |
bool | handlesLoad () |
bool | handlesStore () |
bool | needsLoadAddress () |
bool | needsStoreAddress () |
bool | needsFunctionalUnit (FunctionalUnitTypes fut) |
bool | isFPUInstruction () |
unsigned long long | getSimulationCount () |
void | incSimulationCount () |
unsigned int | throughput () |
Static Public Member Functions | |
static InstructionInfo * | createFromString (char *infoString) |
Create and initialize an object from string data. |
Holds the static information about an instruction type.
This holds the information about how to execute an instruction along with how to do the bookkeeping for it. Objects of this class will be initialized at simulator initialization from a file of instruction info.
unsigned int InstructionInfo::getUseDistance | ( | double | prob | ) |
Given a probability, retrieve matching use distance.
This samples the CDF toUseHistogram to retrieve the distance to the instruction that uses what this instruction produces