From 8549ee4a6dfc86a941cee0a478c01f6f2c146c3c Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 29 Oct 2019 15:12:10 -0700 Subject: arch,cpu: Move endianness conversion of inst bytes into the ISA. It doesn't matter if the bytes are converted before or after they're fed into the decoder. The ISA already knows what endianness to use implicitly, and this frees the CPU which doesn't from having to worry about it. Change-Id: Id6574ee81bbf4f032c1d7b2901a664f2bd014fbc Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22343 Maintainer: Gabe Black Reviewed-by: Andreas Sandberg Reviewed-by: Jason Lowe-Power Tested-by: kokoro --- src/cpu/o3/fetch_impl.hh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/cpu/o3') diff --git a/src/cpu/o3/fetch_impl.hh b/src/cpu/o3/fetch_impl.hh index 60542b824..47b1ad0c5 100644 --- a/src/cpu/o3/fetch_impl.hh +++ b/src/cpu/o3/fetch_impl.hh @@ -1285,8 +1285,7 @@ DefaultFetch::fetch(bool &status_change) break; } - MachInst inst = TheISA::gtoh(cacheInsts[blkOffset]); - decoder[tid]->moreBytes(thisPC, fetchAddr, inst); + decoder[tid]->moreBytes(thisPC, fetchAddr, cacheInsts[blkOffset]); if (decoder[tid]->needMoreBytes()) { blkOffset++; -- cgit v1.2.3