diff --git a/Makefile b/Makefile index 080128a042..e31cece033 100644 --- a/Makefile +++ b/Makefile @@ -368,7 +368,7 @@ ifeq ($(HAVE_NEON),1) OBJ += audio/sinc_neon.o # When compiled without this, tries to attempt to compile sinc lerp, # which will error out - DEFINES += -DSINC_LOWER_QUALITY -DHAVE_NEON + DEFINES += -DSINC_LOWER_QUALITY endif OBJ += audio/utils.o diff --git a/Makefile.openpandora b/Makefile.openpandora index fd227f19fa..3e4f890bb6 100644 --- a/Makefile.openpandora +++ b/Makefile.openpandora @@ -15,7 +15,7 @@ LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL -DEFINES += -D__ARM_ARCH_6__ -DHAVE_NEON -DSINC_LOWER_QUALITY -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DWANT_RPNG -DWANT_MINIZ -DHAVE_OVERLAY -DHAVE_ALSA -DHAVE_ZLIB -D__linux__ +DEFINES += -D__ARM_ARCH_6__ -DSINC_LOWER_QUALITY -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DWANT_RPNG -DWANT_MINIZ -DHAVE_OVERLAY -DHAVE_ALSA -DHAVE_ZLIB -D__linux__ DEFINES += $(INCDIRS) DEFINES += -D__OPENPANDORA__ -DPANDORA DEFINES += -marm -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize diff --git a/android/phoenix/jni/Android.mk b/android/phoenix/jni/Android.mk index 64ca5af0c0..6d639d1c59 100644 --- a/android/phoenix/jni/Android.mk +++ b/android/phoenix/jni/Android.mk @@ -25,11 +25,7 @@ endif ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) ifeq ($(HAVE_NEON),1) - LOCAL_CFLAGS += -DHAVE_NEON LOCAL_SRC_FILES += $(RARCH_DIR)/audio/utils_neon.S.neon -endif - -ifeq ($(HAVE_NEON),1) LOCAL_SRC_FILES += $(RARCH_DIR)/audio/sinc_neon.S.neon endif LOCAL_CFLAGS += -DSINC_LOWER_QUALITY diff --git a/apple/iOS/RetroArch_iOS.xcodeproj/project.pbxproj b/apple/iOS/RetroArch_iOS.xcodeproj/project.pbxproj index 870113e3fe..fa4d2637c5 100644 --- a/apple/iOS/RetroArch_iOS.xcodeproj/project.pbxproj +++ b/apple/iOS/RetroArch_iOS.xcodeproj/project.pbxproj @@ -398,7 +398,6 @@ "-DHAVE_ZLIB", "-DWANT_MINIZ", "-DSINC_LOWER_QUALITY", - "-DHAVE_NEON", ); SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -453,7 +452,6 @@ "-DHAVE_ZLIB", "-DWANT_MINIZ", "-DSINC_LOWER_QUALITY", - "-DHAVE_NEON", ); SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -503,7 +501,6 @@ "-DWANT_MINIZ", "-DSINC_LOWER_QUALITY", "-DRARCH_INTERNAL", - "-DHAVE_NEON", "-DHAVE_THREADS", ); PRODUCT_NAME = "$(TARGET_NAME)"; @@ -555,7 +552,6 @@ "-DWANT_MINIZ", "-DSINC_LOWER_QUALITY", "-DRARCH_INTERNAL", - "-DHAVE_NEON", "-DHAVE_THREADS", ); "OTHER_CFLAGS[arch=*]" = ( @@ -584,7 +580,6 @@ "-DWANT_MINIZ", "-DSINC_LOWER_QUALITY", "-DRARCH_INTERNAL", - "-DHAVE_NEON", "-DHAVE_THREADS", ); PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/audio/sinc.c b/audio/sinc.c index cdc8f77ff8..8c986068f5 100644 --- a/audio/sinc.c +++ b/audio/sinc.c @@ -378,7 +378,7 @@ static void process_sinc(rarch_sinc_resampler_t *resamp, float *out_buffer) // movehl { X, R, X, L } == { X, R, X, R } _mm_store_ss(out_buffer + 1, _mm_movehl_ps(sum, sum)); } -#elif defined(HAVE_NEON) +#elif defined(__ARM_NEON__) #if SINC_COEFF_LERP #error "NEON asm does not support SINC lerp." @@ -472,7 +472,7 @@ static void *resampler_sinc_new(double bandwidth_mod) } // Be SIMD-friendly. -#if (defined(__AVX__) && ENABLE_AVX) || defined(HAVE_NEON) +#if (defined(__AVX__) && ENABLE_AVX) || defined(__ARM_NEON__) re->taps = (re->taps + 7) & ~7; #else re->taps = (re->taps + 3) & ~3; @@ -498,7 +498,7 @@ static void *resampler_sinc_new(double bandwidth_mod) RARCH_LOG("Sinc resampler [AVX]\n"); #elif defined(__SSE__) RARCH_LOG("Sinc resampler [SSE]\n"); -#elif defined(HAVE_NEON) +#elif defined(__ARM_NEON__) unsigned cpu = rarch_get_cpu_features(); process_sinc_func = cpu & RETRO_SIMD_NEON ? process_sinc_neon : process_sinc_C; RARCH_LOG("Sinc resampler [%s]\n", cpu & RETRO_SIMD_NEON ? "NEON" : "C"); diff --git a/audio/sinc_neon.S b/audio/sinc_neon.S index b1d1d45379..44e3924597 100644 --- a/audio/sinc_neon.S +++ b/audio/sinc_neon.S @@ -12,7 +12,7 @@ * You should have received a copy of the GNU General Public License along with RetroArch. * If not, see . */ -#if defined(__ARM_NEON__) || defined(HAVE_NEON) +#if defined(__ARM_NEON__) #ifndef __MACH__ .arm diff --git a/audio/utils.c b/audio/utils.c index 97e8090eac..13f3397882 100644 --- a/audio/utils.c +++ b/audio/utils.c @@ -140,7 +140,7 @@ void audio_convert_float_to_s16_altivec(int16_t *out, else audio_convert_float_to_s16_C(out, in, samples); } -#elif defined(HAVE_NEON) +#elif defined(__ARM_NEON__) void audio_convert_s16_float_asm(float *out, const int16_t *in, size_t samples, const float *gain); // Avoid potential hard-float/soft-float ABI issues. static void audio_convert_s16_to_float_neon(float *out, const int16_t *in, size_t samples, float gain) @@ -264,7 +264,7 @@ void audio_convert_float_to_s16_ALLEGREX(int16_t *out, void audio_convert_init_simd(void) { -#if defined HAVE_NEON +#if defined(__ARM_NEON__) unsigned cpu = rarch_get_cpu_features(); audio_convert_s16_to_float_arm = cpu & RETRO_SIMD_NEON ? audio_convert_s16_to_float_neon : audio_convert_s16_to_float_C; diff --git a/audio/utils.h b/audio/utils.h index 6904213e7c..14f8af7571 100644 --- a/audio/utils.h +++ b/audio/utils.h @@ -47,7 +47,7 @@ void audio_convert_s16_to_float_altivec(float *out, void audio_convert_float_to_s16_altivec(int16_t *out, const float *in, size_t samples); -#elif defined(HAVE_NEON) +#elif defined(__ARM_NEON__) #define audio_convert_s16_to_float audio_convert_s16_to_float_arm #define audio_convert_float_to_s16 audio_convert_float_to_s16_arm @@ -79,4 +79,4 @@ void audio_convert_init_simd(void); } #endif -#endif \ No newline at end of file +#endif diff --git a/audio/utils_neon.S b/audio/utils_neon.S index 3c6238034e..387ac655a0 100644 --- a/audio/utils_neon.S +++ b/audio/utils_neon.S @@ -12,7 +12,7 @@ * You should have received a copy of the GNU General Public License along with RetroArch. * If not, see . */ -#if defined(__ARM_NEON__) || defined(HAVE_NEON) +#if defined(__ARM_NEON__) #ifndef __MACH__ .arm diff --git a/blackberry-qnx/bb10/.cproject b/blackberry-qnx/bb10/.cproject index 375c5068cb..329bbefc41 100644 --- a/blackberry-qnx/bb10/.cproject +++ b/blackberry-qnx/bb10/.cproject @@ -33,7 +33,6 @@ - @@ -153,7 +152,6 @@ - @@ -275,7 +273,6 @@ - @@ -398,7 +395,6 @@ - @@ -519,7 +515,6 @@ - @@ -640,7 +635,6 @@ - @@ -762,7 +756,6 @@ - diff --git a/blackberry-qnx/cascades/RetroArch-Cascades.pro b/blackberry-qnx/cascades/RetroArch-Cascades.pro index 5e08d9a820..dec8fba502 100644 --- a/blackberry-qnx/cascades/RetroArch-Cascades.pro +++ b/blackberry-qnx/cascades/RetroArch-Cascades.pro @@ -5,7 +5,7 @@ CONFIG += qt warn_on cascades10 LIBS += -lscreen -lbps -lOpenAL -lpng -lEGL -lGLESv2 LIBS += -lbbcascadespickers -lbbdata -lbbdevice -DEFINES += HAVE_RGUI HAVE_MENU HAVE_NEON RARCH_MOBILE \ +DEFINES += HAVE_RGUI HAVE_MENU RARCH_MOBILE \ SINC_LOWER_QUALITY RARCH_INTERNAL \ HAVE_FBO HAVE_GRIFFIN __LIBRETRO__ \ HAVE_DYNAMIC HAVE_ZLIB HAVE_OPENGLES \ diff --git a/blackberry-qnx/playbook/.cproject b/blackberry-qnx/playbook/.cproject index 839b29e42d..63f0d4d72e 100644 --- a/blackberry-qnx/playbook/.cproject +++ b/blackberry-qnx/playbook/.cproject @@ -36,7 +36,6 @@ - @@ -161,7 +160,6 @@ - @@ -288,7 +286,6 @@ - @@ -410,7 +407,6 @@ - diff --git a/libretro-test-gl/Makefile b/libretro-test-gl/Makefile index 4c4b175d1b..3df614fba9 100644 --- a/libretro-test-gl/Makefile +++ b/libretro-test-gl/Makefile @@ -68,7 +68,6 @@ endif CFLAGS += -marm ifneq (,$(findstring neon,$(platform))) CFLAGS += -mfpu=neon - HAVE_NEON = 1 endif ifneq (,$(findstring softfloat,$(platform))) CFLAGS += -mfloat-abi=softfp diff --git a/performance.c b/performance.c index 1472237c9e..fa846fb182 100644 --- a/performance.c +++ b/performance.c @@ -284,8 +284,7 @@ static uint64_t xgetbv_x86(uint32_t index) } #endif -#if defined(HAVE_NEON) -/* TODO/FIX - does this work on iOS? */ +#if defined(__ARM_NEON__) static void arm_enable_runfast_mode(void) { // RunFast mode. Enables flush-to-zero and some floating point optimizations. @@ -424,7 +423,7 @@ uint64_t rarch_get_cpu_features(void) uint64_t cpu_flags = android_getCpuFeatures(); (void)cpu_flags; -#ifdef HAVE_NEON +#ifdef __ARM_NEON__ if (cpu_flags & ANDROID_CPU_ARM_FEATURE_NEON) { cpu |= RETRO_SIMD_NEON; @@ -433,7 +432,7 @@ uint64_t rarch_get_cpu_features(void) #endif RARCH_LOG("[CPUID]: NEON: %u\n", !!(cpu & RETRO_SIMD_NEON)); -#elif defined(HAVE_NEON) +#elif defined(__ARM_NEON__) cpu |= RETRO_SIMD_NEON; arm_enable_runfast_mode(); RARCH_LOG("[CPUID]: NEON: %u\n", !!(cpu & RETRO_SIMD_NEON)); diff --git a/performance.h b/performance.h index 6f297e3dc9..d799d6b58b 100644 --- a/performance.h +++ b/performance.h @@ -27,12 +27,6 @@ extern "C" { #endif -#ifdef __ARM_NEON__ -#ifndef HAVE_NEON -#define HAVE_NEON -#endif -#endif - #include "general.h" #define MAX_COUNTERS 64