diff options
author | Gabe Black <gabeblack@google.com> | 2018-10-12 04:57:29 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-12 23:44:38 +0000 |
commit | 413b4e7431b20d9b29dbf66d6677a60205ddd357 (patch) | |
tree | 8fb40a98f4b5b14e78240e2a3f5907344ff83658 /src/dev/x86/i8259.cc | |
parent | 2b979bd8913450355006fc9d9ccfa9dda21bbbb3 (diff) | |
download | gem5-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/dev/x86/i8259.cc')
-rw-r--r-- | src/dev/x86/i8259.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dev/x86/i8259.cc b/src/dev/x86/i8259.cc index 03c5cb948..4c3b9b272 100644 --- a/src/dev/x86/i8259.cc +++ b/src/dev/x86/i8259.cc @@ -56,15 +56,15 @@ X86ISA::I8259::read(PacketPtr pkt) case 0x0: if (readIRR) { DPRINTF(I8259, "Reading IRR as %#x.\n", IRR); - pkt->set(IRR); + pkt->setLE(IRR); } else { DPRINTF(I8259, "Reading ISR as %#x.\n", ISR); - pkt->set(ISR); + pkt->setLE(ISR); } break; case 0x1: DPRINTF(I8259, "Reading IMR as %#x.\n", IMR); - pkt->set(IMR); + pkt->setLE(IMR); break; } pkt->makeAtomicResponse(); @@ -75,7 +75,7 @@ Tick X86ISA::I8259::write(PacketPtr pkt) { assert(pkt->getSize() == 1); - uint8_t val = pkt->get<uint8_t>(); + uint8_t val = pkt->getLE<uint8_t>(); switch (pkt->getAddr() - pioAddr) { case 0x0: if (bits(val, 4)) { |