Get rid of old RegContext code.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 13 Oct 2008 00:57:46 +0000 (17:57 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 13 Oct 2008 00:57:46 +0000 (17:57 -0700)
17 files changed:
src/arch/alpha/regfile.hh
src/arch/alpha/types.hh
src/arch/mips/regfile.cc
src/arch/mips/regfile/regfile.hh
src/arch/mips/types.hh
src/arch/sparc/miscregfile.cc
src/arch/sparc/regfile.cc
src/arch/sparc/regfile.hh
src/arch/sparc/types.hh
src/arch/x86/regfile.cc
src/arch/x86/regfile.hh
src/arch/x86/types.hh
src/cpu/checker/thread_context.hh
src/cpu/o3/thread_context.hh
src/cpu/ozone/cpu.hh
src/cpu/simple_thread.hh
src/cpu/thread_context.hh

index d6d2f587e65231a5cadbdc3e735a388b4d0ea07a..e431e75700c62bb26db589709398407fff3dd8e0 100644 (file)
@@ -206,13 +206,6 @@ class RegFile {
     void serialize(EventManager *em, std::ostream &os);
     void unserialize(EventManager *em, Checkpoint *cp,
         const std::string &section);
-
-    void
-    changeContext(RegContextParam param, RegContextVal val)
-    {
-        //This would be an alternative place to call/implement
-        //the swapPALShadow function
-    }
 };
 
 static inline int
index 94a4cb0e926797c6447f41b46405e62beb44f316..7905114b8b2f6c96d6ea95e93f7f2b7bf5ba3faf 100644 (file)
@@ -57,13 +57,6 @@ union AnyReg
     MiscReg ctrlreg;
 };
 
-enum RegContextParam
-{
-    CONTEXT_PALMODE
-};
-
-typedef bool RegContextVal;
-
 enum annotes
 {
     ANNOTE_NONE = 0,
index 0c670af6db2840a2b47aeed6bc9e575f47be6207..e05bfe2dfa7e1f189979550c1ae84bd86965fa11 100644 (file)
@@ -188,12 +188,6 @@ RegFile::unserialize(Checkpoint *cp, const std::string &section)
 
 }
 
-
-void RegFile::changeContext(RegContextParam param, RegContextVal val)
-{
-    panic("Change Context Not Implemented for MipsISA");
-}
-
 static inline int flattenIntIndex(ThreadContext * tc, int reg)
 {
     return reg;
index 076cf45f5c51f7821e3cb366ecd592fd969b67ad..ebf793396d0ec81af6effd5411005978bfcbdaba 100644 (file)
@@ -104,10 +104,6 @@ namespace MipsISA
         void unserialize(EventManager *em, Checkpoint *cp,
             const std::string &section);
 
-        void changeContext(RegContextParam param, RegContextVal val)
-        {
-        }
-
     };
 
 } // namespace MipsISA
index 4208cb2d8d1f627069d7904febf6a7f5685668a9..b459d9e146d03cbc4c605c6c9cd46aa97fd4b409 100644 (file)
@@ -60,9 +60,6 @@ namespace MipsISA
         MiscReg  ctrlreg;
     } AnyReg;
 
-    typedef int RegContextParam;
-    typedef int RegContextVal;
-
     //used in FP convert & round function
     enum ConvertType{
         SINGLE_TO_DOUBLE,
index d66cefa7a57dd7881f4daea1d485d6a74e276dc9..b0c5dbda99d65f1a1f72f34ff21e2bb6c2899494 100644 (file)
@@ -551,11 +551,8 @@ void MiscRegFile::setReg(int miscReg,
         new_val = val >= NWindows ? NWindows - 1 : val;
         if (val >= NWindows)
             new_val = NWindows - 1;
-
-        tc->changeRegFileContext(CONTEXT_CWP, new_val);
         break;
       case MISCREG_GL:
-        tc->changeRegFileContext(CONTEXT_GLOBALS, val);
         break;
       case MISCREG_PIL:
       case MISCREG_SOFTINT:
index 8815b094ccc732d54bee91789eafa777ed099dc0..f390be508fd00697e48e4eb86edf0e876b80ac47 100644 (file)
@@ -241,21 +241,6 @@ RegFile::unserialize(EventManager *em, Checkpoint *cp, const string &section)
     UNSERIALIZE_SCALAR(nnpc);
 }
 
-void RegFile::changeContext(RegContextParam param, RegContextVal val)
-{
-    switch(param)
-    {
-      case CONTEXT_CWP:
-        intRegFile.setCWP(val);
-        break;
-      case CONTEXT_GLOBALS:
-        intRegFile.setGlobals(val);
-        break;
-      default:
-        panic("Tried to set illegal context parameter in the SPARC regfile.\n");
-    }
-}
-
 void SparcISA::copyMiscRegs(ThreadContext *src, ThreadContext *dest)
 {
 
index da7e022e9c3cc6c3f6c38757c92572613287f711..dd4e1f684992a41671ab588c31d0255e152236fc 100644 (file)
@@ -117,8 +117,6 @@ namespace SparcISA
             const std::string &section);
 
       public:
-
-        void changeContext(RegContextParam param, RegContextVal val);
     };
 
     int flattenIntIndex(ThreadContext * tc, int reg);
index d19e2a99f5519481e2cbbae79360d7a6b5e52c4c..dd369cc265d2dfbcb585f45757d2b9e7628d48eb 100644 (file)
@@ -51,14 +51,6 @@ namespace SparcISA
         MiscReg ctrlreg;
     } AnyReg;
 
-    enum RegContextParam
-    {
-        CONTEXT_CWP,
-        CONTEXT_GLOBALS
-    };
-
-    typedef int RegContextVal;
-
     typedef uint16_t RegIndex;
 
     struct CoreSpecific {
index 78fde7474f1a943c056a3a7409a059f06ed6f1c6..7d01c4bb4e147e62ad742ae676038b47da7c5bed 100644 (file)
@@ -248,11 +248,6 @@ RegFile::unserialize(EventManager *em, Checkpoint *cp, const string &section)
     UNSERIALIZE_SCALAR(nextRip);
 }
 
-void RegFile::changeContext(RegContextParam param, RegContextVal val)
-{
-    panic("changeContext not implemented for x86!\n");
-}
-
 void X86ISA::copyMiscRegs(ThreadContext *src, ThreadContext *dest)
 {
     panic("copyMiscRegs not implemented for x86!\n");
index 3c238734686948344d784ded3096f54f3b8f598e..75c0290d3baeeff6c3070ca822db1c358d588538 100644 (file)
@@ -145,8 +145,6 @@ namespace X86ISA
             const std::string &section);
 
       public:
-
-        void changeContext(RegContextParam param, RegContextVal val);
     };
 
     int flattenIntIndex(ThreadContext * tc, int reg);
index 90df38d1393710e571cc0e58c657925e3e63589c..29420352b2f1c821a0bc4c1741c00b92cd095347 100644 (file)
@@ -246,17 +246,6 @@ namespace X86ISA
         MiscReg ctrlReg;
     } AnyReg;
 
-    //XXX This is very hypothetical. X87 instructions would need to
-    //change their "context" constantly. It's also not clear how
-    //this would be handled as far as out of order execution.
-    //Maybe x87 instructions are in order?
-    enum RegContextParam
-    {
-        CONTEXT_X87_TOP
-    };
-
-    typedef int RegContextVal;
-
     typedef uint16_t RegIndex;
 
     struct CoreSpecific {
index 4ede74c646da25f8f4e97039b18eab175643ee32..75ac959db39ff2bed2a91668891038acd3bb5f67 100644 (file)
@@ -294,12 +294,6 @@ class CheckerThreadContext : public ThreadContext
 
     Counter readFuncExeInst() { return actualTC->readFuncExeInst(); }
 #endif
-    void changeRegFileContext(TheISA::RegContextParam param,
-            TheISA::RegContextVal val)
-    {
-        actualTC->changeRegFileContext(param, val);
-        checkerTC->changeRegFileContext(param, val);
-    }
 };
 
 #endif // __CPU_CHECKER_EXEC_CONTEXT_HH__
index d92f85317d6588844da54ff72093c527faf47f67..c529b002b894d39b8e925058fc919b087fda6cc8 100755 (executable)
@@ -281,15 +281,6 @@ class O3ThreadContext : public ThreadContext
         this->cpu->setNextNPC(val, this->thread->readTid());
     }
 
-    virtual void changeRegFileContext(TheISA::RegContextParam param,
-                                      TheISA::RegContextVal val)
-    {
-#if THE_ISA != SPARC_ISA
-        panic("changeRegFileContext not implemented.");
-#endif
-    }
-
-
     /** This function exits the thread context in the CPU and returns
      * 1 if the CPU has no more active threads (meaning it's OK to exit);
      * Used in syscall-emulation mode when a thread executes the 'exit'
index aeafb603aca5626185fc4c2d5397f8e8fae7335e..ee5e9e6683078092c0d0490554939ef9fc56dc7e 100644 (file)
@@ -271,9 +271,6 @@ class OzoneCPU : public BaseCPU
         void setFuncExeInst(Counter new_val)
         { thread->funcExeInst = new_val; }
 #endif
-        void changeRegFileContext(TheISA::RegContextParam param,
-                                          TheISA::RegContextVal val)
-        { panic("Not supported on Alpha!"); }
     };
 
     // Ozone specific thread context
index 69d7b2548257eae90bcda32d4cb5b14ba9b65d97..d26e984a3e4419edae840b1fcab5ead919688f0d 100644 (file)
@@ -405,12 +405,6 @@ class SimpleThread : public ThreadState
         process->syscall(callnum, tc);
     }
 #endif
-
-    void changeRegFileContext(TheISA::RegContextParam param,
-            TheISA::RegContextVal val)
-    {
-        regs.changeContext(param, val);
-    }
 };
 
 
index 9dffbd8c658a256e1db9fe6a727a179c54c4ca6f..2b9f41b70141686619899ad5aabebf6ac3e7d1fc 100644 (file)
@@ -272,9 +272,6 @@ class ThreadContext
     virtual int exit() { return 1; };
 #endif
 
-    virtual void changeRegFileContext(TheISA::RegContextParam param,
-            TheISA::RegContextVal val) = 0;
-
     /** function to compare two thread contexts (for debugging) */
     static void compare(ThreadContext *one, ThreadContext *two);
 };
@@ -467,12 +464,6 @@ class ProxyThreadContext : public ThreadContext
 
     Counter readFuncExeInst() { return actualTC->readFuncExeInst(); }
 #endif
-
-    void changeRegFileContext(TheISA::RegContextParam param,
-            TheISA::RegContextVal val)
-    {
-        actualTC->changeRegFileContext(param, val);
-    }
 };
 
 #endif