From 758bfe4eb57e5b7aada4c974830532ec067a5bda Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Wed, 11 Mar 2009 23:05:26 -0700 Subject: [PATCH] cache: set dirty bit on swaps (oops!) --- src/mem/cache/cache_impl.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index 618e00569..a78fd3637 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -149,8 +149,10 @@ Cache::cmpAndSwap(BlkType *blk, PacketPtr pkt) panic("Invalid size for conditional read/write\n"); } - if (overwrite_mem) + if (overwrite_mem) { std::memcpy(blk_data, &overwrite_val, pkt->getSize()); + blk->status |= BlkDirty; + } } -- 2.30.2