diff --git a/src/arch/null/isa_traits.hh b/src/arch/null/isa_traits.hh index 8c45dd06bb..d15f83cb43 100644 --- a/src/arch/null/isa_traits.hh +++ b/src/arch/null/isa_traits.hh @@ -42,15 +42,10 @@ #include "base/types.hh" -namespace LittleEndianGuest {} - namespace NullISA { - using namespace LittleEndianGuest; - const Addr PageShift = 12; const Addr PageBytes = ULL(1) << PageShift; - } #endif //__ARCH_NULL_ISA_TRAITS_HH__ diff --git a/src/mem/packet.hh b/src/mem/packet.hh index d82ca4f3e0..95c6f81834 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -63,6 +63,7 @@ #include "base/logging.hh" #include "base/printable.hh" #include "base/types.hh" +#include "config/the_isa.hh" #include "mem/request.hh" #include "sim/core.hh" @@ -1055,12 +1056,14 @@ class Packet : public Printable template T get(ByteOrder endian) const; +#if THE_ISA != NULL_ISA /** * Get the data in the packet byte swapped from guest to host * endian. */ template T get() const; +#endif /** Set the value in the data pointer to v as big endian. */ template @@ -1077,9 +1080,11 @@ class Packet : public Printable template void set(T v, ByteOrder endian); +#if THE_ISA != NULL_ISA /** Set the value in the data pointer to v as guest endian. */ template void set(T v); +#endif /** diff --git a/src/mem/packet_access.hh b/src/mem/packet_access.hh index 92752a7201..97357ae5e3 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 inline T Packet::get() const { return TheISA::gtoh(getRaw()); } +#endif template inline void @@ -136,11 +137,13 @@ Packet::set(T v, ByteOrder endian) }; } +#if THE_ISA != NULL_ISA template inline void Packet::set(T v) { setRaw(TheISA::htog(v)); } +#endif #endif //__MEM_PACKET_ACCESS_HH__