fix crashes on little-endian powerpc

This commit is contained in:
lifning 2022-09-02 17:20:36 -07:00
parent 7416f70b8b
commit c9f049d017
3 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@
#endif
#elif defined(__arm__)
#include "arm.c"
#elif defined(_ARCH_PPC)
#elif defined(_ARCH_PPC) && !defined(__LITTLE_ENDIAN__)
#include "ppc.c"
#elif defined(_WIN32)
#include "fiber.c"

View file

@ -37,7 +37,7 @@
#endif
#if defined (MSB_FIRST) || defined (__BIG_ENDIAN__) || defined (WORDS_BIGENDIAN) || \
defined (__sparc__) || BLARGG_CPU_POWERPC || \
defined (__sparc__) || \
(defined (BIG_ENDIAN) && BIG_ENDIAN+0 != 4321)
#define BLARGG_BIG_ENDIAN 1
#elif !defined (__mips__)

View file

@ -21,7 +21,7 @@
/* Endian detection */
#if defined(__i386__) || defined(__amd64__) || defined(_M_IX86) || defined(_M_AMD64)
#if defined(__i386__) || defined(__amd64__) || defined(_M_IX86) || defined(_M_AMD64) || defined(__LITTLE_ENDIAN__)
#define ARCH_LSB
#elif defined(__powerpc__) || defined(_M_PPC) || defined(__BIG_ENDIAN__)
#define ARCH_MSB