diff options
author | Gabe Black <gabeblack@google.com> | 2018-10-12 04:53:00 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-12 23:44:14 +0000 |
commit | 2b979bd8913450355006fc9d9ccfa9dda21bbbb3 (patch) | |
tree | 5362e2d4cd0893f763020a3ccb6ca6f41a99567c /src/mem | |
parent | 38de206cf0c5beb5ac880181c5dab3e4aa0344a7 (diff) | |
download | gem5-2b979bd8913450355006fc9d9ccfa9dda21bbbb3.tar.xz |
mem: Expose the raw packet accessor functions.
This avoids a place where data has its endianness switched so that when
the endianness based accessors switch it back it returns to normal. It
also makes it easier to show intent when accessing single bytes where
endianness doesn't matter, and there's no contextual endianness.
Change-Id: I1b97396c1b9bb39727d35112d90e3969e5fe0aab
Reviewed-on: https://gem5-review.googlesource.com/c/13455
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/packet.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh index 0f45a7bae..515dcc701 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -1077,9 +1077,11 @@ class Packet : public Printable 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 /** @@ -1173,7 +1175,6 @@ class Packet : public Printable /** @} */ - private: // Private data accessor methods /** Get the data in the packet without byte swapping. */ template <typename T> T getRaw() const; |