Use only MSB_FIRST for indicating big-endianness now

This commit is contained in:
twinaphex 2015-07-29 18:58:26 +02:00
parent f78d823431
commit 22287cb415
3 changed files with 19 additions and 25 deletions

View File

@ -50,7 +50,7 @@ else ifeq ($(platform), osx)
LDFLAGS += $(PTHREAD_FLAGS)
FLAGS += $(PTHREAD_FLAGS) -DHAVE_MKDIR
ifeq ($(arch),ppc)
ENDIANNESS_DEFINES := -DMSB_FIRST -DBYTE_ORDER=BIG_ENDIAN
ENDIANNESS_DEFINES := -DMSB_FIRST
OLD_GCC := 1
else
endif
@ -102,7 +102,7 @@ else ifeq ($(platform), ps3)
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
ENDIANNESS_DEFINES := -DMSB_FIRST -DBYTE_ORDER=BIG_ENDIAN
ENDIANNESS_DEFINES := -DMSB_FIRST
OLD_GCC := 1
FLAGS += -DHAVE_MKDIR -DARCH_POWERPC_ALTIVEC
STATIC_LINKING = 1
@ -111,7 +111,7 @@ else ifeq ($(platform), sncps3)
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
ENDIANNESS_DEFINES := -DMSB_FIRST -DBYTE_ORDER=BIG_ENDIAN
ENDIANNESS_DEFINES := -DMSB_FIRST
CXXFLAGS += -Xc+=exceptions
OLD_GCC := 1
NO_GCC := 1
@ -122,8 +122,8 @@ else ifeq ($(platform), psl1ght)
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
CXX = $(PS3DEV)/ppu/bin/ppu-g++$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
ENDIANNESS_DEFINES := -DMSB_FIRST -DBYTE_ORDER=BIG_ENDIAN
FLAGS += -DHAVE_MKDIR -DBYTE_ORDER=BIG_ENDIAN
ENDIANNESS_DEFINES := -DMSB_FIRST
FLAGS += -DHAVE_MKDIR
STATIC_LINKING = 1
else ifeq ($(platform), psp1)
TARGET := $(TARGET_NAME)_psp1.a
@ -139,7 +139,7 @@ else ifeq ($(platform), xenon)
CC = xenon-gcc$(EXE_EXT)
CXX = xenon-g++$(EXE_EXT)
AR = xenon-ar$(EXE_EXT)
ENDIANNESS_DEFINES += -D__LIBXENON__ -m32 -D__ppc__ -DMSB_FIRST -DBYTE_ORDER=BIG_ENDIAN
ENDIANNESS_DEFINES += -D__LIBXENON__ -m32 -D__ppc__ -DMSB_FIRST
LIBS := $(PTHREAD_FLAGS)
FLAGS += -DHAVE_MKDIR
STATIC_LINKING = 1
@ -148,7 +148,7 @@ else ifeq ($(platform), ngc)
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
ENDIANNESS_DEFINES += -DGEKKO -DHW_DOL -mrvl -mcpu=750 -meabi -mhard-float -DMSB_FIRST -DBYTE_ORDER=BIG_ENDIAN
ENDIANNESS_DEFINES += -DGEKKO -DHW_DOL -mrvl -mcpu=750 -meabi -mhard-float -DMSB_FIRST
EXTRA_INCLUDES := -I$(DEVKITPRO)/libogc/include
FLAGS += -DHAVE_MKDIR
@ -158,7 +158,7 @@ else ifeq ($(platform), wii)
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
ENDIANNESS_DEFINES += -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -DMSB_FIRST -DBYTE_ORDER=BIG_ENDIAN
ENDIANNESS_DEFINES += -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -DMSB_FIRST
EXTRA_INCLUDES := -I$(DEVKITPRO)/libogc/include
FLAGS += -DHAVE_MKDIR

View File

@ -41,25 +41,20 @@
#include <sys/types.h>
#endif
#if BYTE_ORDER==LITTLE_ENDIAN
union magic {
struct {
union magic
{
struct
{
#ifdef MSB_FIRST
ogg_int32_t hi;
ogg_int32_t lo;
#else
ogg_int32_t lo;
ogg_int32_t hi;
#endif
} halves;
ogg_int64_t whole;
};
#endif
#if BYTE_ORDER==BIG_ENDIAN
union magic {
struct {
ogg_int32_t hi;
ogg_int32_t lo;
} halves;
ogg_int64_t whole;
};
#endif
STIN ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) {
union magic magic;

View File

@ -42,7 +42,6 @@
# define NO_FLOAT_MATH_LIB
# define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
# define LITTLE_ENDIAN 1
# define BYTE_ORDER LITTLE_ENDIAN
#endif
#ifdef HAVE_ALLOCA_H