mips: Use little endian packet accessors.
authorGabe Black <gabeblack@google.com>
Fri, 12 Oct 2018 12:02:45 +0000 (05:02 -0700)
committerGabe Black <gabeblack@google.com>
Fri, 12 Oct 2018 23:58:43 +0000 (23:58 +0000)
We know data is little endian, so we can use those accessors
explicitly.

Change-Id: I6220a543686b1d45d26973391b028dc04ce85dd2
Reviewed-on: https://gem5-review.googlesource.com/c/13460
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/arch/mips/isa/formats/mem.isa

index 7349516b68403371dc132612e9ba95315a8e2f54..a2710fb902e83541284c1e42b9b6b76359bd0968 100644 (file)
@@ -109,16 +109,16 @@ output exec {{
         switch (packet->getSize())
         {
           case 1:
-            return packet->get<uint8_t>();
+            return packet->getLE<uint8_t>();
 
           case 2:
-            return packet->get<uint16_t>();
+            return packet->getLE<uint16_t>();
 
           case 4:
-            return packet->get<uint32_t>();
+            return packet->getLE<uint32_t>();
 
           case 8:
-            return packet->get<uint64_t>();
+            return packet->getLE<uint64_t>();
 
           default:
             std::cerr << "bad store data size = " << packet->getSize() << std::endl;