diff -r 75a971988f86 -r 2864c2179550 src/cpu/o3/fetch_impl.hh --- a/src/cpu/o3/fetch_impl.hh Thu Jul 29 16:27:53 2010 +0100 +++ b/src/cpu/o3/fetch_impl.hh Thu Jul 29 17:27:55 2010 +0100 @@ -1380,19 +1380,22 @@ ThreadID DefaultFetch::iqCount() { - std::priority_queue PQ; + std::priority_queue PQ; + std::map threadMap; list::iterator threads = activeThreads->begin(); list::iterator end = activeThreads->end(); while (threads != end) { ThreadID tid = *threads++; + unsigned iqCount = fromIEW->iewInfo[tid].iqCount; - PQ.push(fromIEW->iewInfo[tid].iqCount); + PQ.push(iqCount); + threadMap[iqCount] = tid; } while (!PQ.empty()) { - ThreadID high_pri = PQ.top(); + ThreadID high_pri = threadMap[PQ.top()]; if (fetchStatus[high_pri] == Running || fetchStatus[high_pri] == IcacheAccessComplete || @@ -1410,19 +1413,22 @@ ThreadID DefaultFetch::lsqCount() { - std::priority_queue PQ; + std::priority_queue PQ; + std::map threadMap; list::iterator threads = activeThreads->begin(); list::iterator end = activeThreads->end(); while (threads != end) { ThreadID tid = *threads++; + unsigned ldstqCount = fromIEW->iewInfo[tid].ldstqCount; - PQ.push(fromIEW->iewInfo[tid].ldstqCount); + PQ.push(ldstqCount); + threadMap[ldstqCount] = tid; } while (!PQ.empty()) { - ThreadID high_pri = PQ.top(); + ThreadID high_pri = threadMap[PQ.top()]; if (fetchStatus[high_pri] == Running || fetchStatus[high_pri] == IcacheAccessComplete ||