summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mem/cache/base_cache.cc2
-rw-r--r--src/mem/cache/cache_impl.hh4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mem/cache/base_cache.cc b/src/mem/cache/base_cache.cc
index 936a9c1fa..e0301a757 100644
--- a/src/mem/cache/base_cache.cc
+++ b/src/mem/cache/base_cache.cc
@@ -132,7 +132,7 @@ BaseCache::CachePort::recvFunctional(Packet *pkt)
pkt_data = pkt->getPtr<uint8_t>() + offset;
write_data = target->getPtr<uint8_t>();
data_size = pkt->getSize() - offset;
- assert(data_size > pkt->getSize());
+ assert(data_size >= pkt->getSize());
if (data_size > target->getSize())
data_size = target->getSize();
}
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index d8afcb009..ea30dbba6 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -585,7 +585,7 @@ Cache<TagStore,Buffering,Coherence>::probe(Packet * &pkt, bool update,
pkt_data = pkt->getPtr<uint8_t>() + offset;
write_data = target->getPtr<uint8_t>();
data_size = pkt->getSize() - offset;
- assert(data_size > pkt->getSize());
+ assert(data_size >= pkt->getSize());
if (data_size > target->getSize())
data_size = target->getSize();
}
@@ -620,7 +620,7 @@ Cache<TagStore,Buffering,Coherence>::probe(Packet * &pkt, bool update,
pkt_data = pkt->getPtr<uint8_t>() + offset;
write_data = write->getPtr<uint8_t>();
data_size = pkt->getSize() - offset;
- assert(data_size > pkt->getSize());
+ assert(data_size >= pkt->getSize());
if (data_size > write->getSize())
data_size = write->getSize();
}