From a70a83155bfe4c3877894c29f9dea720beb40f9c Mon Sep 17 00:00:00 2001 From: Brandon Potter Date: Wed, 22 Apr 2015 07:52:03 -0700 Subject: cpu: remove conditional check (count > 0) on o3 IQ squashes The o3 cpu instruction queue model uses the count variable to track the number of unissued instructions in the queue. Previously, the squash method used this variable to avoid executing the doSquash method when there were no unissued instructions in the pipeline. A corner case problem exists when only issued instructions exist in the pipeline and a squash occurs; the doSquash code is not invoked and subsequently does not clean up state properly. --- src/cpu/o3/inst_queue_impl.hh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/cpu/o3/inst_queue_impl.hh') diff --git a/src/cpu/o3/inst_queue_impl.hh b/src/cpu/o3/inst_queue_impl.hh index 33e523f4d..fa621ffbf 100644 --- a/src/cpu/o3/inst_queue_impl.hh +++ b/src/cpu/o3/inst_queue_impl.hh @@ -1164,10 +1164,7 @@ InstructionQueue::squash(ThreadID tid) // time buffer. squashedSeqNum[tid] = fromCommit->commitInfo[tid].doneSeqNum; - // Call doSquash if there are insts in the IQ - if (count[tid] > 0) { - doSquash(tid); - } + doSquash(tid); // Also tell the memory dependence unit to squash. memDepUnit[tid].squash(squashedSeqNum[tid], tid); -- cgit v1.2.3