changeset d39368c6f502 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=d39368c6f502
description:
cpu: added assertions to ensure the correct proxies are used
diffstat:
src/cpu/thread_state.cc | 24 ++++++++++++++++++++++++
src/cpu/thread_state.hh | 6 +++---
2 files changed, 27 insertions(+), 3 deletions(-)
diffs (54 lines):
diff -r 3caf131d7a95 -r d39368c6f502 src/cpu/thread_state.cc
--- a/src/cpu/thread_state.cc Tue Jul 10 22:51:53 2012 -0700
+++ b/src/cpu/thread_state.cc Tue Jul 10 22:51:53 2012 -0700
@@ -122,6 +122,30 @@
}
}
+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()
{
diff -r 3caf131d7a95 -r d39368c6f502 src/cpu/thread_state.hh
--- a/src/cpu/thread_state.hh Tue Jul 10 22:51:53 2012 -0700
+++ b/src/cpu/thread_state.hh Tue Jul 10 22:51:53 2012 -0700
@@ -99,13 +99,13 @@
TheISA::Kernel::Statistics *getKernelStats() { return kernelStats; }
- PortProxy &getPhysProxy() { return *physProxy; }
+ PortProxy &getPhysProxy();
- FSTranslatingPortProxy &getVirtProxy() { return *virtProxy; }
+ FSTranslatingPortProxy &getVirtProxy();
Process *getProcessPtr() { return process; }
- SETranslatingPortProxy &getMemProxy() { return *proxy; }
+ SETranslatingPortProxy &getMemProxy();
/** Reads the number of instructions functionally executed and
* committed.
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev