cpu: fix minor endian issue with trace output
authorSteve Reinhardt <steve.reinhardt@amd.com>
Thu, 12 Mar 2009 06:05:24 +0000 (23:05 -0700)
committerSteve Reinhardt <steve.reinhardt@amd.com>
Thu, 12 Mar 2009 06:05:24 +0000 (23:05 -0700)
(no functional change)

src/cpu/simple/atomic.cc
src/cpu/simple/timing.cc

index acda552d9e9042aab76b485436a3e4b5ef5f2703..17f93c8829742528d848a17dfdf12734f9c11f5a 100644 (file)
@@ -513,7 +513,7 @@ AtomicSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
             // calling changeStatus() and changing it to "bad addr write"
             // or something.
             if (traceData) {
-                traceData->setData(data);
+                traceData->setData(gtoh(data));
             }
             return fault;
         }
index f398365d375ab98ded05efa0abe7763c76335abe..a8f86f8d270d5b5846c550033b67113d9d5d24eb 100644 (file)
@@ -564,7 +564,7 @@ TimingSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
     assert(split_addr <= addr || split_addr - addr < block_size);
 
     T *dataP = new T;
-    *dataP = TheISA::gtoh(data);
+    *dataP = TheISA::htog(data);
     _status = DTBWaitResponse;
     if (split_addr > addr) {
         RequestPtr req1, req2;