Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/32919 )
Change subject: arch: Get the byte order from sys and not TheISA::.
......................................................................
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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/generic/linux/threadinfo.hh
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/generic/linux/threadinfo.hh
b/src/arch/generic/linux/threadinfo.hh
index 8e039ae..73c8173 100644
--- a/src/arch/generic/linux/threadinfo.hh
+++ b/src/arch/generic/linux/threadinfo.hh
@@ -41,6 +41,8 @@
System *sys;
Addr pcbb;
+ ByteOrder byteOrder;
+
template <typename T>
bool
get_data(const char *symbol, T &data)
@@ -54,14 +56,15 @@
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())
{
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32919
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I13472ed69e12a3c753e2dea91b9c7ca813bfc0e7
Gerrit-Change-Number: 32919
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Ciro Santilli <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s