arch: Rename PCStateCommon to PCStateWithNext.

This intermediate class has a fairly vague name. This new name more
specifically describes what this PCState class adds to its base class.

Change-Id: I6d19383f3eb2895d924187ddbf8185352db71542
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52486
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
This commit is contained in:
Gabe Black
2021-11-05 07:33:40 -07:00
parent 9f2fa6c4ce
commit 7d00ef8c5b

View File

@@ -246,18 +246,18 @@ set(PCStateBase &dest, const PCStateBase &src)
namespace GenericISA
{
class PCStateCommon : public PCStateBase
class PCStateWithNext : public PCStateBase
{
protected:
Addr _npc = 0;
MicroPC _nupc = 1;
PCStateCommon(const PCStateCommon &other) : PCStateBase(other),
PCStateWithNext(const PCStateWithNext &other) : PCStateBase(other),
_npc(other._npc), _nupc(other._nupc)
{}
PCStateCommon &operator=(const PCStateCommon &other) = default;
PCStateCommon() {}
PCStateWithNext &operator=(const PCStateWithNext &other) = default;
PCStateWithNext() {}
public:
Addr pc() const { return _pc; }
@@ -296,7 +296,7 @@ class PCStateCommon : public PCStateBase
update(const PCStateBase &other) override
{
PCStateBase::update(other);
auto &pcstate = other.as<PCStateCommon>();
auto &pcstate = other.as<PCStateWithNext>();
_npc = pcstate._npc;
_nupc = pcstate._nupc;
}
@@ -304,7 +304,7 @@ class PCStateCommon : public PCStateBase
bool
equals(const PCStateBase &other) const override
{
auto &ps = other.as<PCStateCommon>();
auto &ps = other.as<PCStateWithNext>();
return PCStateBase::equals(other) &&
_npc == ps._npc && _nupc == ps._nupc;
}
@@ -335,10 +335,10 @@ class PCStateCommon : public PCStateBase
// The most basic type of PC.
template <int InstWidth>
class SimplePCState : public PCStateCommon
class SimplePCState : public PCStateWithNext
{
protected:
typedef PCStateCommon Base;
typedef PCStateWithNext Base;
public:
SimplePCState(const SimplePCState &other) : Base(other) {}