sim: Add a getGuestByteOrder accessor to the system class.
This goes along with the existing getPageBytes, etc., accessors, and paves the way for this to be a parameter of the System class. Change-Id: Ibfe2d591185d23beccdd5bbff1092dc07b1278ac Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22272 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -283,6 +283,19 @@ class System : public SimObject, public PCEventScope
|
||||
*/
|
||||
Arch getArch() const { return Arch::TheISA; }
|
||||
|
||||
/**
|
||||
* Get the guest byte order.
|
||||
*/
|
||||
ByteOrder
|
||||
getGuestByteOrder() const
|
||||
{
|
||||
#if THE_ISA != NULL_ISA
|
||||
return TheISA::GuestByteOrder;
|
||||
#else
|
||||
panic("The NULL ISA has no endianness.");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the page bytes for the ISA.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user