Go to the documentation of this file.
47 #include "debug/MinorExecute.hh"
48 #include "enums/OpClass.hh"
65 os <<
id.threadId <<
'/' <<
id.streamSeqNum <<
'.'
66 <<
id.predictionSeqNum <<
'/' <<
id.lineSeqNum;
69 if (
id.fetchSeqNum != 0) {
70 os <<
'/' <<
id.fetchSeqNum;
71 if (
id.execSeqNum != 0)
72 os <<
'.' <<
id.execSeqNum;
80 assert(inst->isBubble());
115 os << inst.
id <<
" pc: 0x"
116 << std::hex << inst.
pc->instAddr() << std::dec <<
" (";
119 os <<
"fault: \"" << inst.
fault->name() <<
'"';
137 switch (
reg.classValue()) {
144 os <<
'm' << misc_reg <<
'(' <<
reg <<
')';
148 os <<
'f' <<
reg.index();
151 os <<
'v' <<
reg.index();
157 os <<
'r' <<
reg.index();
160 os <<
'c' <<
reg.index();
163 panic(
"Unknown register class: %d", (
int)
reg.classValue());
171 minorInst(named_object,
"id=F;%s addr=0x%x fault=\"%s\"\n",
172 id,
pc->instAddr(),
fault->name());
177 std::ostringstream regs_str;
182 regs_str <<
" srcRegs=";
184 unsigned int src_reg = 0;
185 while (src_reg < num_src_regs) {
189 if (src_reg != num_src_regs)
193 regs_str <<
" destRegs=";
195 unsigned int dest_reg = 0;
196 while (dest_reg < num_dest_regs) {
200 if (dest_reg != num_dest_regs)
207 std::ostringstream
flags;
210 minorInst(named_object,
"id=%s addr=0x%x inst=\"%s\" class=%s"
211 " flags=\"%s\"%s%s\n",
static const InstSeqNum firstPredictionSeqNum
constexpr decltype(nullptr) NoFault
void minorInst(const Named &named, const char *fmt, Args ...args)
DPRINTFN for MinorTrace MinorInst line reporting.
Id for lines and instructions.
trace::InstRecord * traceData
Trace information for this instruction's execution.
@ VecElemClass
Vector Register Native Elem lane.
const StaticInstPtr staticInst
@ CCRegClass
Condition-code register.
static MinorDynInstPtr bubbleInst
A prototypical bubble instruction.
Fault translationFault
Translation fault in case of a mem ref.
static const InstSeqNum firstFetchSeqNum
static void printRegName(std::ostream &os, const RegId ®)
Print a register in the form r<n>, f<n>, m<n>(<name>) for integer, float, and misc given an 'architec...
RefCountingPtr< MinorDynInst > MinorDynInstPtr
MinorDynInsts are currently reference counted.
static const InstSeqNum firstStreamSeqNum
First sequence numbers to use in initialisation of the pipeline and to be expected on the first line/...
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
void ccprintf(cp::Print &print)
static const InstSeqNum firstLineSeqNum
Interface for things with names.
OpClass opClass() const
Operation class. Used to select appropriate function unit in issue.
@ FloatRegClass
Floating-point register.
const StaticInstPtr nullStaticInstPtr
Statically allocated null StaticInstPtr.
bool predictedTaken
This instruction was predicted to change control flow and the following instructions will have a newe...
const RegId & srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
std::string getName()
Return name of machine instruction.
static const InstSeqNum firstExecSeqNum
bool isLastMicroop() const
bool isInst() const
Is this a real instruction.
void minorTraceInst(const Named &named_object) const
Print (possibly verbose) instruction information for MinorTrace using the given Named object's name.
Fault fault
This is actually a fault masquerading as an instruction.
bool isBubble() const
The BubbleIF interface.
@ IntRegClass
Integer register.
bool isFault() const
Is this a fault rather than instruction.
virtual uint64_t getEMI() const
virtual const std::string & disassemble(Addr pc, const loader::SymbolTable *symtab=nullptr) const
Return string representation of disassembled instruction.
std::unique_ptr< PCStateBase > pc
The fetch address of this instruction.
Dynamic instruction for Minor.
@ MiscRegClass
Control (misc) register.
void reportData(std::ostream &os) const
ReportIF interface.
std::ostream & operator<<(std::ostream &os, const InstId &id)
Print this id in the usual slash-separated format expected by MinorTrace.
bool isNoCostInst() const
Is this an instruction that can be executed ‘for free’ and needn't spend time in an FU.
uint8_t numDestRegs() const
Number of destination registers.
bool isLastOpInInst() const
Assuming this is not a fault, is this instruction either a whole instruction or the last microop from...
uint8_t numSrcRegs() const
Number of source registers.
@ VecRegClass
Vector Register.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
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.
Register ID: describe an architectural register with its class and index.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Sun Jul 30 2023 01:56:52 for gem5 by doxygen 1.8.17