diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-07-08 23:02:21 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-07-08 23:02:21 -0700 |
commit | 43345bff6c4ee2fd5a35760776898eefa690329e (patch) | |
tree | abab8a0c414f7d1053f987530cfcbe0ae4974d03 /src/arch/sparc | |
parent | 1b29f1621d714c6dc0f2ab921f12e9eb1dbfcd46 (diff) | |
download | gem5-43345bff6c4ee2fd5a35760776898eefa690329e.tar.xz |
Registers: Move the PCs out of the ISAs and into the CPUs.
Diffstat (limited to 'src/arch/sparc')
-rw-r--r-- | src/arch/sparc/regfile.cc | 50 | ||||
-rw-r--r-- | src/arch/sparc/regfile.hh | 26 |
2 files changed, 5 insertions, 71 deletions
diff --git a/src/arch/sparc/regfile.cc b/src/arch/sparc/regfile.cc index 574deab6c..28ffc57aa 100644 --- a/src/arch/sparc/regfile.cc +++ b/src/arch/sparc/regfile.cc @@ -33,57 +33,7 @@ #include "arch/sparc/miscregfile.hh" #include "cpu/thread_context.hh" -class Checkpoint; - using namespace SparcISA; -using namespace std; - -//RegFile class methods -Addr RegFile::readPC() -{ - return pc; -} - -void RegFile::setPC(Addr val) -{ - pc = val; -} - -Addr RegFile::readNextPC() -{ - return npc; -} - -void RegFile::setNextPC(Addr val) -{ - npc = val; -} - -Addr RegFile::readNextNPC() -{ - return nnpc; -} - -void RegFile::setNextNPC(Addr val) -{ - nnpc = val; -} - -void -RegFile::serialize(EventManager *em, ostream &os) -{ - SERIALIZE_SCALAR(pc); - SERIALIZE_SCALAR(npc); - SERIALIZE_SCALAR(nnpc); -} - -void -RegFile::unserialize(EventManager *em, Checkpoint *cp, const string §ion) -{ - UNSERIALIZE_SCALAR(pc); - UNSERIALIZE_SCALAR(npc); - UNSERIALIZE_SCALAR(nnpc); -} void SparcISA::copyMiscRegs(ThreadContext *src, ThreadContext *dest) { diff --git a/src/arch/sparc/regfile.hh b/src/arch/sparc/regfile.hh index b468d568b..b0c2aabbd 100644 --- a/src/arch/sparc/regfile.hh +++ b/src/arch/sparc/regfile.hh @@ -32,12 +32,11 @@ #ifndef __ARCH_SPARC_REGFILE_HH__ #define __ARCH_SPARC_REGFILE_HH__ +#include <iostream> #include <string> #include "arch/sparc/miscregfile.hh" #include "arch/sparc/sparc_traits.hh" -#include "base/types.hh" -#include "sim/serialize.hh" class Checkpoint; class EventManager; @@ -50,31 +49,16 @@ namespace SparcISA class RegFile { - protected: - Addr pc; // Program Counter - Addr npc; // Next Program Counter - Addr nnpc; - - public: - Addr readPC(); - void setPC(Addr val); - - Addr readNextPC(); - void setNextPC(Addr val); - - Addr readNextNPC(); - void setNextNPC(Addr val); - public: void clear() {} - void serialize(EventManager *em, std::ostream &os); + void serialize(EventManager *em, std::ostream &os) + {} void unserialize(EventManager *em, Checkpoint *cp, - const std::string §ion); - - public: + const std::string §ion) + {} }; void copyRegs(ThreadContext *src, ThreadContext *dest); |