summaryrefslogtreecommitdiff
path: root/src/arch/x86/memhelpers.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-12 04:57:29 -0700
committerGabe Black <gabeblack@google.com>2018-10-12 23:44:38 +0000
commit413b4e7431b20d9b29dbf66d6677a60205ddd357 (patch)
tree8fb40a98f4b5b14e78240e2a3f5907344ff83658 /src/arch/x86/memhelpers.hh
parent2b979bd8913450355006fc9d9ccfa9dda21bbbb3 (diff)
downloadgem5-413b4e7431b20d9b29dbf66d6677a60205ddd357.tar.xz
x86: Use little endian packet accessors.
We know data is little endian, so we can use those accessors explicitly. Change-Id: I09aa7f1e525ad1346e932ce4a772b64bf59dc350 Reviewed-on: https://gem5-review.googlesource.com/c/13456 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/arch/x86/memhelpers.hh')
-rw-r--r--src/arch/x86/memhelpers.hh10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/arch/x86/memhelpers.hh b/src/arch/x86/memhelpers.hh
index aa3617b43..416439b9e 100644
--- a/src/arch/x86/memhelpers.hh
+++ b/src/arch/x86/memhelpers.hh
@@ -56,16 +56,16 @@ getMem(PacketPtr pkt, uint64_t &mem, unsigned dataSize,
{
switch (dataSize) {
case 1:
- mem = pkt->get<uint8_t>();
+ mem = pkt->getLE<uint8_t>();
break;
case 2:
- mem = pkt->get<uint16_t>();
+ mem = pkt->getLE<uint16_t>();
break;
case 4:
- mem = pkt->get<uint32_t>();
+ mem = pkt->getLE<uint32_t>();
break;
case 8:
- mem = pkt->get<uint64_t>();
+ mem = pkt->getLE<uint64_t>();
break;
default:
panic("Unhandled size in getMem.\n");
@@ -78,7 +78,7 @@ template <typename T, size_t N>
static void
getPackedMem(PacketPtr pkt, std::array<uint64_t, N> &mem, unsigned dataSize)
{
- std::array<T, N> real_mem = pkt->get<std::array<T, N> >();
+ std::array<T, N> real_mem = pkt->getLE<std::array<T, N> >();
for (int i = 0; i < N; i++)
mem[i] = real_mem[i];
}