From 040fabe2bd1d3e34dc2855b2b443af503b967c6b Mon Sep 17 00:00:00 2001 From: Javier Bueno Date: Sun, 18 Nov 2018 00:59:09 +0100 Subject: [PATCH] mem-cache: a missing cast was truncating addresses High bits were truncated when computing the block address Change-Id: Iab2a4c6063ece2d1d4c24ce5686045a6d6d35434 Reviewed-on: https://gem5-review.googlesource.com/c/14415 Reviewed-by: Nikos Nikoleris Reviewed-by: Daniel Carvalho Maintainer: Nikos Nikoleris --- src/mem/cache/prefetch/base.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/cache/prefetch/base.cc b/src/mem/cache/prefetch/base.cc index 3f5b67e6a..53260ae0d 100644 --- a/src/mem/cache/prefetch/base.cc +++ b/src/mem/cache/prefetch/base.cc @@ -140,7 +140,7 @@ BasePrefetcher::samePage(Addr a, Addr b) const Addr BasePrefetcher::blockAddress(Addr a) const { - return a & ~(blkSize-1); + return a & ~((Addr)blkSize-1); } Addr -- 2.30.2