arch-arm: disassemble member variable not used by TarmacParser
We move it to the child class which is what the TarmacTracer actually uses. Change-Id: Ia30892723d2e1f7306dae87c6c9c1d69d00ad73d Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
@@ -68,7 +68,6 @@ TarmacBaseRecord::InstEntry::InstEntry(
|
||||
: taken(predicate) ,
|
||||
addr(pc.instAddr()) ,
|
||||
opcode(staticInst->getEMI() & 0xffffffff),
|
||||
disassemble(staticInst->disassemble(addr)),
|
||||
isetstate(pcToISetState(pc)),
|
||||
mode(MODE_USER)
|
||||
{
|
||||
@@ -76,11 +75,6 @@ TarmacBaseRecord::InstEntry::InstEntry(
|
||||
// Operating mode gained by reading the architectural register (CPSR)
|
||||
const CPSR cpsr = thread->readMiscRegNoEffect(MISCREG_CPSR);
|
||||
mode = (OperatingMode) (uint8_t)cpsr.mode;
|
||||
|
||||
// In Tarmac, instruction names are printed in capital
|
||||
// letters.
|
||||
std::for_each(disassemble.begin(), disassemble.end(),
|
||||
[](char& c) { c = toupper(c); });
|
||||
}
|
||||
|
||||
TarmacBaseRecord::RegEntry::RegEntry(const PCStateBase &pc)
|
||||
|
||||
@@ -93,7 +93,6 @@ class TarmacBaseRecord : public InstRecord
|
||||
bool taken;
|
||||
Addr addr;
|
||||
ArmISA::MachInst opcode;
|
||||
std::string disassemble;
|
||||
ISetState isetstate;
|
||||
ArmISA::OperatingMode mode;
|
||||
};
|
||||
|
||||
@@ -123,7 +123,8 @@ TarmacTracerRecord::TarmacTracerRecord(Tick _when, ThreadContext *_thread,
|
||||
TarmacTracerRecord::TraceInstEntry::TraceInstEntry(
|
||||
const TarmacContext& tarmCtx,
|
||||
bool predicate)
|
||||
: InstEntry(tarmCtx.thread, *tarmCtx.pc, tarmCtx.staticInst, predicate)
|
||||
: InstEntry(tarmCtx.thread, *tarmCtx.pc, tarmCtx.staticInst, predicate),
|
||||
disassemble(tarmCtx.staticInst->disassemble(addr))
|
||||
{
|
||||
secureMode = isSecure(tarmCtx.thread);
|
||||
|
||||
@@ -140,6 +141,11 @@ TarmacTracerRecord::TraceInstEntry::TraceInstEntry(
|
||||
// for 16bit (Thumb) instruction.
|
||||
opcode = arm_inst->encoding();
|
||||
|
||||
// In Tarmac, instruction names are printed in capital
|
||||
// letters.
|
||||
std::for_each(disassemble.begin(), disassemble.end(),
|
||||
[](char& c) { c = toupper(c); });
|
||||
|
||||
// Update the instruction count: number of executed
|
||||
// instructions.
|
||||
instCount++;
|
||||
|
||||
@@ -115,6 +115,9 @@ class TarmacTracerRecord : public TarmacBaseRecord
|
||||
* 32 otherwise (ARM and BigThumb)
|
||||
*/
|
||||
uint8_t instSize;
|
||||
|
||||
/** Instruction disassembly */
|
||||
std::string disassemble;
|
||||
};
|
||||
|
||||
/** Register Entry */
|
||||
|
||||
Reference in New Issue
Block a user