Go to the documentation of this file.
43 #include "arch/isa.hh"
48 #include "debug/MinorExecute.hh"
49 #include "enums/OpClass.hh"
67 os <<
id.threadId <<
'/' <<
id.streamSeqNum <<
'.'
68 <<
id.predictionSeqNum <<
'/' <<
id.lineSeqNum;
71 if (
id.fetchSeqNum != 0) {
72 os <<
'/' <<
id.fetchSeqNum;
73 if (
id.execSeqNum != 0)
74 os <<
'.' <<
id.execSeqNum;
82 assert(inst->isBubble());
117 os << inst.
id <<
" pc: 0x"
118 << std::hex << inst.
pc->instAddr() << std::dec <<
" (";
121 os <<
"fault: \"" << inst.
fault->name() <<
'"';
140 const auto ®_class = reg_classes.at(
reg.classValue());
141 switch (
reg.classValue()) {
145 os <<
'm' << misc_reg <<
'(' << reg_class.regName(
reg) <<
')';
149 os <<
'f' <<
reg.index();
152 os <<
'v' <<
reg.index();
155 os <<
'v' <<
reg.index() <<
'[' <<
reg.elemIndex() <<
']';
158 if (
reg.index() == reg_class.zeroReg()) {
161 os <<
'r' <<
reg.index();
165 os <<
'c' <<
reg.index();
168 panic(
"Unknown register class: %d", (
int)
reg.classValue());
177 minorInst(named_object,
"id=F;%s addr=0x%x fault=\"%s\"\n",
178 id,
pc->instAddr(),
fault->name());
183 std::ostringstream regs_str;
188 regs_str <<
" srcRegs=";
190 unsigned int src_reg = 0;
191 while (src_reg < num_src_regs) {
196 if (src_reg != num_src_regs)
200 regs_str <<
" destRegs=";
202 unsigned int dest_reg = 0;
203 while (dest_reg < num_dest_regs) {
208 if (dest_reg != num_dest_regs)
215 std::ostringstream flags;
218 minorInst(named_object,
"id=%s addr=0x%x inst=\"%s\" class=%s"
219 " 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.
@ VecElemClass
Vector Register Native Elem lane.
const StaticInstPtr staticInst
@ CCRegClass
Condition-code register.
static MinorDynInstPtr bubbleInst
A prototypical bubble instruction.
int8_t numSrcRegs() const
Number of source registers.
void minorTraceInst(const Named &named_object, const BaseISA::RegClasses ®_classes) const
Print (possibly verbose) instruction information for MinorTrace using the given Named object's name.
static void printRegName(std::ostream &os, const RegId ®, const BaseISA::RegClasses ®_classes)
Print a register in the form r<n>, f<n>, m<n>(<name>) for integer, float, and misc given an 'architec...
Fault translationFault
Translation fault in case of a mem ref.
static const InstSeqNum firstFetchSeqNum
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
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
bool isLastMicroop() const
bool isInst() const
Is this a real instruction.
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.
int8_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...
@ VecRegClass
Vector Register.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Trace::InstRecord * traceData
Trace information for this instruction's execution.
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 Tue Feb 8 2022 11:47:03 for gem5 by doxygen 1.8.17