summaryrefslogtreecommitdiff
path: root/cpu/exec_context.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2004-06-21 01:04:48 -0400
committerAli Saidi <saidi@eecs.umich.edu>2004-06-21 01:04:48 -0400
commit3f7b780af5530cc60228ebd3e895ab26d477614e (patch)
treeecc9052d0fa587e2b48e888705f5df2a80fe401b /cpu/exec_context.hh
parent074969f8f16110680de05fca64a6be48aedcdfd8 (diff)
parentc27139c701e8e61056ebc2cf002c5aa129779c13 (diff)
downloadgem5-3f7b780af5530cc60228ebd3e895ab26d477614e.tar.xz
Merge saidi@zizzer.eecs.umich.edu:/bk/linux
into ali-saidis-computer.local:/research/linux --HG-- extra : convert_revision : 446dc5fad11a6b29954dc5b1e974430853aa2969
Diffstat (limited to 'cpu/exec_context.hh')
-rw-r--r--cpu/exec_context.hh9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpu/exec_context.hh b/cpu/exec_context.hh
index 08879b3b5..b47f5cd08 100644
--- a/cpu/exec_context.hh
+++ b/cpu/exec_context.hh
@@ -33,6 +33,7 @@
#include "mem/mem_req.hh"
#include "mem/functional_mem/functional_memory.hh"
#include "sim/serialize.hh"
+#include "targetarch/byte_swap.hh"
// forward declaration: see functional_memory.hh
class FunctionalMemory;
@@ -260,7 +261,11 @@ class ExecContext
cregs->lock_flag = true;
}
#endif
- return mem->read(req, data);
+
+ Fault error;
+ error = mem->read(req, data);
+ data = htoa(data);
+ return error;
}
template <class T>
@@ -309,7 +314,7 @@ class ExecContext
}
#endif
- return mem->write(req, data);
+ return mem->write(req, (T)htoa(data));
}
virtual bool misspeculating();