45 #include "arch/isa.hh"
46 #include "arch/registers.hh"
50 #include "debug/MinorExecute.hh"
51 #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;
118 os << inst.
id <<
" pc: 0x"
119 << std::hex << inst.
pc.instAddr() << std::dec <<
" (";
122 os <<
"fault: \"" << inst.
fault->name() <<
'"';
147 #if THE_ISA == ARM_ISA
151 os <<
'n' << misc_reg;
162 os << 'r' << static_cast<unsigned int>(
reg);
174 MINORINST(&named_object,
"id=F;%s addr=0x%x fault=\"%s\"\n",
175 id,
pc.instAddr(),
fault->name());
180 std::ostringstream regs_str;
185 regs_str <<
" srcRegs=";
187 unsigned int src_reg = 0;
188 while (src_reg < num_src_regs) {
192 if (src_reg != num_src_regs)
196 regs_str <<
" destRegs=";
198 unsigned int dest_reg = 0;
199 while (dest_reg < num_dest_regs) {
203 if (dest_reg != num_dest_regs)
207 #if THE_ISA == ARM_ISA
208 regs_str <<
" extMachInst=" << std::hex << std::setw(16)
213 std::ostringstream flags;
216 MINORINST(&named_object,
"id=%s addr=0x%x inst=\"%s\" class=%s"
217 " flags=\"%s\"%s%s\n",
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...
static const InstSeqNum firstPredictionSeqNum
virtual const std::string & disassemble(Addr pc, const SymbolTable *symtab=0) const
Return string representation of disassembled instruction.
void reportData(std::ostream &os) const
ReportIF interface.
RegClass
Enumerate the classes of registers.
OpClass opClass() const
Operation class. Used to select appropriate function unit in issue.
Fault fault
This is actually a fault masquerading as an instruction.
RefCountingPtr< MinorDynInst > MinorDynInstPtr
MinorDynInsts are currently reference counted.
bool isBubble() const
The BubbleIF interface.
RegIndex destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
Id for lines and instructions.
std::string getName()
Return name of machine instruction.
const char *const miscRegName[]
MinorDynInst(InstId id_=InstId(), Fault fault_=NoFault)
This file contains miscellaneous classes and functions for formatting general trace information and a...
bool predictedTaken
This instruction was predicted to change control flow and the following instructions will have a newe...
void minorTraceInst(const Named &named_object) const
Print (possibly verbose) instruction information for MinorTrace using the given Named object's name...
static const InstSeqNum firstExecSeqNum
const ExtMachInst machInst
The binary machine instruction.
static const InstSeqNum firstFetchSeqNum
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...
bool isInst() const
Is this a real instruction.
static void init()
Initialise the class.
static MinorDynInstPtr bubbleInst
A prototypical bubble instruction.
RegIndex srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
bool isFault() const
Is this a fault rather than instruction.
int8_t numSrcRegs() const
Number of source registers.
#define MINORINST(sim_object,...)
DPRINTFN for MinorTrace MinorInst line reporting.
bool isLastOpInInst() const
Assuming this is not a fault, is this instruction either a whole instruction or the last microop from...
Dynamic instruction for Minor.
TheISA::PCState pc
The fetch address of this instruction.
The dynamic instruction and instruction/line id (sequence numbers) definition for Minor...
static const InstSeqNum firstLineSeqNum
RegClass regIdxToClass(TheISA::RegIndex reg_idx, TheISA::RegIndex *rel_reg_idx=NULL)
Map a 'unified' architectural register index to its register class.
bool isLastMicroop() const
static void printRegName(std::ostream &os, TheISA::RegIndex reg)
Print a register in the form r<n>, f<n>, m<n>(<name>), z for integer, float, misc and zero registers given an...
int8_t numDestRegs() const
Number of destination registers.
Trace::InstRecord * traceData
Trace information for this instruction's execution.
static const InstSeqNum firstStreamSeqNum
First sequence numbers to use in initialisation of the pipeline and to be expected on the first line/...