Fix offset in removeThread() function so that float registers start freeing up
authorKorey Sewell <ksewell@umich.edu>
Wed, 27 Feb 2008 21:48:33 +0000 (16:48 -0500)
committerKorey Sewell <ksewell@umich.edu>
Wed, 27 Feb 2008 21:48:33 +0000 (16:48 -0500)
from the right point (#32 usually) instead of restarting at 0 and double-freeing.

Commented out assert line in free_list.hh that will check for when double-free condition
goes bad.

--HG--
extra : convert_revision : 08d5f9b6a874736e487d101e85c22aaa67bf59ae

src/cpu/o3/cpu.cc
src/cpu/o3/free_list.hh

index 8eb17d23b792a0f3fab7b9856433bcf96fe7e7b1..ff1ee792077b41794094da1d4ad25aa96bfb449c 100644 (file)
@@ -682,7 +682,7 @@ FullO3CPU<Impl>::removeThread(unsigned tid)
     }
 
     // Unbind Float Regs from Rename Map
-    for (int freg = 0; freg < TheISA::NumFloatRegs; freg++) {
+    for (int freg = TheISA::NumIntRegs; freg < TheISA::NumFloatRegs; freg++) {
         PhysRegIndex phys_reg = renameMap[tid].lookup(freg);
 
         scoreboard.unsetReg(phys_reg);
@@ -695,8 +695,11 @@ FullO3CPU<Impl>::removeThread(unsigned tid)
     decode.squash(tid);
     rename.squash(squash_seq_num, tid);
     iew.squash(tid);
+    //iew.ldstQueue.squash(squash_seq_num, tid);
     commit.rob->squash(squash_seq_num, tid);
 
+
+    assert(iew.instQueue.getCount(tid) == 0);
     assert(iew.ldstQueue.getCount(tid) == 0);
 
     // Reset ROB/IQ/LSQ Entries
index 42fc0c533a94d7ab7ea400edd78b47b83cb5483e..d05068800a76fb34b92cda0b2543cccf38a2f53a 100644 (file)
@@ -173,6 +173,8 @@ SimpleFreeList::addReg(PhysRegIndex freed_reg)
 #endif
             freeFloatRegs.push(freed_reg);
     }
+
+    //assert(freeIntRegs.size() <= numPhysicalIntRegs);
 }
 
 inline void