From c3d20692c3e602387f9c640ab193a6deab09107f Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 19 Aug 2020 01:52:28 -0700 Subject: [PATCH] arch: Get the byte order from sys and not TheISA::. This is a small step which localizes the use of TheISA, hopefully making it easier to eliminate in the future. Change-Id: I13472ed69e12a3c753e2dea91b9c7ca813bfc0e7 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32919 Reviewed-by: Andreas Sandberg Maintainer: Gabe Black Tested-by: kokoro --- src/arch/generic/linux/threadinfo.hh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/arch/generic/linux/threadinfo.hh b/src/arch/generic/linux/threadinfo.hh index 8e039ae2e..73c8173e6 100644 --- a/src/arch/generic/linux/threadinfo.hh +++ b/src/arch/generic/linux/threadinfo.hh @@ -41,6 +41,8 @@ class ThreadInfo System *sys; Addr pcbb; + ByteOrder byteOrder; + template bool get_data(const char *symbol, T &data) @@ -54,14 +56,15 @@ class ThreadInfo return false; } - data = tc->getVirtProxy().read(it->address, TheISA::GuestByteOrder); + data = tc->getVirtProxy().read(it->address, byteOrder); return true; } public: ThreadInfo(ThreadContext *_tc, Addr _pcbb = 0) - : tc(_tc), sys(tc->getSystemPtr()), pcbb(_pcbb) + : tc(_tc), sys(tc->getSystemPtr()), pcbb(_pcbb), + byteOrder(tc->getSystemPtr()->getGuestByteOrder()) { } -- 2.30.2