Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/13466 )

Change subject: null: Stop specifying an endianness in isa_traits.hh.
......................................................................

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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/arch/null/isa_traits.hh
M src/mem/packet.hh
M src/mem/packet_access.hh
3 files changed, 9 insertions(+), 6 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved



diff --git a/src/arch/null/isa_traits.hh b/src/arch/null/isa_traits.hh
index 8c45dd0..d15f83c 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 d82ca4f..95c6f81 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 @@
     template <typename T>
     T get(ByteOrder endian) const;

+#if THE_ISA != NULL_ISA
     /**
      * Get the data in the packet byte swapped from guest to host
      * endian.
      */
     template <typename T>
     T get() const;
+#endif

     /** Set the value in the data pointer to v as big endian. */
     template <typename T>
@@ -1077,9 +1080,11 @@
     template <typename T>
     void set(T v, ByteOrder endian);

+#if THE_ISA != NULL_ISA
     /** Set the value in the data pointer to v as guest endian. */
     template <typename T>
     void set(T v);
+#endif


     /**
diff --git a/src/mem/packet_access.hh b/src/mem/packet_access.hh
index 92752a7..97357ae 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 @@
     };
 }

+#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 @@
     };
 }

+#if THE_ISA != NULL_ISA
 template <typename T>
 inline void
 Packet::set(T v)
 {
     setRaw(TheISA::htog(v));
 }
+#endif

 #endif //__MEM_PACKET_ACCESS_HH__

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13466
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I8dd4c7b8236b07df4458fea377865f30141121d4
Gerrit-Change-Number: 13466
Gerrit-PatchSet: 5
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Alec Roelke <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to