CPU: Get rid of the now unnecessary getInst/setInst family of functions.
[gem5.git] / src / cpu / ozone / cpu_impl.hh
index aa76c8aa6642c2404dee39ead7db31b3006f8dca..08da1724bbc737d13c598c136cee90a11ce2854f 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "arch/isa_traits.hh" // For MachInst
 #include "base/trace.hh"
+#include "config/the_isa.hh"
 #include "cpu/base.hh"
 #include "cpu/simple_thread.hh"
 #include "cpu/thread_context.hh"
@@ -131,7 +132,6 @@ OzoneCPU<Impl>::OzoneCPU(Params *p)
 
     thread.inSyscall = false;
 
-    thread.setStatus(ThreadContext::Suspended);
     itb = p->itb;
     dtb = p->dtb;
 #if FULL_SYSTEM
@@ -489,7 +489,7 @@ OzoneCPU<Impl>::copySrcTranslate(Addr src)
     return NoFault;
 #if 0
     static bool no_warn = true;
-    int blk_size = (dcacheInterface) ? dcacheInterface->getBlockSize() : 64;
+    unsigned blk_size = dcacheInterface ? dcacheInterface->getBlockSize() : 64;
     // Only support block sizes of 64 atm.
     assert(blk_size == 64);
     int offset = src & (blk_size - 1);
@@ -528,7 +528,7 @@ OzoneCPU<Impl>::copy(Addr dest)
     return NoFault;
 #if 0
     static bool no_warn = true;
-    int blk_size = (dcacheInterface) ? dcacheInterface->getBlockSize() : 64;
+    unsigned blk_size = dcacheInterface ? dcacheInterface->getBlockSize() : 64;
     // Only support block sizes of 64 atm.
     assert(blk_size == 64);
     uint8_t data[blk_size];
@@ -737,14 +737,6 @@ OzoneCPU<Impl>::OzoneTC::suspend()
     cpu->suspendContext(thread->threadId());
 }
 
-/// Set the status to Unallocated.
-template <class Impl>
-void
-OzoneCPU<Impl>::OzoneTC::deallocate(int delay)
-{
-    cpu->deallocateContext(thread->threadId(), delay);
-}
-
 /// Set the status to Halted.
 template <class Impl>
 void
@@ -779,7 +771,6 @@ OzoneCPU<Impl>::OzoneTC::takeOverFrom(ThreadContext *old_context)
     setCpuId(old_context->cpuId());
     setContextId(old_context->contextId());
 
-    thread->setInst(old_context->getInst());
 #if !FULL_SYSTEM
     setFuncExeInst(old_context->readFuncExeInst());
 #else
@@ -799,7 +790,7 @@ OzoneCPU<Impl>::OzoneTC::takeOverFrom(ThreadContext *old_context)
     cpu->lockFlag = false;
 #endif
 
-    old_context->setStatus(ThreadContext::Unallocated);
+    old_context->setStatus(ThreadContext::Halted);
 }
 
 template <class Impl>
@@ -870,13 +861,6 @@ OzoneCPU<Impl>::OzoneTC::threadId()
     return thread->threadId();
 }
 
-template <class Impl>
-TheISA::MachInst
-OzoneCPU<Impl>::OzoneTC::getInst()
-{
-    return thread->getInst();
-}
-
 template <class Impl>
 void
 OzoneCPU<Impl>::OzoneTC::copyArchRegs(ThreadContext *tc)
@@ -926,22 +910,6 @@ OzoneCPU<Impl>::OzoneTC::readIntReg(int reg_idx)
     return thread->renameTable[reg_idx]->readIntResult();
 }
 
-template <class Impl>
-TheISA::FloatReg
-OzoneCPU<Impl>::OzoneTC::readFloatReg(int reg_idx, int width)
-{
-    int idx = reg_idx + TheISA::FP_Base_DepTag;
-    switch(width) {
-      case 32:
-        return thread->renameTable[idx]->readFloatResult();
-      case 64:
-        return thread->renameTable[idx]->readDoubleResult();
-      default:
-        panic("Unsupported width!");
-        return 0;
-    }
-}
-
 template <class Impl>
 double
 OzoneCPU<Impl>::OzoneTC::readFloatReg(int reg_idx)
@@ -950,14 +918,6 @@ OzoneCPU<Impl>::OzoneTC::readFloatReg(int reg_idx)
     return thread->renameTable[idx]->readFloatResult();
 }
 
-template <class Impl>
-uint64_t
-OzoneCPU<Impl>::OzoneTC::readFloatRegBits(int reg_idx, int width)
-{
-    int idx = reg_idx + TheISA::FP_Base_DepTag;
-    return thread->renameTable[idx]->readIntResult();
-}
-
 template <class Impl>
 uint64_t
 OzoneCPU<Impl>::OzoneTC::readFloatRegBits(int reg_idx)
@@ -977,27 +937,6 @@ OzoneCPU<Impl>::OzoneTC::setIntReg(int reg_idx, uint64_t val)
     }
 }
 
-template <class Impl>
-void
-OzoneCPU<Impl>::OzoneTC::setFloatReg(int reg_idx, FloatReg val, int width)
-{
-    int idx = reg_idx + TheISA::FP_Base_DepTag;
-    switch(width) {
-      case 32:
-        panic("Unimplemented!");
-        break;
-      case 64:
-        thread->renameTable[idx]->setDoubleResult(val);
-        break;
-      default:
-        panic("Unsupported width!");
-    }
-
-    if (!thread->inSyscall) {
-        cpu->squashFromTC();
-    }
-}
-
 template <class Impl>
 void
 OzoneCPU<Impl>::OzoneTC::setFloatReg(int reg_idx, FloatReg val)
@@ -1011,14 +950,6 @@ OzoneCPU<Impl>::OzoneTC::setFloatReg(int reg_idx, FloatReg val)
     }
 }
 
-template <class Impl>
-void
-OzoneCPU<Impl>::OzoneTC::setFloatRegBits(int reg_idx, FloatRegBits val,
-                                         int width)
-{
-    panic("Unimplemented!");
-}
-
 template <class Impl>
 void
 OzoneCPU<Impl>::OzoneTC::setFloatRegBits(int reg_idx, FloatRegBits val)