Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/52064 )
Change subject: arch,cpu-minor: Make the uReset method virtual in
PCStateBase.
......................................................................
arch,cpu-minor: Make the uReset method virtual in PCStateBase.
This is used in the minor CPU, but maybe shouldn't. This makes it
accessible from a generic PCStatePtr without having to cast it to a
PCState subclass.
Change-Id: Ied89e2c9c69b1a7d647129fdade10312e21dcaa1
---
M src/cpu/minor/fetch2.cc
M src/arch/generic/pcstate.hh
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/src/arch/generic/pcstate.hh b/src/arch/generic/pcstate.hh
index e427f38..2367244 100644
--- a/src/arch/generic/pcstate.hh
+++ b/src/arch/generic/pcstate.hh
@@ -119,6 +119,12 @@
return _upc;
}
+ virtual void
+ uReset()
+ {
+ _upc = 0;
+ }
+
void
serialize(CheckpointOut &cp) const override
{
@@ -265,9 +271,9 @@
// Reset the macroop's upc without advancing the regular pc.
void
- uReset()
+ uReset() override
{
- _upc = 0;
+ PCStateBase::uReset();
_nupc = 1;
}
diff --git a/src/cpu/minor/fetch2.cc b/src/cpu/minor/fetch2.cc
index 5215957..82648d0 100644
--- a/src/cpu/minor/fetch2.cc
+++ b/src/cpu/minor/fetch2.cc
@@ -447,7 +447,7 @@
* may be pointing to a microop other than 0. Once
* advanced, however, the microop number *must* be 0
*/
- fetch_info.pc->as<TheISA::PCState>().uReset();
+ fetch_info.pc->uReset();
/* Advance PC for the next instruction */
decoded_inst->advancePC(*fetch_info.pc);
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52064
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: Ied89e2c9c69b1a7d647129fdade10312e21dcaa1
Gerrit-Change-Number: 52064
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s