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 <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2020-08-19 01:52:28 -07:00
parent fee00c6863
commit c3d20692c3

View File

@@ -41,6 +41,8 @@ class ThreadInfo
System *sys;
Addr pcbb;
ByteOrder byteOrder;
template <typename T>
bool
get_data(const char *symbol, T &data)
@@ -54,14 +56,15 @@ class ThreadInfo
return false;
}
data = tc->getVirtProxy().read<T>(it->address, TheISA::GuestByteOrder);
data = tc->getVirtProxy().read<T>(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())
{
}