summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-05-01 18:53:28 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-05-01 18:53:28 -0400
commit8a9d270f6c17efa79f38e629c7cbcafa51aa8494 (patch)
tree75bbf24f940af2b8bf6fe00d42c56b1715bdf07b /cpu
parenta8fbc4ec76169a6d735817df2aa8bc2085df5ac8 (diff)
downloadgem5-8a9d270f6c17efa79f38e629c7cbcafa51aa8494.tar.xz
move code from packet.hh to packet.cc and packet_impl.hh
fix very annoying not-compiler bug arch/sparc/regfile.hh: You have not included an out-of-class definition of your static members. See [9.4.2]/4 and about a billion gcc bug reports. If statements get around the problem through some magic, and than seems nicer that putting a definition of them in a c file somewhere. cpu/simple/cpu.cc: get() and set() do the conversion now dev/io_device.hh: need get() and set() defentions in all the devices mem/packet.cc: mem/packet.hh: move code from packet.hh to packet.cc mem/physical.cc: packet_impl needed for templated packet functions --HG-- extra : convert_revision : 6c11842aa928d9af7b4cabe826306fe1fe09e693
Diffstat (limited to 'cpu')
-rw-r--r--cpu/simple/cpu.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpu/simple/cpu.cc b/cpu/simple/cpu.cc
index be34d1791..33fe63c26 100644
--- a/cpu/simple/cpu.cc
+++ b/cpu/simple/cpu.cc
@@ -54,6 +54,7 @@
#include "cpu/smt.hh"
#include "cpu/static_inst.hh"
#include "kern/kernel_stats.hh"
+#include "mem/packet_impl.hh"
#include "sim/byteswap.hh"
#include "sim/builder.hh"
#include "sim/debug.hh"
@@ -480,7 +481,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 = gtoh(data_read_pkt->get<T>());
+ data = data_read_pkt->get<T>();
}
if (traceData) {
@@ -523,7 +524,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 = gtoh(data_read_pkt->get<T>());
+ data = data_read_pkt->get<T>();
}
if (traceData) {
@@ -627,9 +628,8 @@ 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(hostData);
+ data_write_pkt->set(data);
#else
data_write_pkt->reset();
data = htog(data);