arch: Get rid of the (Big|Little)EndianGuest namespaces.
authorGabe Black <gabeblack@google.com>
Wed, 30 Oct 2019 01:56:27 +0000 (18:56 -0700)
committerGabe Black <gabeblack@google.com>
Mon, 18 Nov 2019 20:02:31 +0000 (20:02 +0000)
commitd40f0bc579fb8b10da7181d3a144cd3e9a0a0e59
treeeb0a80fd0a21017befa4eee8c4e77380bb1b4657
parent697e55995626f24658ce443287cd1ba90c2f68eb
arch: Get rid of the (Big|Little)EndianGuest namespaces.

These namespaces were used to set up an environment/context where there
was an implicit guest namespace. This is an issue when there may be
multiple guest endiannesses which might be different. In cases where
we don't know what the guest endianness is, we can't rely on it being
an implicit part of our context since that would be ambiguous. In cases
where we do know, for instance in ISA specific code, we can just use
the endianness specific version that's appropriate for that context.

This also (somewhat) removes the assumption that there is a single
endianness that applies for a particular ISA. Practically speaking this
assumption will probably still stand though, since there would likely
be a non-trivial performance penalty to apply a configurable endianness
instead of a fixed one the compiler can optomize/remove.

Change-Id: I2dff338b58726d724f387388efe32d9233885680
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22374
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
13 files changed:
src/arch/alpha/isa_traits.hh
src/arch/arm/isa_traits.hh
src/arch/mips/isa_traits.hh
src/arch/mips/system.cc
src/arch/power/isa_traits.hh
src/arch/riscv/isa_traits.hh
src/arch/riscv/system.cc
src/arch/sparc/isa_traits.hh
src/arch/sparc/system.cc
src/arch/x86/isa_traits.hh
src/arch/x86/linux/system.cc
src/arch/x86/system.cc
src/sim/byteswap.hh