X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fcommon%2Fsim-endian.c;h=884b8b795e51c3319daf99a59ebe36cadfec94f6;hb=99d8e879938c947588332a9cc579d378ccc2a855;hp=2c061f0961483746ed9697d0521be128dc95b7ef;hpb=ecd75fc8eed3bde86036141228074a20e55dcfc9;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/common/sim-endian.c b/sim/common/sim-endian.c index 2c061f0961..884b8b795e 100644 --- a/sim/common/sim-endian.c +++ b/sim/common/sim-endian.c @@ -1,6 +1,6 @@ /* The common simulator framework for GDB, the GNU Debugger. - Copyright 2002-2014 Free Software Foundation, Inc. + Copyright 2002-2016 Free Software Foundation, Inc. Contributed by Andrew Cagney and Red Hat. @@ -25,14 +25,13 @@ #include "sim-basics.h" #include "sim-assert.h" -#include "sim-io.h" #if !defined(_SWAP_1) #define _SWAP_1(SET,RAW) SET (RAW) #endif -#if !defined(_SWAP_2) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && defined(htons) +#if !defined(_SWAP_2) && (HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) && defined(htons) #define _SWAP_2(SET,RAW) SET htons (RAW) #endif @@ -40,7 +39,7 @@ #define _SWAP_2(SET,RAW) SET (((RAW) >> 8) | ((RAW) << 8)) #endif -#if !defined(_SWAP_4) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && defined(htonl) +#if !defined(_SWAP_4) && (HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) && defined(htonl) #define _SWAP_4(SET,RAW) SET htonl (RAW) #endif @@ -94,7 +93,7 @@ INLINE_SIM_ENDIAN\ (unsigned_8) sim_endian_split_16 (unsigned_16 word, int w) { - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) + if (HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { return word.a[1 - w]; } @@ -111,7 +110,7 @@ sim_endian_join_16 (unsigned_8 h, unsigned_8 l) { unsigned_16 word; - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) + if (HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { word.a[0] = l; word.a[1] = h;