summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/packet_access.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mem/packet_access.hh b/src/mem/packet_access.hh
index 882aa98d0..552b6dd27 100644
--- a/src/mem/packet_access.hh
+++ b/src/mem/packet_access.hh
@@ -53,6 +53,18 @@ Packet::get()
return d;
}
+template<>
+inline Twin32_t
+Packet::get()
+{
+ Twin32_t d;
+ assert(staticData || dynamicData);
+ assert(sizeof(Twin32_t) <= size);
+ d.a = TheISA::gtoh(*(uint32_t*)data);
+ d.b = TheISA::gtoh(*((uint32_t*)data + 1));
+ return d;
+}
+
/** return the value of what is pointed to in the packet. */
template <typename T>