Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/13465 )

Change subject: mem: Delete the packet accessors which use guest endianness.
......................................................................

mem: Delete the packet accessors which use guest endianness.

These accessors create an extra dependency on the guest OS, and can be
avoided. Now that all their uses have been removed, they aren't needed
any more.

Change-Id: I466c07fef99bce2d7964c07a7ac3dd398691378b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/13465
Tested-by: kokoro <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
---
M src/mem/packet.hh
M src/mem/packet_access.hh
2 files changed, 3 insertions(+), 40 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 407172f..4aee81f 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -64,7 +64,6 @@
 #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"

@@ -1124,16 +1123,6 @@
     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
-        M5_DEPRECATED_MSG("The memory system should be ISA independent.");
-#endif
-
     /** Set the value in the data pointer to v as big endian. */
     template <typename T>
     void setBE(T v);
@@ -1149,13 +1138,6 @@
     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)
-        M5_DEPRECATED_MSG("The memory system should be ISA independent.");
-#endif
-
     /**
      * Get the data in the packet byte swapped from the specified
      * endianness and zero-extended to 64 bits.
diff --git a/src/mem/packet_access.hh b/src/mem/packet_access.hh
index 97357ae..06c1068 100644
--- a/src/mem/packet_access.hh
+++ b/src/mem/packet_access.hh
@@ -42,13 +42,12 @@
  *          Andreas Sandberg
  */

-#include "arch/isa_traits.hh"
-#include "mem/packet.hh"
-#include "sim/byteswap.hh"
-
 #ifndef __MEM_PACKET_ACCESS_HH__
 #define __MEM_PACKET_ACCESS_HH__

+#include "mem/packet.hh"
+#include "sim/byteswap.hh"
+
 template <typename T>
 inline T
 Packet::getRaw() const
@@ -98,15 +97,6 @@
     };
 }

-#if THE_ISA != NULL_ISA
-template <typename T>
-inline T
-Packet::get() const
-{
-    return TheISA::gtoh(getRaw<T>());
-}
-#endif
-
 template <typename T>
 inline void
 Packet::setBE(T v)
@@ -137,13 +127,4 @@
     };
 }

-#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/+/13465
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: I466c07fef99bce2d7964c07a7ac3dd398691378b
Gerrit-Change-Number: 13465
Gerrit-PatchSet: 7
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-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to