Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/34822 )

Change subject: cpu: Use cprintf and C++ type magic to get rid of a THE_ISA.
......................................................................

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 <power...@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Maintainer: Gabe Black <gabebl...@google.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/cpu/minor/dyn_inst.cc
1 file changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, but someone else must approve
  Giacomo Travaglini: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/cpu/minor/dyn_inst.cc b/src/cpu/minor/dyn_inst.cc
index af02d9f..1b43fc8 100644
--- a/src/cpu/minor/dyn_inst.cc
+++ b/src/cpu/minor/dyn_inst.cc
@@ -214,10 +214,7 @@
                     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;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/34822
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I173fd9f49013d92191118775d20344219a69337e
Gerrit-Change-Number: 34822
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to