changeset a535b2232c08 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=a535b2232c08
description:
Registers: Move the PCs out of the ISAs and into the CPUs.
diffstat:
15 files changed, 76 insertions(+), 388 deletions(-)
src/arch/alpha/regfile.cc | 4 -
src/arch/alpha/regfile.hh | 44 ---------------
src/arch/arm/regfile/regfile.cc | 14 ----
src/arch/arm/regfile/regfile.hh | 42 +-------------
src/arch/mips/SConscript | 1
src/arch/mips/regfile/regfile.cc | 109 --------------------------------------
src/arch/mips/regfile/regfile.hh | 44 +++++----------
src/arch/sparc/regfile.cc | 50 -----------------
src/arch/sparc/regfile.hh | 26 +--------
src/arch/x86/regfile.cc | 37 ------------
src/arch/x86/regfile.hh | 20 ------
src/cpu/simple_thread.cc | 14 ++++
src/cpu/simple_thread.hh | 43 ++++++++++++--
src/cpu/thread_state.cc | 6 --
src/cpu/thread_state.hh | 10 ---
diffs (truncated from 742 to 300 lines):
diff -r fd0f91f067d2 -r a535b2232c08 src/arch/alpha/regfile.cc
--- a/src/arch/alpha/regfile.cc Wed Jul 08 23:02:21 2009 -0700
+++ b/src/arch/alpha/regfile.cc Wed Jul 08 23:02:21 2009 -0700
@@ -55,8 +55,6 @@
void
RegFile::serialize(EventManager *em, ostream &os)
{
- SERIALIZE_SCALAR(pc);
- SERIALIZE_SCALAR(npc);
#if FULL_SYSTEM
SERIALIZE_SCALAR(intrflag);
#endif
@@ -65,8 +63,6 @@
void
RegFile::unserialize(EventManager *em, Checkpoint *cp, const string §ion)
{
- UNSERIALIZE_SCALAR(pc);
- UNSERIALIZE_SCALAR(npc);
#if FULL_SYSTEM
UNSERIALIZE_SCALAR(intrflag);
#endif
diff -r fd0f91f067d2 -r a535b2232c08 src/arch/alpha/regfile.hh
--- a/src/arch/alpha/regfile.hh Wed Jul 08 23:02:21 2009 -0700
+++ b/src/arch/alpha/regfile.hh Wed Jul 08 23:02:21 2009 -0700
@@ -32,10 +32,6 @@
#define __ARCH_ALPHA_REGFILE_HH__
#include "arch/alpha/isa_traits.hh"
-#include "arch/alpha/miscregfile.hh"
-#include "arch/alpha/types.hh"
-#include "arch/alpha/mt.hh"
-#include "sim/faults.hh"
#include <string>
@@ -51,46 +47,6 @@
extern const int reg_redir[NumIntRegs];
class RegFile {
- protected:
- Addr pc; // program counter
- Addr npc; // next-cycle program counter
- Addr nnpc; // next next-cycle program counter
-
- public:
- Addr
- readPC()
- {
- return pc;
- }
-
- void
- setPC(Addr val)
- {
- pc = val;
- }
-
- Addr
- readNextPC()
- {
- return npc;
- }
-
- void
- setNextPC(Addr val)
- {
- npc = val;
- }
-
- Addr
- readNextNPC()
- {
- return npc + sizeof(MachInst);
- }
-
- void
- setNextNPC(Addr val)
- { }
-
public:
#if FULL_SYSTEM
int intrflag; // interrupt flag
diff -r fd0f91f067d2 -r a535b2232c08 src/arch/arm/regfile/regfile.cc
--- a/src/arch/arm/regfile/regfile.cc Wed Jul 08 23:02:21 2009 -0700
+++ b/src/arch/arm/regfile/regfile.cc Wed Jul 08 23:02:21 2009 -0700
@@ -55,18 +55,4 @@
panic("Copy Misc. Regs Not Implemented Yet\n");
}
-void
-RegFile::serialize(EventManager *em, ostream &os)
-{
- SERIALIZE_SCALAR(npc);
- SERIALIZE_SCALAR(nnpc);
-}
-
-void
-RegFile::unserialize(EventManager *em, Checkpoint *cp, const string §ion)
-{
- UNSERIALIZE_SCALAR(npc);
- UNSERIALIZE_SCALAR(nnpc);
-}
-
} // namespace ArmISA
diff -r fd0f91f067d2 -r a535b2232c08 src/arch/arm/regfile/regfile.hh
--- a/src/arch/arm/regfile/regfile.hh Wed Jul 08 23:02:21 2009 -0700
+++ b/src/arch/arm/regfile/regfile.hh Wed Jul 08 23:02:21 2009 -0700
@@ -99,46 +99,12 @@
void clear()
{}
- protected:
- Addr pc; // program counter
- Addr npc; // next-cycle program counter
- Addr nnpc; // next-next-cycle program counter
-
- public:
- Addr readPC()
- {
- return pc;
- }
-
- void setPC(Addr val)
- {
- pc = val;
- }
-
- Addr readNextPC()
- {
- return npc;
- }
-
- void setNextPC(Addr val)
- {
- npc = val;
- }
-
- Addr readNextNPC()
- {
- return npc + sizeof(MachInst);
- }
-
- void setNextNPC(Addr val)
- {
- //nnpc = val;
- }
-
- void serialize(EventManager *em, std::ostream &os);
+ void serialize(EventManager *em, std::ostream &os)
+ {}
void unserialize(EventManager *em, Checkpoint *cp,
- const std::string §ion);
+ const std::string §ion)
+ {}
};
void copyRegs(ThreadContext *src, ThreadContext *dest);
diff -r fd0f91f067d2 -r a535b2232c08 src/arch/mips/SConscript
--- a/src/arch/mips/SConscript Wed Jul 08 23:02:21 2009 -0700
+++ b/src/arch/mips/SConscript Wed Jul 08 23:02:21 2009 -0700
@@ -36,7 +36,6 @@
Source('faults.cc')
Source('isa.cc')
Source('regfile/misc_regfile.cc')
- Source('regfile/regfile.cc')
Source('tlb.cc')
Source('pagetable.cc')
Source('utility.cc')
diff -r fd0f91f067d2 -r a535b2232c08 src/arch/mips/regfile/regfile.cc
--- a/src/arch/mips/regfile/regfile.cc Wed Jul 08 23:02:21 2009 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2003-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Gabe Black
- * Korey Sewell
- */
-
-#include "arch/mips/regfile/regfile.hh"
-#include "sim/serialize.hh"
-
-using namespace std;
-
-namespace MipsISA
-{
-
-void
-RegFile::clear()
-{
-}
-
-void
-RegFile::reset(std::string core_name, ThreadID num_threads, unsigned num_vpes,
- BaseCPU *_cpu)
-{
-}
-
-void
-RegFile::setShadowSet(int css){
-}
-
-
-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, std::ostream &os)
-{
- SERIALIZE_SCALAR(pc);
- SERIALIZE_SCALAR(npc);
- SERIALIZE_SCALAR(nnpc);
-}
-
-void
-RegFile::unserialize(EventManager *em, Checkpoint *cp,
- const std::string §ion)
-{
- UNSERIALIZE_SCALAR(pc);
- UNSERIALIZE_SCALAR(npc);
- UNSERIALIZE_SCALAR(nnpc);
-}
-
-} // namespace MipsISA
diff -r fd0f91f067d2 -r a535b2232c08 src/arch/mips/regfile/regfile.hh
--- a/src/arch/mips/regfile/regfile.hh Wed Jul 08 23:02:21 2009 -0700
+++ b/src/arch/mips/regfile/regfile.hh Wed Jul 08 23:02:21 2009 -0700
@@ -32,11 +32,10 @@
#ifndef __ARCH_MIPS_REGFILE_REGFILE_HH__
#define __ARCH_MIPS_REGFILE_REGFILE_HH__
-#include "arch/mips/types.hh"
+#include <iostream>
+#include <string>
+
#include "arch/mips/isa_traits.hh"
-//#include "arch/mips/mt.hh"
-//#include "cpu/base.hh"
-#include "sim/faults.hh"
class BaseCPU;
class Checkpoint;
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev