diff --git a/src/cpu/o3/commit.cc b/src/cpu/o3/commit.cc index 2359c1a12d..23265d4e33 100644 --- a/src/cpu/o3/commit.cc +++ b/src/cpu/o3/commit.cc @@ -1498,6 +1498,7 @@ ThreadID Commit::oldestReady() { unsigned oldest = 0; + unsigned oldest_seq_num = 0; bool first = true; std::list::iterator threads = activeThreads->begin(); @@ -1517,9 +1518,11 @@ Commit::oldestReady() if (first) { oldest = tid; + oldest_seq_num = head_inst->seqNum; first = false; - } else if (head_inst->seqNum < oldest) { + } else if (head_inst->seqNum < oldest_seq_num) { oldest = tid; + oldest_seq_num = head_inst->seqNum; } } }