summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-04-28 14:03:42 -0400
committerGabe Black <gblack@eecs.umich.edu>2006-04-28 14:03:42 -0400
commit20c85537871c131ec6c23d944db1f6b21da298fe (patch)
tree60ae6ce1165300453ec1b876539c4b368ab548b4 /cpu
parenta183f66a8ad2a1ac822b07d9b399a3a3e6d3cb5c (diff)
parent7a9c65b7b6f4471c856bf009179c3231074a3930 (diff)
downloadgem5-20c85537871c131ec6c23d944db1f6b21da298fe.tar.xz
Merge m5.eecs.umich.edu:/bk/newmem
into ewok.(none):/home/gblack/m5/newmem cpu/simple/cpu.cc: Hand merged --HG-- extra : convert_revision : 68414730c23d41c30cfb7bcfa604029a5fc8622c
Diffstat (limited to 'cpu')
-rw-r--r--cpu/simple/cpu.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/cpu/simple/cpu.cc b/cpu/simple/cpu.cc
index 40b506a78..be34d1791 100644
--- a/cpu/simple/cpu.cc
+++ b/cpu/simple/cpu.cc
@@ -480,7 +480,7 @@ SimpleCPU::read(Addr addr, T &data, unsigned flags)
// Fault fault = xc->read(memReq,data);
// Not sure what to check for no fault...
if (data_read_pkt->result == Success) {
- data = data_read_pkt->get<T>();
+ data = gtoh(data_read_pkt->get<T>());
}
if (traceData) {
@@ -523,7 +523,7 @@ SimpleCPU::read(Addr addr, T &data, unsigned flags)
// Need to find a way to not duplicate code above.
if (data_read_pkt->result == Success) {
- data = data_read_pkt->get<T>();
+ data = gtoh(data_read_pkt->get<T>());
}
if (traceData) {
@@ -627,10 +627,12 @@ SimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
data_write_pkt = new Packet;
data_write_pkt->cmd = Write;
data_write_pkt->req = data_write_req;
+ T hostData = htog(data);
data_write_pkt->allocate();
- data_write_pkt->set(data);
+ data_write_pkt->set(hostData);
#else
data_write_pkt->reset();
+ data = htog(data);
data_write_pkt->dataStatic(&data);
#endif
data_write_pkt->addr = data_write_req->getPaddr();