Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/13463 )

Change subject: gpu-compute: Explicitly use little endian packet accessors.
......................................................................

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 <anthony.gutier...@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutier...@amd.com>
---
M src/gpu-compute/dispatcher.cc
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Anthony Gutierrez: Looks good to me, approved; Looks good to me, approved



diff --git a/src/gpu-compute/dispatcher.cc b/src/gpu-compute/dispatcher.cc
index 41e632d..db250c2 100644
--- a/src/gpu-compute/dispatcher.cc
+++ b/src/gpu-compute/dispatcher.cc
@@ -139,7 +139,7 @@
         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 @@

     switch (pkt->getSize()) {
       case 1:
-        data_val = pkt->get<uint8_t>();
+        data_val = pkt->getLE<uint8_t>();
         break;
       case 2:
-        data_val = pkt->get<uint16_t>();
+        data_val = pkt->getLE<uint16_t>();
         break;
       case 4:
-        data_val = pkt->get<uint32_t>();
+        data_val = pkt->getLE<uint32_t>();
         break;
       case 8:
-        data_val = pkt->get<uint64_t>();
+        data_val = pkt->getLE<uint64_t>();
         break;
       default:
         DPRINTF(GPUDisp, "bad size %d\n", pkt->getSize());

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13463
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I1620906564a77f44553fbf6d788866e017b6054b
Gerrit-Change-Number: 13463
Gerrit-PatchSet: 5
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Alec Roelke <alec.roe...@gmail.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Anthony Gutierrez <anthony.gutier...@amd.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to