Merge ktlim@zizzer:/bk/newmem
[gem5.git] / src / cpu / o3 / rename.hh
index 538dd9bb43340abe5241340022c660228fd72c6c..6b4628f927f23bc1e25c8aae1b2abbe63c331e6a 100644 (file)
@@ -76,6 +76,7 @@ class DefaultRename
     // using a list instead of a queue. (Most other stages use a
     // queue)
     typedef std::list<DynInstPtr> InstQueue;
+    typedef typename std::list<DynInstPtr>::iterator ListIt;
 
   public:
     /** Overall rename status. Used to determine if the CPU can
@@ -158,7 +159,7 @@ class DefaultRename
     void setScoreboard(Scoreboard *_scoreboard);
 
     /** Drains the rename stage. */
-    void drain();
+    bool drain();
 
     /** Resumes execution after a drain. */
     void resume() { }
@@ -170,7 +171,7 @@ class DefaultRename
     void takeOverFrom();
 
     /** Squashes all instructions in a thread. */
-    void squash(unsigned tid);
+    void squash(const InstSeqNum &squash_seq_num, unsigned tid);
 
     /** Ticks rename, which processes all input signals and attempts to rename
      * as many instructions as possible.
@@ -222,7 +223,7 @@ class DefaultRename
     bool unblock(unsigned tid);
 
     /** Executes actual squash, removing squashed instructions. */
-    void doSquash(unsigned tid);
+    void doSquash(const InstSeqNum &squash_seq_num, unsigned tid);
 
     /** Removes a committed instruction's rename history. */
     void removeFromHistory(InstSeqNum inst_seq_num, unsigned tid);
@@ -410,12 +411,22 @@ class DefaultRename
     /** Whether or not rename needs to block this cycle. */
     bool blockThisCycle;
 
+    /** Whether or not rename needs to resume a serialize instruction
+     * after squashing. */
+    bool resumeSerialize;
+
+    /** Whether or not rename needs to resume clearing out the skidbuffer
+     * after squashing. */
+    bool resumeUnblocking;
+
     /** The number of threads active in rename. */
     unsigned numThreads;
 
     /** The maximum skid buffer size. */
     unsigned skidBufferMax;
 
+    PhysRegIndex maxPhysicalRegs;
+
     /** Enum to record the source of a structure full stall.  Can come from
      * either ROB, IQ, LSQ, and it is priortized in that order.
      */