Go to the documentation of this file.
42 #ifndef __CPU_STATIC_INST_HH__
43 #define __CPU_STATIC_INST_HH__
49 #include "arch/registers.hh"
50 #include "arch/types.hh"
54 #include "config/the_isa.hh"
59 #include "enums/StaticInstFlags.hh"
186 flags[IsSerializeBefore] ||
187 flags[IsSerializeAfter]; }
293 panic(
"initiateAcc not defined!");
299 panic(
"completeAcc not defined!");
347 void printFlags(std::ostream &outs,
const std::string &separator)
const;
357 size_t size =
sizeof(T);
358 if (size <= max_size)
359 *
reinterpret_cast<T *
>(buf) = htole<T>(
t);
375 virtual size_t asBytes(
void *buf,
size_t max_size) {
return 0; }
378 #endif // __CPU_STATIC_INST_HH__
int8_t numCCDestRegs() const
Number of coprocesor destination regs.
int8_t _numVecDestRegs
To use in architectures with vector register file.
std::bitset< Num_Flags > flags
Flag values for this instruction.
bool isDirectCtrl() const
bool isMicroBranch() const
virtual Fault initiateAcc(ExecContext *xc, Trace::InstRecord *traceData) const
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
virtual void advancePC(TheISA::PCState &pcState) const =0
Base, ISA-independent static instruction class.
bool isSerializing() const
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.
int8_t numIntDestRegs() const
Number of integer destination regs.
OpClass opClass() const
Operation class. Used to select appropriate function unit in issue.
bool isSerializeAfter() const
Register ID: describe an architectural register with its class and index.
int8_t _numVecElemDestRegs
bool isFirstMicroop() const
std::string * cachedDisassembly
String representation of disassembly (lazily evaluated via disassemble()).
ThreadContext is the external interface to all thread state for anything outside of the CPU.
bool isDelayedCommit() const
virtual TheISA::PCState branchTarget(const TheISA::PCState &pc) const
Return the target address for a PC-relative branch.
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.
int8_t numDestRegs() const
Number of destination registers.
StaticInst(const char *_mnemonic, ExtMachInst _machInst, OpClass __opClass)
Constructor.
std::shared_ptr< FaultBase > Fault
bool isSerializeBefore() const
RegId _srcRegIdx[MaxInstSrcRegs]
See srcRegIdx().
bool isSquashAfter() const
std::string getName()
Return name of machine instruction.
bool isDataPrefetch() const
RegId _destRegIdx[MaxInstDestRegs]
See destRegIdx().
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
bool isNonSpeculative() const
OpClass _opClass
See opClass().
const char * mnemonic
Base mnemonic (e.g., "add").
TheISA::ExtMachInst ExtMachInst
Binary extended machine instruction type.
bool isIndirectCtrl() const
const RegId & srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
virtual size_t asBytes(void *buf, size_t max_size)
Instruction classes can override this function to return a a representation of themselves as a blob o...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
static StaticInstPtr nullStaticInstPtr
Pointer to a statically allocated "null" instruction object.
int8_t _numVecPredDestRegs
bool isWriteBarrier() const
int8_t numSrcRegs() const
Number of source registers.
bool isThreadSync() const
size_t simpleAsBytes(void *buf, size_t max_size, const T &t)
bool isInstPrefetch() const
bool isLastMicroop() const
Derive from RefCounted if you want to enable reference counting of this class.
int8_t numVecDestRegs() const
Number of vector destination regs.
virtual StaticInstPtr fetchMicroop(MicroPC upc) const
Return the microop that goes with a particular micropc.
const ExtMachInst machInst
The binary machine instruction.
GenericISA::DelaySlotPCState< MachInst > PCState
virtual const std::string & disassemble(Addr pc, const Loader::SymbolTable *symtab=nullptr) const
Return string representation of disassembled instruction.
bool isCondDelaySlot() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
virtual Fault completeAcc(Packet *pkt, ExecContext *xc, Trace::InstRecord *traceData) const
int8_t _numSrcRegs
See numSrcRegs().
bool isUnverifiable() const
If you want a reference counting pointer to a mutable object, create it like this:
int8_t _numFPDestRegs
The following are used to track physical register usage for machines with separate int & FP reg files...
virtual Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const =0
static StaticInstPtr nopStaticInstPtr
Pointer to a statically allocated generic "nop" instruction object.
int8_t numFPDestRegs() const
Number of floating-point destination regs.
int8_t numVecElemDestRegs() const
Number of vector element destination regs.
int8_t numVecPredDestRegs() const
Number of predicate destination regs.
virtual std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const =0
Internal function to generate disassembly string.
bool isUncondCtrl() const
int8_t _numDestRegs
See numDestRegs().
bool isMemBarrier() const
#define panic(...)
This implements a cprintf based panic() function.
bool isStoreConditional() const
Generated on Wed Sep 30 2020 14:02:00 for gem5 by doxygen 1.8.17