diff -r 5a29bba93a4b -r 04772aca657c src/cpu/o3/commit.hh --- a/src/cpu/o3/commit.hh Mon Dec 06 16:01:30 2010 -0800 +++ b/src/cpu/o3/commit.hh Mon Dec 06 16:05:36 2010 -0800 @@ -406,6 +406,9 @@ /** The sequence number of the youngest valid instruction in the ROB. */ InstSeqNum youngestSeqNum[Impl::MaxThreads]; + /** The sequence number of the last commited instruction. */ + InstSeqNum lastCommitedSeqNum[Impl::MaxThreads]; + /** Records if there is a trap currently in flight. */ bool trapInFlight[Impl::MaxThreads]; diff -r 5a29bba93a4b -r 04772aca657c src/cpu/o3/commit_impl.hh --- a/src/cpu/o3/commit_impl.hh Mon Dec 06 16:01:30 2010 -0800 +++ b/src/cpu/o3/commit_impl.hh Mon Dec 06 16:05:36 2010 -0800 @@ -141,6 +141,7 @@ trapSquash[tid] = false; tcSquash[tid] = false; pc[tid].set(0); + lastCommitedSeqNum[tid] = 0; } #if FULL_SYSTEM interrupt = NoFault; @@ -498,12 +499,12 @@ // Hopefully this doesn't mess things up. Basically I want to squash // all instructions of this thread. InstSeqNum squashed_inst = rob->isEmpty() ? - 0 : rob->readHeadInst(tid)->seqNum - 1; + lastCommitedSeqNum[tid] : rob->readHeadInst(tid)->seqNum - 1; // All younger instructions will be squashed. Set the sequence // number as the youngest instruction in the ROB (0 in this case. // Hopefully nothing breaks.) - youngestSeqNum[tid] = 0; + youngestSeqNum[tid] = lastCommitedSeqNum[tid]; rob->squash(squashed_inst, tid); changedROBNumEntries[tid] = true; @@ -951,6 +952,9 @@ TheISA::advancePC(pc[tid], head_inst->staticInst); + // Keep track of the last sequence number commited + lastCommitedSeqNum[tid] = head_inst->seqNum; + // If this is an instruction that doesn't play nicely with // others squash everything and restart fetch if (head_inst->isSquashAfter())