summaryrefslogtreecommitdiff
path: root/src/mem/packet_access.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-12 05:15:34 -0700
committerGabe Black <gabeblack@google.com>2018-10-18 07:48:10 +0000
commit9d0fc9c29b6bd713967343c70844c7b64a5077ee (patch)
treecf1527df8c03ec077b8bbb0c5580a47deb4c664f /src/mem/packet_access.hh
parenteb8989ec7649335c959947335c96f3b563623962 (diff)
downloadgem5-9d0fc9c29b6bd713967343c70844c7b64a5077ee.tar.xz
null: Stop specifying an endianness in isa_traits.hh.
The NULL ISA doesn't really have an endianness. Now that the packet accessors which consumed that endianness are gone, we can get rid of that setting as well. Change-Id: I8dd4c7b8236b07df4458fea377865f30141121d4 Reviewed-on: https://gem5-review.googlesource.com/c/13466 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/mem/packet_access.hh')
-rw-r--r--src/mem/packet_access.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mem/packet_access.hh b/src/mem/packet_access.hh
index 92752a720..97357ae5e 100644
--- a/src/mem/packet_access.hh
+++ b/src/mem/packet_access.hh
@@ -43,7 +43,6 @@
*/
#include "arch/isa_traits.hh"
-#include "config/the_isa.hh"
#include "mem/packet.hh"
#include "sim/byteswap.hh"
@@ -99,12 +98,14 @@ Packet::get(ByteOrder endian) const
};
}
+#if THE_ISA != NULL_ISA
template <typename T>
inline T
Packet::get() const
{
return TheISA::gtoh(getRaw<T>());
}
+#endif
template <typename T>
inline void
@@ -136,11 +137,13 @@ Packet::set(T v, ByteOrder endian)
};
}
+#if THE_ISA != NULL_ISA
template <typename T>
inline void
Packet::set(T v)
{
setRaw(TheISA::htog(v));
}
+#endif
#endif //__MEM_PACKET_ACCESS_HH__