32 #ifndef __CPU_STATIC_INST_HH__
33 #define __CPU_STATIC_INST_HH__
38 #include "arch/registers.hh"
39 #include "arch/types.hh"
43 #include "config/the_isa.hh"
47 #include "enums/StaticInstFlags.hh"
156 flags[IsSerializeBefore] ||
157 flags[IsSerializeAfter]; }
266 panic(
"eaComp not defined!");
272 panic(
"initiateAcc not defined!");
278 panic(
"completeAcc not defined!");
326 void printFlags(std::ostream &outs,
const std::string &separator)
const;
332 #endif // __CPU_STATIC_INST_HH__
bool isFirstMicroop() const
std::string * cachedDisassembly
String representation of disassembly (lazily evaluated via disassemble()).
bool isMicroBranch() const
int8_t _numSrcRegs
See numSrcRegs().
bool isDataPrefetch() const
int8_t _numFPDestRegs
The following are used to track physical register usage for machines with separate int & FP reg files...
bool isSquashAfter() const
bool isDelayedCommit() const
virtual const std::string & disassemble(Addr pc, const SymbolTable *symtab=0) const
Return string representation of disassembled instruction.
int8_t numCCDestRegs() const
Number of coprocesor destination regs.
bool isMemBarrier() const
OpClass opClass() const
Operation class. Used to select appropriate function unit in issue.
bool hasBranchTarget(const TheISA::PCState &pc, ThreadContext *tc, TheISA::PCState &tgt) const
Return true if the instruction is a control transfer, and if so, return the target address as well...
RegIndex destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
const char * mnemonic
Base mnemonic (e.g., "add").
virtual Fault initiateAcc(ExecContext *xc, Trace::InstRecord *traceData) const
virtual Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const =0
virtual StaticInstPtr fetchMicroop(MicroPC upc) const
Return the microop that goes with a particular micropc.
std::string getName()
Return name of machine instruction.
TheISA::RegIndex RegIndex
Logical register index type.
bool isNonSpeculative() const
bool isUncondCtrl() const
OpClass _opClass
See opClass().
If you want a reference counting pointer to a mutable object, create it like this: ...
ThreadContext is the external interface to all thread state for anything outside of the CPU...
bool isSerializing() const
const ExtMachInst machInst
The binary machine instruction.
bool isSerializeAfter() const
std::bitset< Num_Flags > flags
Flag values for this instruction.
Classes for managing reference counted objects.
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
RegIndex _srcRegIdx[MaxInstSrcRegs]
See srcRegIdx().
void printFlags(std::ostream &outs, const std::string &separator) const
Print a separator separated list of this instruction's set flag names on the given stream...
bool isIndirectCtrl() const
bool isCondDelaySlot() const
Derive from RefCounted if you want to enable reference counting of this class.
bool isThreadSync() const
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int8_t numFPDestRegs() const
Number of floating-point destination regs.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
virtual Fault eaComp(ExecContext *xc, Trace::InstRecord *traceData) const
bool isSerializeBefore() const
RegIndex srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
int8_t numSrcRegs() const
Number of source registers.
virtual const StaticInstPtr & eaCompInst() const
Memory references only: returns "fake" instruction representing the effective address part of the mem...
bool isDirectCtrl() const
int8_t _numDestRegs
See numDestRegs().
virtual std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const =0
Internal function to generate disassembly string.
bool isUnverifiable() const
virtual void advancePC(TheISA::PCState &pcState) const =0
GenericISA::SimplePCState< MachInst > PCState
virtual Fault completeAcc(Packet *pkt, ExecContext *xc, Trace::InstRecord *traceData) const
Base, ISA-independent static instruction class.
int8_t numIntDestRegs() const
Number of integer destination regs.
StaticInst(const char *_mnemonic, ExtMachInst _machInst, OpClass __opClass)
Constructor.
TheISA::ExtMachInst ExtMachInst
Binary extended machine instruction type.
RegIndex _destRegIdx[MaxInstDestRegs]
See destRegIdx().
static StaticInstPtr nullStaticInstPtr
Pointer to a statically allocated "null" instruction object.
virtual const StaticInstPtr & memAccInst() const
Memory references only: returns "fake" instruction representing the memory access part of the memory ...
bool isLastMicroop() const
bool isInstPrefetch() const
std::shared_ptr< FaultBase > Fault
virtual TheISA::PCState branchTarget(const TheISA::PCState &pc) const
Return the target address for a PC-relative branch.
int8_t numDestRegs() const
Number of destination registers.
bool isWriteBarrier() const
bool isStoreConditional() const