CPU: Make the simple cpu trace data for loads/stores.
authorGabe Black <gblack@eecs.umich.edu>
Thu, 12 Jun 2008 04:35:50 +0000 (00:35 -0400)
committerGabe Black <gblack@eecs.umich.edu>
Thu, 12 Jun 2008 04:35:50 +0000 (00:35 -0400)
src/cpu/simple/atomic.cc
src/cpu/simple/timing.cc

index 23bd40b9b432685893f3c21a3d0ace79b9d6e7ba..acd2805682c0f88912ca22aa62dd4483e0012302 100644 (file)
@@ -355,6 +355,9 @@ AtomicSimpleCPU::read(Addr addr, T &data, unsigned flags)
         if (secondAddr <= addr)
         {
             data = gtoh(data);
+            if (traceData) {
+                traceData->setData(data);
+            }
             return fault;
         }
 
@@ -568,6 +571,9 @@ AtomicSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
             // If the write needs to have a fault on the access, consider
             // calling changeStatus() and changing it to "bad addr write"
             // or something.
+            if (traceData) {
+                traceData->setData(data);
+            }
             return fault;
         }
 
index a76824ff31bc9962cb627d3e7b599119b071516c..d0c7dd7874c0ffdce5df46c5814e40727b3ecebc 100644 (file)
@@ -296,6 +296,9 @@ TimingSimpleCPU::read(Addr addr, T &data, unsigned flags)
         delete req;
     }
 
+    if (traceData) {
+        traceData->setData(data);
+    }
     return fault;
 }
 
@@ -431,6 +434,9 @@ TimingSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
         delete req;
     }
 
+    if (traceData) {
+        traceData->setData(data);
+    }
 
     // If the write needs to have a fault on the access, consider calling
     // changeStatus() and changing it to "bad addr write" or something.