changeset 3199397fd905 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=3199397fd905
description:
Minor cleanup: Use the blockAlign() method where it applies in the
cache.
diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
src/mem/cache/base.hh | 2 +-
src/mem/cache/cache_impl.hh | 6 +++---
diffs (42 lines):
diff -r 874f2ee2f115 -r 3199397fd905 src/mem/cache/base.hh
--- a/src/mem/cache/base.hh Sat Sep 26 10:50:50 2009 -0700
+++ b/src/mem/cache/base.hh Sat Sep 26 10:50:50 2009 -0700
@@ -379,7 +379,7 @@
}
- Addr blockAlign(Addr addr) const { return (addr & ~(blkSize - 1)); }
+ Addr blockAlign(Addr addr) const { return (addr & ~(Addr(blkSize - 1))); }
const Range<Addr> &getAddrRange() const { return addrRange; }
diff -r 874f2ee2f115 -r 3199397fd905 src/mem/cache/cache_impl.hh
--- a/src/mem/cache/cache_impl.hh Sat Sep 26 10:50:50 2009 -0700
+++ b/src/mem/cache/cache_impl.hh Sat Sep 26 10:50:50 2009 -0700
@@ -449,7 +449,7 @@
} else {
// miss
- Addr blk_addr = pkt->getAddr() & ~(Addr(blkSize-1));
+ Addr blk_addr = blockAlign(pkt->getAddr());
MSHR *mshr = mshrQueue.findMatch(blk_addr);
if (mshr) {
@@ -692,7 +692,7 @@
CachePort *incomingPort,
CachePort *otherSidePort)
{
- Addr blk_addr = pkt->getAddr() & ~(blkSize - 1);
+ Addr blk_addr = blockAlign(pkt->getAddr());
BlkType *blk = tags->findBlock(pkt->getAddr());
pkt->pushLabel(name());
@@ -1162,7 +1162,7 @@
BlkType *blk = tags->findBlock(pkt->getAddr());
- Addr blk_addr = pkt->getAddr() & ~(Addr(blkSize-1));
+ Addr blk_addr = blockAlign(pkt->getAddr());
MSHR *mshr = mshrQueue.findMatch(blk_addr);
// Let the MSHR itself track the snoop and decide whether we want
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev