diff options
Diffstat (limited to 'src/mem/cache/prefetch/queued.cc')
-rw-r--r-- | src/mem/cache/prefetch/queued.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/cache/prefetch/queued.cc b/src/mem/cache/prefetch/queued.cc index ce14b5ac5..ba4c940c1 100644 --- a/src/mem/cache/prefetch/queued.cc +++ b/src/mem/cache/prefetch/queued.cc @@ -265,8 +265,9 @@ QueuedPrefetcher::insert(AddrPriority &pf_info, bool is_secure) pfq.emplace_back(dpp); } else { iterator it = pfq.end(); - while (it != pfq.begin() && dpp > *it) + do { --it; + } while (it != pfq.begin() && dpp > *it); /* If we reach the head, we have to see if the new element is new head * or not */ if (it == pfq.begin() && dpp <= *it) |