summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Bueno <javier.bueno@metempsy.com>2018-11-18 00:59:09 +0100
committerJavier Bueno Hedo <javier.bueno@metempsy.com>2018-11-18 10:42:24 +0000
commit040fabe2bd1d3e34dc2855b2b443af503b967c6b (patch)
tree491d96adc009e8ad1c59018d2d5977d810dff25d
parent41b49893536a367313867d95afedf9260078c441 (diff)
downloadgem5-040fabe2bd1d3e34dc2855b2b443af503b967c6b.tar.xz
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 <nikos.nikoleris@arm.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
-rw-r--r--src/mem/cache/prefetch/base.cc2
1 files changed, 1 insertions, 1 deletions
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