summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2006-11-12 06:44:05 -0500
committerRon Dreslinski <rdreslin@umich.edu>2006-11-12 06:44:05 -0500
commit11accacf7c9de8147e68845051a489c251c4e7b1 (patch)
tree5b8a5b3a8dbc936a141c9cb3f36b55eb590a8704
parentb22d390721275fec8c07bd57d9ed021e78f3f3f7 (diff)
downloadgem5-11accacf7c9de8147e68845051a489c251c4e7b1.tar.xz
Move code before a early return to make sure it is executed on all paths
--HG-- extra : convert_revision : cfdd5b6911422fbb733677c43d027aa4407fbc85
-rw-r--r--src/mem/cache/cache_impl.hh16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index 51aa4f8e7..8acc67b69 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -476,6 +476,13 @@ Cache<TagStore,Buffering,Coherence>::snoop(PacketPtr &pkt)
}
CacheBlk::State new_state;
bool satisfy = coherence->handleBusRequest(pkt,blk,mshr, new_state);
+
+ if (blk && mshr && !mshr->inService && new_state == 0) {
+ //There was a outstanding write to a shared block, not need ReadEx
+ //not update, so change No Allocate param in MSHR
+ mshr->pkt->flags &= ~NO_ALLOCATE;
+ }
+
if (satisfy) {
DPRINTF(Cache, "Cache snooped a %s request for addr %x and "
"now supplying data, new state is %i\n",
@@ -485,15 +492,10 @@ Cache<TagStore,Buffering,Coherence>::snoop(PacketPtr &pkt)
respondToSnoop(pkt, curTick + hitLatency);
return;
}
- if (blk) {
+ if (blk)
DPRINTF(Cache, "Cache snooped a %s request for addr %x, "
"new state is %i\n", pkt->cmdString(), blk_addr, new_state);
- if (mshr && !mshr->inService && new_state == 0) {
- //There was a outstanding write to a shared block, not need ReadEx
- //not update, so change No Allocate param in MSHR
- mshr->pkt->flags &= ~NO_ALLOCATE;
- }
- }
+
tags->handleSnoop(blk, new_state);
}