changeset f39690f70bab in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=f39690f70bab
description:
        SE/FS: Record the system pointer all the time for the simple CPU.

        This pointer was only being stored in code that came from SE mode. The 
system
        pointer is always meaningful and available, so it should always be 
stored.

diffstat:

 src/cpu/simple/base.cc   |  4 ++--
 src/cpu/simple_thread.cc |  8 +++++---
 src/cpu/simple_thread.hh |  4 ++--
 3 files changed, 9 insertions(+), 7 deletions(-)

diffs (46 lines):

diff -r 4f2ad221ae32 -r f39690f70bab src/cpu/simple/base.cc
--- a/src/cpu/simple/base.cc    Thu Feb 09 13:06:27 2012 -0500
+++ b/src/cpu/simple/base.cc    Fri Feb 10 02:05:31 2012 -0800
@@ -94,8 +94,8 @@
     if (FullSystem)
         thread = new SimpleThread(this, 0, p->system, p->itb, p->dtb);
     else
-        thread = new SimpleThread(this, /* thread_num */ 0, p->workload[0],
-                p->itb, p->dtb);
+        thread = new SimpleThread(this, /* thread_num */ 0, p->system,
+                p->workload[0], p->itb, p->dtb);
 
     thread->setStatus(ThreadContext::Halted);
 
diff -r 4f2ad221ae32 -r f39690f70bab src/cpu/simple_thread.cc
--- a/src/cpu/simple_thread.cc  Thu Feb 09 13:06:27 2012 -0500
+++ b/src/cpu/simple_thread.cc  Fri Feb 10 02:05:31 2012 -0800
@@ -59,9 +59,11 @@
 using namespace std;
 
 // constructor
-SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, Process *_process,
-                           TheISA::TLB *_itb, TheISA::TLB *_dtb)
-    : ThreadState(_cpu, _thread_num, _process), itb(_itb), dtb(_dtb)
+SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys,
+                           Process *_process, TheISA::TLB *_itb,
+                           TheISA::TLB *_dtb)
+    : ThreadState(_cpu, _thread_num, _process), system(_sys), itb(_itb),
+      dtb(_dtb)
 {
     clearArchRegs();
     tc = new ProxyThreadContext<SimpleThread>(this);
diff -r 4f2ad221ae32 -r f39690f70bab src/cpu/simple_thread.hh
--- a/src/cpu/simple_thread.hh  Thu Feb 09 13:06:27 2012 -0500
+++ b/src/cpu/simple_thread.hh  Fri Feb 10 02:05:31 2012 -0800
@@ -137,8 +137,8 @@
                  TheISA::TLB *_itb, TheISA::TLB *_dtb,
                  bool use_kernel_stats = true);
     // SE
-    SimpleThread(BaseCPU *_cpu, int _thread_num, Process *_process,
-                 TheISA::TLB *_itb, TheISA::TLB *_dtb);
+    SimpleThread(BaseCPU *_cpu, int _thread_num, System *_system,
+                 Process *_process, TheISA::TLB *_itb, TheISA::TLB *_dtb);
 
     SimpleThread();
 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to