From 0cb180ea0dcece9157ad71b4136d557c2dbcf209 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 8 Jul 2009 23:02:20 -0700 Subject: Registers: Eliminate the ISA defined floating point register file. --- src/arch/alpha/SConscript | 1 - src/arch/alpha/floatregfile.cc | 57 ---------------------------- src/arch/alpha/floatregfile.hh | 86 ------------------------------------------ src/arch/alpha/regfile.cc | 2 - src/arch/alpha/regfile.hh | 27 ------------- 5 files changed, 173 deletions(-) delete mode 100644 src/arch/alpha/floatregfile.cc delete mode 100644 src/arch/alpha/floatregfile.hh (limited to 'src/arch/alpha') diff --git a/src/arch/alpha/SConscript b/src/arch/alpha/SConscript index b10885e01..258327247 100644 --- a/src/arch/alpha/SConscript +++ b/src/arch/alpha/SConscript @@ -34,7 +34,6 @@ Import('*') if env['TARGET_ISA'] == 'alpha': Source('ev5.cc') Source('faults.cc') - Source('floatregfile.cc') Source('intregfile.cc') Source('ipr.cc') Source('isa.cc') diff --git a/src/arch/alpha/floatregfile.cc b/src/arch/alpha/floatregfile.cc deleted file mode 100644 index 192b0f1d4..000000000 --- a/src/arch/alpha/floatregfile.cc +++ /dev/null @@ -1,57 +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: Steve Reinhardt - * Gabe Black - * Kevin Lim - */ - -#include - -#include "arch/alpha/floatregfile.hh" -#include "sim/serialize.hh" - -namespace AlphaISA { -void -FloatRegFile::clear() -{ - std::memset(d, 0, sizeof(d)); -} - -void -FloatRegFile::serialize(std::ostream &os) -{ - SERIALIZE_ARRAY(q, NumFloatRegs); -} - -void -FloatRegFile::unserialize(Checkpoint *cp, const std::string §ion) -{ - UNSERIALIZE_ARRAY(q, NumFloatRegs); -} - -} // namespace AlphaISA diff --git a/src/arch/alpha/floatregfile.hh b/src/arch/alpha/floatregfile.hh deleted file mode 100644 index eb8a92d89..000000000 --- a/src/arch/alpha/floatregfile.hh +++ /dev/null @@ -1,86 +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: Steve Reinhardt - * Gabe Black - */ - -#ifndef __ARCH_ALPHA_FLOATREGFILE_HH__ -#define __ARCH_ALPHA_FLOATREGFILE_HH__ - -#include -#include - -#include "arch/alpha/isa_traits.hh" -#include "arch/alpha/types.hh" - -class Checkpoint; - -namespace AlphaISA { - -class FloatRegFile -{ - public: - union { - uint64_t q[NumFloatRegs]; // integer qword view - double d[NumFloatRegs]; // double-precision floating point view - }; - - void clear(); - - void serialize(std::ostream &os); - void unserialize(Checkpoint *cp, const std::string §ion); - - FloatReg - readReg(int floatReg) - { - return d[floatReg]; - } - - FloatRegBits - readRegBits(int floatReg) - { - return q[floatReg]; - } - - void - setReg(int floatReg, const FloatReg &val) - { - d[floatReg] = val; - } - - void - setRegBits(int floatReg, const FloatRegBits &val) - { - q[floatReg] = val; - } - -}; - -} // namespace AlphaISA - -#endif // __ARCH_ALPHA_FLOATREGFILE_HH__ diff --git a/src/arch/alpha/regfile.cc b/src/arch/alpha/regfile.cc index 9009381b8..df345278a 100644 --- a/src/arch/alpha/regfile.cc +++ b/src/arch/alpha/regfile.cc @@ -42,7 +42,6 @@ void RegFile::serialize(EventManager *em, ostream &os) { intRegFile.serialize(os); - floatRegFile.serialize(os); SERIALIZE_SCALAR(pc); SERIALIZE_SCALAR(npc); #if FULL_SYSTEM @@ -54,7 +53,6 @@ void RegFile::unserialize(EventManager *em, Checkpoint *cp, const string §ion) { intRegFile.unserialize(cp, section); - floatRegFile.unserialize(cp, section); UNSERIALIZE_SCALAR(pc); UNSERIALIZE_SCALAR(npc); #if FULL_SYSTEM diff --git a/src/arch/alpha/regfile.hh b/src/arch/alpha/regfile.hh index 0a39a94a9..000bea259 100644 --- a/src/arch/alpha/regfile.hh +++ b/src/arch/alpha/regfile.hh @@ -32,7 +32,6 @@ #define __ARCH_ALPHA_REGFILE_HH__ #include "arch/alpha/isa_traits.hh" -#include "arch/alpha/floatregfile.hh" #include "arch/alpha/intregfile.hh" #include "arch/alpha/miscregfile.hh" #include "arch/alpha/types.hh" @@ -92,7 +91,6 @@ class RegFile { protected: IntRegFile intRegFile; // (signed) integer register file - FloatRegFile floatRegFile; // floating point register file public: #if FULL_SYSTEM @@ -103,31 +101,6 @@ class RegFile { clear() { intRegFile.clear(); - floatRegFile.clear(); - } - - FloatReg - readFloatReg(int floatReg) - { - return floatRegFile.d[floatReg]; - } - - FloatRegBits - readFloatRegBits(int floatReg) - { - return floatRegFile.q[floatReg]; - } - - void - setFloatReg(int floatReg, const FloatReg &val) - { - floatRegFile.d[floatReg] = val; - } - - void - setFloatRegBits(int floatReg, const FloatRegBits &val) - { - floatRegFile.q[floatReg] = val; } IntReg -- cgit v1.2.3