From 61ff48a1f834b7335c2ae615a1f855995cfab335 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Wed, 11 Mar 2009 23:05:24 -0700 Subject: [PATCH] cpu: fix minor endian issue with trace output (no functional change) --- src/cpu/simple/atomic.cc | 2 +- src/cpu/simple/timing.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index acda552d9..17f93c882 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -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; } diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index f398365d3..a8f86f8d2 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -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; -- 2.30.2