diff options
author | Gabe Black <gabeblack@google.com> | 2018-10-12 04:58:50 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-12 23:45:51 +0000 |
commit | 9125a43f624653e6238dbb8713658cae2c5d43cd (patch) | |
tree | 268bab703026e5d6497492c97b736f125e875c59 /src/dev/arm/hdlcd.cc | |
parent | 413b4e7431b20d9b29dbf66d6677a60205ddd357 (diff) | |
download | gem5-9125a43f624653e6238dbb8713658cae2c5d43cd.tar.xz |
arm: Use little endian packet accessors.
We know data is little endian, so we can use those accessors
explicitly.
Change-Id: Iee337109fcda134e1ac5a700e5141fd7060f9c45
Reviewed-on: https://gem5-review.googlesource.com/c/13457
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/dev/arm/hdlcd.cc')
-rw-r--r-- | src/dev/arm/hdlcd.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dev/arm/hdlcd.cc b/src/dev/arm/hdlcd.cc index 20dc7d44e..113c1c358 100644 --- a/src/dev/arm/hdlcd.cc +++ b/src/dev/arm/hdlcd.cc @@ -248,7 +248,7 @@ HDLcd::read(PacketPtr pkt) const uint32_t data(readReg(daddr)); DPRINTF(HDLcd, "read register 0x%04x: 0x%x\n", daddr, data); - pkt->set<uint32_t>(data); + pkt->setLE<uint32_t>(data); pkt->makeAtomicResponse(); return pioDelay; } @@ -264,7 +264,7 @@ HDLcd::write(PacketPtr pkt) panic_if(pkt->getSize() != 4, "Unhandled read size (address: 0x.4x, size: %u)", daddr, pkt->getSize()); - const uint32_t data(pkt->get<uint32_t>()); + const uint32_t data(pkt->getLE<uint32_t>()); DPRINTF(HDLcd, "write register 0x%04x: 0x%x\n", daddr, data); writeReg(daddr, data); |