ifeq "$(ARCH)" "arm"
OBJS += libpcsxcore/gte_arm.o
endif
-ifeq "$(HAVE_NEON)" "1"
+ifeq "$(HAVE_NEON_ASM)" "1"
OBJS += libpcsxcore/gte_neon.o
endif
libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
ifeq "$(BUILTIN_GPU)" "neon"
CFLAGS += -DGPU_NEON
OBJS += plugins/gpu_neon/psx_gpu_if.o
-ifeq "$(HAVE_NEON)" "1"
-OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o
plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
-else
-plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
-endif
plugins/gpu_neon/psx_gpu_if.o: plugins/gpu_neon/psx_gpu/*.c
+frontend/menu.o frontend/plugin_lib.o: CFLAGS += -DBUILTIN_GPU_NEON
+ ifeq "$(HAVE_NEON_ASM)" "1"
+ OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o
+ else
+ OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_simd.o
+ plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DSIMD_BUILD
+ plugins/gpu_neon/psx_gpu/psx_gpu_simd.o: CFLAGS += -DSIMD_BUILD
+ endif
endif
ifeq "$(BUILTIN_GPU)" "peops"
CFLAGS += -DGPU_PEOPS
# frontend/gui
OBJS += frontend/cspace.o
-ifeq "$(HAVE_NEON)" "1"
+ifeq "$(HAVE_NEON_ASM)" "1"
OBJS += frontend/cspace_neon.o
+frontend/cspace.o: CFLAGS += -DHAVE_bgr555_to_rgb565 -DHAVE_bgr888_to_x
else
ifeq "$(ARCH)" "arm"
OBJS += frontend/cspace_arm.o
+frontend/cspace.o: CFLAGS += -DHAVE_bgr555_to_rgb565
endif
endif
OBJS += frontend/libpicofe/linux/plat.o
OBJS += frontend/libpicofe/readpng.o frontend/libpicofe/fonts.o
frontend/libpicofe/linux/plat.o: CFLAGS += -DNO_HOME_DIR
-ifeq "$(HAVE_NEON)" "1"
+ifeq "$(HAVE_NEON_ASM)" "1"
OBJS += frontend/libpicofe/arm/neon_scale2x.o
OBJS += frontend/libpicofe/arm/neon_eagle2x.o
frontend/libpicofe/arm/neon_scale2x.o: CFLAGS += -DDO_BGR_TO_RGB
have_armv6=""
have_armv7=""
have_arm_neon=""
+have_arm_neon_asm=""
have_tslib=""
have_gles=""
have_c64x_dsp=""
fi
if [ "x$have_arm_neon" = "x" ]; then
- # detect NEON from user-supplied cflags to enable asm code
+ # detect NEON from user-supplied cflags to enable neon code
have_arm_neon=`check_define __ARM_NEON__ && echo yes` || true
fi
if [ "x$have_armv7" = "x" ]; then
echo "You probably want to specify -mcpu= or -march= like this:"
echo " CFLAGS=-march=armv7-a ./configure ..."
fi
+ have_arm_neon_asm=$have_arm_neon
;;
aarch64)
+ have_arm_neon="yes"
+ have_arm_neon_asm="no"
+ if [ "x$builtin_gpu" = "x" ]; then
+ builtin_gpu="neon"
+ fi
;;
*)
# dynarec only available on ARM
test "x$have_armv6" != "x" || have_armv6="no"
test "x$have_armv7" != "x" || have_armv7="no"
test "x$have_arm_neon" != "x" || have_arm_neon="no"
+test "x$have_arm_neon_asm" != "x" || have_arm_neon_asm="no"
test "x$have_gles" != "x" || have_gles="no"
test "x$have_c64x_dsp" != "x" || have_c64x_dsp="no"
echo "libraries $MAIN_LDLIBS"
echo "linker flags $LDFLAGS$MAIN_LDFLAGS"
echo "enable dynarec $enable_dynarec"
+if [ "$ARCH" = "arm" -o "$ARCH" = "aarch64" ]; then
+ echo "enable ARM NEON $have_arm_neon"
+fi
if [ "$ARCH" = "arm" ]; then
echo "ARMv7 optimizations $have_armv7"
- echo "enable ARM NEON $have_arm_neon"
echo "TI C64x DSP support $have_c64x_dsp"
fi
echo "tslib support $have_tslib"
if [ "$have_arm_neon" = "yes" ]; then
echo "HAVE_NEON = 1" >> $config_mak
fi
+if [ "$have_arm_neon_asm" = "yes" ]; then
+ echo "HAVE_NEON_ASM = 1" >> $config_mak
+fi
if [ "$have_tslib" = "yes" ]; then
echo "HAVE_TSLIB = 1" >> $config_mak
fi
#define LE16TOHx2(x) (x)
#endif
-#ifndef __arm__
+#ifndef HAVE_bgr555_to_rgb565
void bgr555_to_rgb565(void *dst_, const void *src_, int bytes)
{
#endif
-#if defined(__arm64__) || !defined(__ARM_NEON__)
+#ifndef HAVE_bgr888_to_x
void bgr888_to_rgb565(void *dst_, const void *src_, int bytes)
{
// ------------ bios/plugins ------------
-#ifdef __ARM_NEON__
+#ifdef BUILTIN_GPU_NEON
static const char h_gpu_neon[] =
"Configure built-in NEON GPU plugin";
"savestates and can't be changed there. Must save\n"
"config and reload the game for change to take effect";
static const char h_plugin_gpu[] =
-#ifdef __ARM_NEON__
+#ifdef BUILTIN_GPU_NEON
"builtin_gpu is the NEON GPU, very fast and accurate\n"
#endif
"gpu_peops is Pete's soft GPU, slow but accurate\n"
mee_enum_h ("BIOS", 0, bios_sel, bioses, h_bios),
mee_enum_h ("GPU plugin", 0, gpu_plugsel, gpu_plugins, h_plugin_gpu),
mee_enum_h ("SPU plugin", 0, spu_plugsel, spu_plugins, h_plugin_spu),
-#ifdef __ARM_NEON__
+#ifdef BUILTIN_GPU_NEON
mee_handler_h ("Configure built-in GPU plugin", menu_loop_plugin_gpu_neon, h_gpu_neon),
#endif
mee_handler_h ("Configure gpu_peops plugin", menu_loop_plugin_gpu_peops, h_gpu_peops),
"(C) 2005-2009 PCSX-df Team\n"
"(C) 2009-2011 PCSX-Reloaded Team\n\n"
"ARM recompiler (C) 2009-2011 Ari64\n"
-#ifdef __ARM_NEON__
+#ifdef BUILTIN_GPU_NEON
"ARM NEON GPU (c) 2011-2012 Exophase\n"
#endif
"PEOpS GPU and SPU by Pete Bernert\n"
return 1;
}
-#ifdef __ARM_NEON__
+#ifdef BUILTIN_GPU_NEON
static int dispmode_doubleres(void)
{
if (!(pl_rearmed_cbs.gpu_caps & GPU_CAP_SUPPORTS_2X)
snprintf(hud_msg, sizeof(hud_msg), "double resolution");
return 1;
}
+#endif
+#ifdef __ARM_NEON__
static int dispmode_scale2x(void)
{
if (!resolution_ok(psx_w * 2, psx_h * 2) || psx_bpp != 16)
static int (*dispmode_switchers[])(void) = {
dispmode_default,
-#ifdef __ARM_NEON__
+#ifdef BUILTIN_GPU_NEON
dispmode_doubleres,
+#endif
+#ifdef __ARM_NEON__
dispmode_scale2x,
dispmode_eagle2x,
#endif
SRC += psx_gpu_if.c
CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
-ifeq "$(HAVE_NEON)" "1"
-SRC += psx_gpu/psx_gpu_arm_neon.S
CFLAGS += -DNEON_BUILD
+ifeq "$(HAVE_NEON)" "1"
+ ifeq "$(HAVE_NEON_ASM)" "1"
+ SRC += psx_gpu/psx_gpu_arm_neon.S
+ else
+ OBJS += psx_gpu/psx_gpu_simd.c
+ CFLAGS += -DSIMD_BUILD
+ endif
else
CFLAGS += -fno-strict-aliasing
endif