// these functions and make the users do their own byte swapping since
// the memory system does not in fact have an endianness.
-template<>
-inline Twin64_t
-Packet::get()
-{
- Twin64_t d;
- assert(staticData || dynamicData);
- assert(sizeof(Twin64_t) <= size);
- d.a = TheISA::gtoh(*(uint64_t*)data);
- d.b = TheISA::gtoh(*((uint64_t*)data + 1));
- return d;
-}
-
-
/** return the value of what is pointed to in the packet. */
template <typename T>
inline T
Packet::get()
{
- assert(staticData || dynamicData);
+ assert(flags.isSet(STATIC_DATA|DYNAMIC_DATA));
assert(sizeof(T) <= size);
return TheISA::gtoh(*(T*)data);
}
inline void
Packet::set(T v)
{
+ assert(flags.isSet(STATIC_DATA|DYNAMIC_DATA));
assert(sizeof(T) <= size);
*(T*)data = TheISA::htog(v);
}