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;
122 os << inst.
id <<
" pc: 0x"
123 << std::hex << inst.
pc.instAddr() << std::dec <<
" (";
126 os <<
"fault: \"" << inst.
fault->name() <<
'"';
145 const auto ®_class = reg_classes.at(
reg.classValue());
146 switch (
reg.classValue()) {
152 #if THE_ISA == ARM_ISA
156 os <<
'n' << misc_reg;
161 os <<
'f' <<
reg.index();
164 os <<
'v' <<
reg.index();
167 os <<
'v' <<
reg.index() <<
'[' <<
reg.elemIndex() <<
']';
170 if (
reg.index() == reg_class.zeroReg()) {
173 os <<
'r' <<
reg.index();
177 os <<
'c' <<
reg.index();
180 panic(
"Unknown register class: %d", (
int)
reg.classValue());
189 minorInst(named_object,
"id=F;%s addr=0x%x fault=\"%s\"\n",
190 id,
pc.instAddr(),
fault->name());
195 std::ostringstream regs_str;
200 regs_str <<
" srcRegs=";
202 unsigned int src_reg = 0;
203 while (src_reg < num_src_regs) {
208 if (src_reg != num_src_regs)
212 regs_str <<
" destRegs=";
214 unsigned int dest_reg = 0;
215 while (dest_reg < num_dest_regs) {
220 if (dest_reg != num_dest_regs)
227 std::ostringstream flags;
230 minorInst(named_object,
"id=%s addr=0x%x inst=\"%s\" class=%s"
231 " flags=\"%s\"%s%s\n",
@ VecElemClass
Vector Register Native Elem lane.
@ CCRegClass
Condition-code register.
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.
const StaticInstPtr staticInst
@ FloatRegClass
Floating-point register.
@ MiscRegClass
Control (misc) register.
const char *const miscRegName[]
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 void init()
Initialise the class.
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/...
MinorDynInst(StaticInstPtr si, InstId id_=InstId(), Fault fault_=NoFault)
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.
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.
bool isFault() const
Is this a fault rather than instruction.
@ VecRegClass
Vector Register.
virtual uint64_t getEMI() const
virtual const std::string & disassemble(Addr pc, const loader::SymbolTable *symtab=nullptr) const
Return string representation of disassembled instruction.
Dynamic instruction for Minor.
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.
TheISA::PCState pc
The fetch address of this instruction.
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...
@ IntRegClass
Integer 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 Sep 21 2021 12:25:01 for gem5 by doxygen 1.8.17