ARM: Improve printing of uop disassembly.

This commit is contained in:
Min Kyu Jeong 2010-08-23 11:18:42 -05:00
parent d2fac84b95
commit e6a0be648e
3 changed files with 33 additions and 1 deletions

View file

@ -215,4 +215,31 @@ MacroVFPMemOp::MacroVFPMemOp(const char *mnem, ExtMachInst machInst,
}
}
std::string
MicroIntOp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
{
std::stringstream ss;
printMnemonic(ss);
printReg(ss, ura);
ss << ", ";
printReg(ss, urb);
ss << ", ";
ccprintf(ss, "#%d", imm);
return ss.str();
}
std::string
MicroMemOp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
{
std::stringstream ss;
printMnemonic(ss);
printReg(ss, ura);
ss << ", [";
printReg(ss, urb);
ss << ", ";
ccprintf(ss, "#%d", imm);
ss << "]";
return ss.str();
}
}

View file

@ -94,6 +94,8 @@ class MicroIntOp : public MicroOp
ura(_ura), urb(_urb), imm(_imm)
{
}
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
};
/**
@ -111,6 +113,8 @@ class MicroMemOp : public MicroIntOp
up(_up), memAccessFlags(TLB::MustBeOne | TLB::AlignWord)
{
}
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
};
/**

View file

@ -1162,7 +1162,8 @@ DefaultFetch<Impl>::fetch(bool &status_change)
#if TRACING_ON
instruction->traceData =
cpu->getTracer()->getInstRecord(curTick, cpu->tcBase(tid),
instruction->staticInst, instruction->readPC());
instruction->staticInst, instruction->readPC(),
macroop, instruction->readMicroPC());
#else
instruction->traceData = NULL;
#endif