summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-09-19 05:19:45 -0700
committerGabe Black <gblack@eecs.umich.edu>2011-09-19 05:19:45 -0700
commit3eca0a2bc9d8679a05dd92b5aec6e6358aab3681 (patch)
treea5f5c1eeea97a704157675d9aea8ac93deb27147 /src/sim
parent978e41eab058100bb784a4229c2c7f5ec1928dd5 (diff)
downloadgem5-3eca0a2bc9d8679a05dd92b5aec6e6358aab3681.tar.xz
Endianness: Make it easier to check the compiled in guest endianness.
It was technically possible but clumsy to determine what endianness a guest was configured with using the state in byteswap.hh. This change makes that information available more directly. Also get rid of unused (and mildly redundant) ByteOrderDiffers constant.
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/byteswap.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sim/byteswap.hh b/src/sim/byteswap.hh
index fc36bdf33..3a0f7ce8a 100644
--- a/src/sim/byteswap.hh
+++ b/src/sim/byteswap.hh
@@ -167,7 +167,7 @@ template <typename T> inline T betoh(T value) {return swap_byte(value);}
namespace BigEndianGuest
{
- const bool ByteOrderDiffers = (HostByteOrder != BigEndianByteOrder);
+ const ByteOrder GuestByteOrder = BigEndianByteOrder;
template <typename T>
inline T gtole(T value) {return betole(value);}
template <typename T>
@@ -184,7 +184,7 @@ namespace BigEndianGuest
namespace LittleEndianGuest
{
- const bool ByteOrderDiffers = (HostByteOrder != LittleEndianByteOrder);
+ const ByteOrder GuestByteOrder = LittleEndianByteOrder;
template <typename T>
inline T gtole(T value) {return value;}
template <typename T>