From: Javier Bueno Date: Sat, 17 Nov 2018 23:59:09 +0000 (+0100) Subject: mem-cache: a missing cast was truncating addresses X-Git-Tag: v19.0.0.0~1385 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=040fabe2bd1d3e34dc2855b2b443af503b967c6b;p=gem5.git 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 --- 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