diff options
author | Gabe Black <gabeblack@google.com> | 2019-10-29 15:12:10 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-11-02 00:01:52 +0000 |
commit | 8549ee4a6dfc86a941cee0a478c01f6f2c146c3c (patch) | |
tree | c6edb6d87332b970a6ffdcd518c4926cb86ce1e5 /src/arch/sparc | |
parent | 5fa59a283148aec728320e2d527c0157edfa5b66 (diff) | |
download | gem5-8549ee4a6dfc86a941cee0a478c01f6f2c146c3c.tar.xz |
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 <gabeblack@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/arch/sparc')
-rw-r--r-- | src/arch/sparc/decoder.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/sparc/decoder.hh b/src/arch/sparc/decoder.hh index 6fa506f37..8124a6963 100644 --- a/src/arch/sparc/decoder.hh +++ b/src/arch/sparc/decoder.hh @@ -65,7 +65,7 @@ class Decoder void moreBytes(const PCState &pc, Addr fetchPC, MachInst inst) { - emi = inst; + emi = betoh(inst); // The I bit, bit 13, is used to figure out where the ASI // should come from. Use that in the ExtMachInst. This is // slightly redundant, but it removes the need to put a condition |