syscall: Resolve conflicts between m5threads and Gabe's recent SE changes.
[gem5.git] / src / arch / sparc / intregfile.hh
index d66d0fcb779c09abdbca4fdee023e1eb1f70a2a3..f669f6b0d85324cd746a97a3b30d6fce21f02fed 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "arch/sparc/isa_traits.hh"
 #include "arch/sparc/types.hh"
+#include "base/bitfield.hh"
 
 #include <string>
 
@@ -41,48 +42,17 @@ class Checkpoint;
 
 namespace SparcISA
 {
-    class RegFile;
-
-    //This function translates integer register file indices into names
-    std::string getIntRegName(RegIndex);
-
     const int NumIntArchRegs = 32;
-    const int NumIntRegs = MaxGL * 8 + NWindows * 16 + NumMicroIntRegs;
+    const int NumIntRegs = (MaxGL + 1) * 8 + NWindows * 16 + NumMicroIntRegs;
 
     class IntRegFile
     {
-      private:
-        friend class RegFile;
       protected:
-        static const int FrameOffsetBits = 3;
-        static const int FrameNumBits = 2;
-
-        static const int RegsPerFrame = 1 << FrameOffsetBits;
-        static const int FrameNumMask =
-                (FrameNumBits == sizeof(int)) ?
-                (unsigned int)(-1) :
-                (1 << FrameNumBits) - 1;
-        static const int FrameOffsetMask =
-                (FrameOffsetBits == sizeof(int)) ?
-                (unsigned int)(-1) :
-                (1 << FrameOffsetBits) - 1;
-
-        IntReg regGlobals[MaxGL+1][RegsPerFrame];
-        IntReg regSegments[2 * NWindows][RegsPerFrame];
         IntReg microRegs[NumMicroIntRegs];
-
-        enum regFrame {Globals, Outputs, Locals, Inputs, NumFrames};
-
-        IntReg * regView[NumFrames];
-
-        static const int RegGlobalOffset = 0;
-        static const int FrameOffset = MaxGL * RegsPerFrame;
-        int offset[NumFrames];
+        IntReg regs[NumIntRegs];
 
       public:
 
-        int flattenIndex(int reg);
-
         void clear();
 
         IntRegFile();
@@ -94,14 +64,6 @@ namespace SparcISA
         void serialize(std::ostream &os);
 
         void unserialize(Checkpoint *cp, const std::string &section);
-
-      protected:
-        //This doesn't effect the actual CWP register.
-        //It's purpose is to adjust the view of the register file
-        //to what it would be if CWP = cwp.
-        void setCWP(int cwp);
-
-        void setGlobals(int gl);
     };
 }