forked from Imagelibrary/binutils-gdb
sim: ppc: convert to bfd_endian
Rather than re-invent endian defines, as well as maintain our own list of OS & arch-specific includes, punt all that logic in favor of the bfd ones already set up and maintained elsewhere. We already rely on the bfd library, so leveraging the endian aspect should be fine. This was done for all the other ports years ago, so catch ppc up.
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#define _SWAP_1(SET,RAW) SET (RAW)
|
||||
#endif
|
||||
|
||||
#if !defined(_SWAP_2) && (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 +40,7 @@
|
||||
#define _SWAP_2(SET,RAW) SET (((RAW) >> 8) | ((RAW) << 8))
|
||||
#endif
|
||||
|
||||
#if !defined(_SWAP_4) && (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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user