From 3eca0a2bc9d8679a05dd92b5aec6e6358aab3681 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 19 Sep 2011 05:19:45 -0700 Subject: [PATCH] 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. --- src/sim/byteswap.hh | 4 ++-- 1 file 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 inline T betoh(T value) {return swap_byte(value);} namespace BigEndianGuest { - const bool ByteOrderDiffers = (HostByteOrder != BigEndianByteOrder); + const ByteOrder GuestByteOrder = BigEndianByteOrder; template inline T gtole(T value) {return betole(value);} template @@ -184,7 +184,7 @@ namespace BigEndianGuest namespace LittleEndianGuest { - const bool ByteOrderDiffers = (HostByteOrder != LittleEndianByteOrder); + const ByteOrder GuestByteOrder = LittleEndianByteOrder; template inline T gtole(T value) {return value;} template -- 2.30.2