Go to the documentation of this file.
42 #ifndef __CPU_STATIC_INST_HH__
43 #define __CPU_STATIC_INST_HH__
56 #include "enums/StaticInstFlags.hh"
190 flags[IsSerializeBefore] ||
191 flags[IsSerializeAfter]; }
198 return flags[IsReadBarrier] &&
flags[IsWriteBarrier];
257 virtual uint64_t
getEMI()
const {
return 0; }
312 panic(
"initiateAcc not defined!");
319 panic(
"completeAcc not defined!");
325 virtual std::unique_ptr<PCStateBase>
328 panic(
"buildRetPC not defined!");
369 void printFlags(std::ostream &outs,
const std::string &separator)
const;
379 size_t size =
sizeof(T);
380 if (size <= max_size)
381 *
reinterpret_cast<T *
>(buf) = htole<T>(
t);
397 virtual size_t asBytes(
void *buf,
size_t max_size) {
return 0; }
402 #endif // __CPU_STATIC_INST_HH__
bool isWriteBarrier() const
bool isSerializeBefore() const
bool isNonSpeculative() const
int8_t numCCDestRegs() const
Number of coprocesor destination regs.
bool isIndirectCtrl() const
bool isUnverifiable() const
virtual std::unique_ptr< PCStateBase > buildRetPC(const PCStateBase &cur_pc, const PCStateBase &call_pc) const
RegId(StaticInst::*)[] RegIdArrayPtr
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...
bool isSerializeAfter() const
void setSrcRegIdx(int i, const RegId &val)
int8_t _numFPDestRegs
The following are used to track physical register usage for machines with separate int & FP reg files...
size_t simpleAsBytes(void *buf, size_t max_size, const T &t)
StaticInst(const char *_mnemonic, OpClass op_class)
Constructor.
int8_t numSrcRegs() const
Number of source registers.
bool isDelayedCommit() const
int8_t numVecDestRegs() const
Number of vector destination regs.
void setDestRegIdx(int i, const RegId &val)
bool isFirstMicroop() const
virtual void advancePC(PCStateBase &pc_state) const =0
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
OpClass _opClass
See opClass().
virtual Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const =0
int8_t numVecPredDestRegs() const
Number of predicate destination regs.
virtual StaticInstPtr fetchMicroop(MicroPC upc) const
Return the microop that goes with a particular micropc.
int8_t numVecElemDestRegs() const
Number of vector element destination regs.
int8_t numFPDestRegs() const
Number of floating-point destination regs.
OpClass opClass() const
Operation class. Used to select appropriate function unit in issue.
Wrapper that groups a few flag bits under the same undelying container.
bool isDataPrefetch() const
Base, ISA-independent static instruction class.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
std::shared_ptr< FaultBase > Fault
const RegId & srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
ProbePointArg< PacketInfo > Packet
Packet probe point.
int8_t _numVecElemDestRegs
std::string getName()
Return name of machine instruction.
std::bitset< Num_Flags > flags
Flag values for this instruction.
RegIdArrayPtr _destRegIdxPtr
See destRegIdx().
bool isDirectCtrl() const
RegIdArrayPtr _srcRegIdxPtr
See srcRegIdx().
virtual std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const =0
Internal function to generate disassembly string.
void setRegIdxArrays(RegIdArrayPtr src, RegIdArrayPtr dest)
Set the pointers which point to the arrays of source and destination register indices.
int8_t numIntDestRegs() const
Number of integer destination regs.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
bool isLastMicroop() const
bool isReadBarrier() const
Derive from RefCounted if you want to enable reference counting of this class.
virtual uint64_t getEMI() const
bool isInstPrefetch() const
virtual Fault completeAcc(Packet *pkt, ExecContext *xc, Trace::InstRecord *trace_data) const
static StaticInstPtr nullStaticInstPtr
Pointer to a statically allocated "null" instruction object.
virtual const std::string & disassemble(Addr pc, const loader::SymbolTable *symtab=nullptr) const
Return string representation of disassembled instruction.
virtual Fault initiateAcc(ExecContext *xc, Trace::InstRecord *traceData) const
int8_t _numDestRegs
See numDestRegs().
bool isSquashAfter() const
std::unique_ptr< std::string > cachedDisassembly
String representation of disassembly (lazily evaluated via disassemble()).
bool isSerializing() const
int8_t numDestRegs() const
Number of destination registers.
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
virtual std::unique_ptr< PCStateBase > branchTarget(const PCStateBase &pc) const
Return the target address for a PC-relative branch.
bool isFullMemBarrier() const
bool isUncondCtrl() const
bool isStoreConditional() const
int8_t _numVecPredDestRegs
const char * mnemonic
Base mnemonic (e.g., "add").
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
int8_t _numSrcRegs
See numSrcRegs().
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 _numVecDestRegs
To use in architectures with vector register file.
Register ID: describe an architectural register with its class and index.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Tue Feb 8 2022 11:46:57 for gem5 by doxygen 1.8.17