From b8dfb95284137c4df8b4891db20601f615bb40a8 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 28 Jan 2021 18:50:54 -0800 Subject: [PATCH] arch-arm,cpu: Use getEMI() in more places. Use that method to avoid reading the machInst. Change-Id: I11434206c0b7a1aa3793aa46b5056ad60a64b01c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40100 Reviewed-by: Giacomo Travaglini Reviewed-by: Daniel Carvalho Maintainer: Giacomo Travaglini Maintainer: Bobby R. Bruce Tested-by: kokoro --- src/arch/arm/tracers/tarmac_base.cc | 2 +- src/arch/arm/tracers/tarmac_parser.cc | 2 +- src/cpu/minor/dyn_inst.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arch/arm/tracers/tarmac_base.cc b/src/arch/arm/tracers/tarmac_base.cc index 7015cc2b4..e3364c4ed 100644 --- a/src/arch/arm/tracers/tarmac_base.cc +++ b/src/arch/arm/tracers/tarmac_base.cc @@ -64,7 +64,7 @@ TarmacBaseRecord::InstEntry::InstEntry( bool predicate) : taken(predicate) , addr(pc.instAddr()) , - opcode(staticInst->machInst & 0xffffffff), + opcode(staticInst->getEMI() & 0xffffffff), disassemble(staticInst->disassemble(addr)), isetstate(pcToISetState(pc)), mode(MODE_USER) diff --git a/src/arch/arm/tracers/tarmac_parser.cc b/src/arch/arm/tracers/tarmac_parser.cc index 332534276..db9c7e1d7 100644 --- a/src/arch/arm/tracers/tarmac_parser.cc +++ b/src/arch/arm/tracers/tarmac_parser.cc @@ -951,7 +951,7 @@ TarmacParserRecord::printMismatchHeader(const StaticInstPtr staticInst, outs << "\nMismatch between gem5 and TARMAC trace @ " << std::dec << curTick() << " ticks\n" << "[seq_num: " << std::dec << instRecord.seq_num - << ", opcode: 0x" << std::hex << (staticInst->machInst & 0xffffffff) + << ", opcode: 0x" << std::hex << (staticInst->getEMI() & 0xffffffff) << ", PC: 0x" << pc.pc() << ", disasm: " << staticInst->disassemble(pc.pc()) << "]" << std::endl; diff --git a/src/cpu/minor/dyn_inst.cc b/src/cpu/minor/dyn_inst.cc index 1b43fc807..5a08da83e 100644 --- a/src/cpu/minor/dyn_inst.cc +++ b/src/cpu/minor/dyn_inst.cc @@ -214,7 +214,7 @@ MinorDynInst::minorTraceInst(const Named &named_object) const regs_str << ','; } - ccprintf(regs_str, " extMachInst=%160x", staticInst->machInst); + ccprintf(regs_str, " extMachInst=%160x", staticInst->getEMI()); } std::ostringstream flags; -- 2.30.2