From: Gabe Black Date: Fri, 12 Oct 2018 12:09:27 +0000 (-0700) Subject: gpu-compute: Explicitly use little endian packet accessors. X-Git-Tag: v19.0.0.0~1474 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=095d7fba324222273b92512680ffcfa12dbd7968;p=gem5.git gpu-compute: Explicitly use little endian packet accessors. The gpu ISA doesn't have a well defined endianness, but it really should. It seems that the GPU is only used with x86, and in that context it would be little endian. Change-Id: I1620906564a77f44553fbf6d788866e017b6054b Reviewed-on: https://gem5-review.googlesource.com/c/13463 Reviewed-by: Anthony Gutierrez Maintainer: Anthony Gutierrez --- diff --git a/src/gpu-compute/dispatcher.cc b/src/gpu-compute/dispatcher.cc index 41e632dd6..db250c28b 100644 --- a/src/gpu-compute/dispatcher.cc +++ b/src/gpu-compute/dispatcher.cc @@ -139,7 +139,7 @@ GpuDispatcher::read(PacketPtr pkt) assert(pkt->getSize() == 8); uint64_t retval = dispatchActive; - pkt->set(retval); + pkt->setLE(retval); } else { offset -= 8; assert(offset + pkt->getSize() < sizeof(HsaQueueEntry)); @@ -166,16 +166,16 @@ GpuDispatcher::write(PacketPtr pkt) switch (pkt->getSize()) { case 1: - data_val = pkt->get(); + data_val = pkt->getLE(); break; case 2: - data_val = pkt->get(); + data_val = pkt->getLE(); break; case 4: - data_val = pkt->get(); + data_val = pkt->getLE(); break; case 8: - data_val = pkt->get(); + data_val = pkt->getLE(); break; default: DPRINTF(GPUDisp, "bad size %d\n", pkt->getSize());