summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2017-06-29 04:46:51 +0100
committerNikos Nikoleris <nikos.nikoleris@arm.com>2018-03-07 10:34:16 +0000
commit208b1fc47e53206061751c9915ae9e129f9e89e5 (patch)
tree839fe6b7b4e52139dbc83998784fd9eec9eb4f79 /src
parent9bd467bf72854b613bb366e8adac75c9cfe883c3 (diff)
downloadgem5-208b1fc47e53206061751c9915ae9e129f9e89e5.tar.xz
mem-cache: Make the block invalidate functions virtual
This change makes the cache block invalidation function in the BaseTags and CacheBlk class virtual to enable derived classes. Change-Id: I2e64b01c6ca637f16d10474fc8b08eeec3f23453 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/8287 Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Diffstat (limited to 'src')
-rw-r--r--src/mem/cache/blk.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/cache/blk.hh b/src/mem/cache/blk.hh
index 66f05c884..7dd0a92ae 100644
--- a/src/mem/cache/blk.hh
+++ b/src/mem/cache/blk.hh
@@ -170,6 +170,7 @@ class CacheBlk
CacheBlk(const CacheBlk&) = delete;
CacheBlk& operator=(const CacheBlk&) = delete;
+ virtual ~CacheBlk() {};
/**
* Checks the write permissions of this block.
@@ -205,7 +206,7 @@ class CacheBlk
/**
* Invalidate the block and clear all state.
*/
- void invalidate()
+ virtual void invalidate()
{
tag = MaxAddr;
task_id = ContextSwitchTaskId::Unknown;