Go to the documentation of this file.
42 #ifndef __CPU_STATIC_INST_HH__
43 #define __CPU_STATIC_INST_HH__
50 #include "arch/pcstate.hh"
53 #include "config/the_isa.hh"
57 #include "enums/StaticInstFlags.hh"
191 flags[IsSerializeBefore] ||
192 flags[IsSerializeAfter]; }
199 return flags[IsReadBarrier] &&
flags[IsWriteBarrier];
258 virtual uint64_t
getEMI()
const {
return 0; }
313 panic(
"initiateAcc not defined!");
320 panic(
"completeAcc not defined!");
329 panic(
"buildRetPC not defined!");
375 void printFlags(std::ostream &outs,
const std::string &separator)
const;
385 size_t size =
sizeof(T);
386 if (size <= max_size)
387 *
reinterpret_cast<T *
>(buf) = htole<T>(
t);
403 virtual size_t asBytes(
void *buf,
size_t max_size) {
return 0; }
408 #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
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
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
virtual TheISA::PCState branchTarget(const TheISA::PCState &pc) const
Return the target address for a PC-relative branch.
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....
GenericISA::DelaySlotPCState< 4 > PCState
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 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.
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...
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....
virtual TheISA::PCState buildRetPC(const TheISA::PCState &cur_pc, const TheISA::PCState &call_pc) const
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.
virtual void advancePC(TheISA::PCState &pc_state) const =0
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 Sep 21 2021 12:24:35 for gem5 by doxygen 1.8.17