diff options
Diffstat (limited to 'src/arch/mips')
-rw-r--r-- | src/arch/mips/SConscript | 1 | ||||
-rw-r--r-- | src/arch/mips/regfile.cc | 14 | ||||
-rw-r--r-- | src/arch/mips/regfile/int_regfile.cc | 103 | ||||
-rw-r--r-- | src/arch/mips/regfile/int_regfile.hh | 17 | ||||
-rw-r--r-- | src/arch/mips/regfile/regfile.cc | 17 | ||||
-rw-r--r-- | src/arch/mips/regfile/regfile.hh | 5 |
6 files changed, 0 insertions, 157 deletions
diff --git a/src/arch/mips/SConscript b/src/arch/mips/SConscript index dbbdf72b3..0b5f10611 100644 --- a/src/arch/mips/SConscript +++ b/src/arch/mips/SConscript @@ -35,7 +35,6 @@ Import('*') if env['TARGET_ISA'] == 'mips': Source('faults.cc') Source('isa.cc') - Source('regfile/int_regfile.cc') Source('regfile/misc_regfile.cc') Source('regfile/regfile.cc') Source('tlb.cc') diff --git a/src/arch/mips/regfile.cc b/src/arch/mips/regfile.cc index 2fb53cd4c..760f7e028 100644 --- a/src/arch/mips/regfile.cc +++ b/src/arch/mips/regfile.cc @@ -48,7 +48,6 @@ using namespace MipsISA; void RegFile::clear() { - intRegFile.clear(); miscRegFile.clear(); } @@ -56,20 +55,9 @@ void RegFile::reset(std::string core_name, ThreadID num_threads, unsigned num_vpes) { - bzero(&intRegFile, sizeof(intRegFile)); miscRegFile.reset(core_name, num_threads, num_vpes); } -IntReg RegFile::readIntReg(int intReg) -{ - return intRegFile.readReg(intReg); -} - -Fault RegFile::setIntReg(int intReg, const IntReg &val) -{ - return intRegFile.setReg(intReg, val); -} - MiscReg RegFile::readMiscRegNoEffect(int miscReg, ThreadID tid = 0) { @@ -128,7 +116,6 @@ void RegFile::setNextNPC(Addr val) void RegFile::serialize(std::ostream &os) { - intRegFile.serialize(os); miscRegFile.serialize(os); SERIALIZE_SCALAR(pc); @@ -140,7 +127,6 @@ RegFile::serialize(std::ostream &os) void RegFile::unserialize(Checkpoint *cp, const std::string §ion) { - intRegFile.unserialize(cp, section); miscRegFile.unserialize(cp, section); UNSERIALIZE_SCALAR(pc); UNSERIALIZE_SCALAR(npc); diff --git a/src/arch/mips/regfile/int_regfile.cc b/src/arch/mips/regfile/int_regfile.cc deleted file mode 100644 index 88de4be94..000000000 --- a/src/arch/mips/regfile/int_regfile.cc +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2003-2005 The Regents of The University of Michigan - * Copyright (c) 2007 MIPS Technologies, Inc. - * 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 - * Jaidev Patwardhan - */ - -#include "arch/mips/regfile/int_regfile.hh" -#include "sim/serialize.hh" - -using namespace MipsISA; -using namespace std; - -void -IntRegFile::clear() -{ - bzero(®s, sizeof(regs)); - currShadowSet=0; -} - -int -IntRegFile::readShadowSet() -{ - return currShadowSet; -} - -void -IntRegFile::setShadowSet(int css) -{ - DPRINTF(MipsPRA, "Setting Shadow Set to :%d (%s)\n", css, currShadowSet); - currShadowSet = css; -} - -IntReg -IntRegFile::readReg(int intReg) -{ - if (intReg < NumIntArchRegs) { - // Regular GPR Read - DPRINTF(MipsPRA, "Reading Reg: %d, CurrShadowSet: %d\n", intReg, - currShadowSet); - - return regs[intReg + NumIntArchRegs * currShadowSet]; - } else { - unsigned special_reg_num = intReg - NumIntArchRegs; - - // Read A Special Reg - return regs[TotalArchRegs + special_reg_num]; - } -} - -Fault -IntRegFile::setReg(int intReg, const IntReg &val) -{ - if (intReg != ZeroReg) { - if (intReg < NumIntArchRegs) { - regs[intReg + NumIntArchRegs * currShadowSet] = val; - } else { - unsigned special_reg_num = intReg - NumIntArchRegs; - - regs[TotalArchRegs + special_reg_num] = val; - } - } - - return NoFault; -} - -void -IntRegFile::serialize(std::ostream &os) -{ - SERIALIZE_ARRAY(regs, NumIntRegs); -} - -void -IntRegFile::unserialize(Checkpoint *cp, const std::string §ion) -{ - UNSERIALIZE_ARRAY(regs, NumIntRegs); -} diff --git a/src/arch/mips/regfile/int_regfile.hh b/src/arch/mips/regfile/int_regfile.hh index 3c7c8c64c..a2c5169aa 100644 --- a/src/arch/mips/regfile/int_regfile.hh +++ b/src/arch/mips/regfile/int_regfile.hh @@ -65,23 +65,6 @@ namespace MipsISA //TotalArchRegs = NumIntArchRegs * ShadowSets const int TotalArchRegs = NumIntArchRegs; - class IntRegFile - { - protected: - IntReg regs[NumIntRegs]; - int currShadowSet; - public: - void clear(); - int readShadowSet(); - void setShadowSet(int css); - IntReg readReg(int intReg); - Fault setReg(int intReg, const IntReg &val); - - void serialize(std::ostream &os); - void unserialize(Checkpoint *cp, const std::string §ion); - - }; - } // namespace MipsISA #endif diff --git a/src/arch/mips/regfile/regfile.cc b/src/arch/mips/regfile/regfile.cc index eeec02ee4..a19962ff3 100644 --- a/src/arch/mips/regfile/regfile.cc +++ b/src/arch/mips/regfile/regfile.cc @@ -40,31 +40,16 @@ namespace MipsISA void RegFile::clear() { - intRegFile.clear(); } void RegFile::reset(std::string core_name, ThreadID num_threads, unsigned num_vpes, BaseCPU *_cpu) { - bzero(&intRegFile, sizeof(intRegFile)); -} - -IntReg -RegFile::readIntReg(int intReg) -{ - return intRegFile.readReg(intReg); -} - -Fault -RegFile::setIntReg(int intReg, const IntReg &val) -{ - return intRegFile.setReg(intReg, val); } void RegFile::setShadowSet(int css){ - intRegFile.setShadowSet(css); } @@ -107,7 +92,6 @@ RegFile::setNextNPC(Addr val) void RegFile::serialize(EventManager *em, std::ostream &os) { - intRegFile.serialize(os); SERIALIZE_SCALAR(pc); SERIALIZE_SCALAR(npc); SERIALIZE_SCALAR(nnpc); @@ -117,7 +101,6 @@ void RegFile::unserialize(EventManager *em, Checkpoint *cp, const std::string §ion) { - intRegFile.unserialize(cp, section); UNSERIALIZE_SCALAR(pc); UNSERIALIZE_SCALAR(npc); UNSERIALIZE_SCALAR(nnpc); diff --git a/src/arch/mips/regfile/regfile.hh b/src/arch/mips/regfile/regfile.hh index 105891bb9..061b4a07d 100644 --- a/src/arch/mips/regfile/regfile.hh +++ b/src/arch/mips/regfile/regfile.hh @@ -79,16 +79,11 @@ namespace MipsISA // used to implement branch delay slot // not real register - IntRegFile intRegFile; // (signed) integer register file - public: void clear(); void reset(std::string core_name, ThreadID num_threads, unsigned num_vpes, BaseCPU *_cpu); - IntReg readIntReg(int intReg); - Fault setIntReg(int intReg, const IntReg &val); - void setShadowSet(int css); public: |