summaryrefslogtreecommitdiff
path: root/src/cpu/thread_state.cc
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2012-07-10 22:51:53 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2012-07-10 22:51:53 -0700
commit4a52a6ea2d84933a1ac8418fe2ba9222832a690d (patch)
tree679d9e6737c7732340a298fd047a195b8c445436 /src/cpu/thread_state.cc
parent11b725c19da4d08ae471678f6da867c67e3c15b5 (diff)
downloadgem5-4a52a6ea2d84933a1ac8418fe2ba9222832a690d.tar.xz
cpu: added assertions to ensure the correct proxies are used
Diffstat (limited to 'src/cpu/thread_state.cc')
-rw-r--r--src/cpu/thread_state.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc
index eda62dad1..d0f946989 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -122,6 +122,30 @@ ThreadState::initMemProxies(ThreadContext *tc)
}
}
+PortProxy &
+ThreadState::getPhysProxy()
+{
+ assert(FullSystem);
+ assert(physProxy != NULL);
+ return *physProxy;
+}
+
+FSTranslatingPortProxy &
+ThreadState::getVirtProxy()
+{
+ assert(FullSystem);
+ assert(virtProxy != NULL);
+ return *virtProxy;
+}
+
+SETranslatingPortProxy &
+ThreadState::getMemProxy()
+{
+ assert(!FullSystem);
+ assert(proxy != NULL);
+ return *proxy;
+}
+
void
ThreadState::profileClear()
{