summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Bueno <javier.bueno@metempsy.com>2019-04-02 23:43:28 +0200
committerJavier Bueno Hedo <javier.bueno@metempsy.com>2019-04-03 09:14:22 +0000
commitf662b8aaacba60632e69da11cf7fc0deba958604 (patch)
treea67d5192ea21acc8e6f4afa7f686f9b289acb816
parent06b305bb342ac02b22b77050324864b3217e7482 (diff)
downloadgem5-f662b8aaacba60632e69da11cf7fc0deba958604.tar.xz
mem-cache: ISB prefetcher was triggering an assertion
An assertion ignored the case when an entry of the SP table had been invalidated. Change-Id: I5bf04e7a0979300b0f41f680c371f6397d4cbf3f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17734 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
-rw-r--r--src/mem/cache/prefetch/irregular_stream_buffer.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mem/cache/prefetch/irregular_stream_buffer.cc b/src/mem/cache/prefetch/irregular_stream_buffer.cc
index 45aba0b32..345fe7060 100644
--- a/src/mem/cache/prefetch/irregular_stream_buffer.cc
+++ b/src/mem/cache/prefetch/irregular_stream_buffer.cc
@@ -147,7 +147,10 @@ IrregularStreamBufferPrefetcher::calculatePrefetch(const PrefetchInfo &pfi,
Addr sp_index = mapping.address % prefetchCandidatesPerEntry;
AddressMappingEntry *sp_am =
spAddressMappingCache.findEntry(sp_address, is_secure);
- assert(sp_am != nullptr);
+ if (sp_am == nullptr) {
+ // The entry has been evicted, can not generate prefetches
+ return;
+ }
for (unsigned d = 1;
d <= degree && (sp_index + d) < prefetchCandidatesPerEntry;
d += 1)