From: Gabe Black Date: Sat, 19 Sep 2020 06:28:40 +0000 (-0700) Subject: cpu: Use cprintf and C++ type magic to get rid of a THE_ISA. X-Git-Tag: develop-gem5-snapshot~722 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e5ffdb7f3470cda8dc52adc1ac8014470349399;p=gem5.git cpu: Use cprintf and C++ type magic to get rid of a THE_ISA. It should be fine to let operator overloading take care of figuring out how to print the ExtMachInst type for a given ISA. Change-Id: I173fd9f49013d92191118775d20344219a69337e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34822 Reviewed-by: Jason Lowe-Power Reviewed-by: Giacomo Travaglini Maintainer: Gabe Black Tested-by: kokoro --- diff --git a/src/cpu/minor/dyn_inst.cc b/src/cpu/minor/dyn_inst.cc index af02d9fc1..1b43fc807 100644 --- a/src/cpu/minor/dyn_inst.cc +++ b/src/cpu/minor/dyn_inst.cc @@ -214,10 +214,7 @@ MinorDynInst::minorTraceInst(const Named &named_object) const regs_str << ','; } -#if THE_ISA == ARM_ISA - regs_str << " extMachInst=" << std::hex << std::setw(16) - << std::setfill('0') << staticInst->machInst << std::dec; -#endif + ccprintf(regs_str, " extMachInst=%160x", staticInst->machInst); } std::ostringstream flags;