mem: Use getGuestByteOrder in the indirect memory prefetcher.
authorGabe Black <gabeblack@google.com>
Wed, 19 Aug 2020 09:28:33 +0000 (02:28 -0700)
committerGabe Black <gabeblack@google.com>
Fri, 21 Aug 2020 22:18:23 +0000 (22:18 +0000)
Use that instead of accessing TheISA::GuestByteOrder directly.

Change-Id: I6fbeb7501aceadb95739bb482215097af18da2fa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32926
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/cache/prefetch/indirect_memory.cc

index ac825fd547d62ea25cab6759ae48bf67bc1771f7..f6f0354130ec4f245e0bd4a57a4cae45c6cfb2a9 100644 (file)
@@ -46,15 +46,8 @@ IndirectMemory::IndirectMemory(const IndirectMemoryPrefetcherParams *p)
     ipd(p->ipd_table_assoc, p->ipd_table_entries, p->ipd_table_indexing_policy,
         p->ipd_table_replacement_policy,
         IndirectPatternDetectorEntry(p->addr_array_len, shiftValues.size())),
-    ipdEntryTrackingMisses(nullptr),
-#if THE_ISA != NULL_ISA
-    byteOrder(TheISA::GuestByteOrder)
-#else
-    byteOrder((ByteOrder) -1)
-#endif
+    ipdEntryTrackingMisses(nullptr), byteOrder(p->sys->getGuestByteOrder())
 {
-    fatal_if(byteOrder == static_cast<ByteOrder>(-1),
-            "This prefetcher requires a defined ISA\n");
 }
 
 void