Use __ARM_NEON__ define instead of HAVE_NEON

This commit is contained in:
twinaphex 2014-07-26 20:18:37 +02:00
parent 57868cbf41
commit fbb0b57cae
15 changed files with 15 additions and 43 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)";

View File

@ -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");

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#if defined(__ARM_NEON__) || defined(HAVE_NEON)
#if defined(__ARM_NEON__)
#ifndef __MACH__
.arm

View File

@ -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;

View File

@ -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
#endif

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#if defined(__ARM_NEON__) || defined(HAVE_NEON)
#if defined(__ARM_NEON__)
#ifndef __MACH__
.arm

View File

@ -33,7 +33,6 @@
<listOptionValue builtIn="false" value="HAVE_ALSA"/>
<listOptionValue builtIn="false" value="RARCH_INTERNAL"/>
<listOptionValue builtIn="false" value="HAVE_CC_RESAMPLER"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="HAVE_RGUI"/>
<listOptionValue builtIn="false" value="HAVE_MENU"/>
<listOptionValue builtIn="false" value="RARCH_MOBILE"/>
@ -153,7 +152,6 @@
<listOptionValue builtIn="false" value="HAVE_ALSA"/>
<listOptionValue builtIn="false" value="RARCH_INTERNAL"/>
<listOptionValue builtIn="false" value="HAVE_CC_RESAMPLER"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="HAVE_RGUI"/>
<listOptionValue builtIn="false" value="HAVE_MENU"/>
<listOptionValue builtIn="false" value="RARCH_MOBILE"/>
@ -275,7 +273,6 @@
<listOptionValue builtIn="false" value="HAVE_ALSA"/>
<listOptionValue builtIn="false" value="RARCH_INTERNAL"/>
<listOptionValue builtIn="false" value="HAVE_CC_RESAMPLER"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="HAVE_RGUI"/>
<listOptionValue builtIn="false" value="HAVE_MENU"/>
<listOptionValue builtIn="false" value="RARCH_MOBILE"/>
@ -398,7 +395,6 @@
<listOptionValue builtIn="false" value="HAVE_ALSA"/>
<listOptionValue builtIn="false" value="RARCH_INTERNAL"/>
<listOptionValue builtIn="false" value="HAVE_CC_RESAMPLER"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="HAVE_RGUI"/>
<listOptionValue builtIn="false" value="HAVE_MENU"/>
<listOptionValue builtIn="false" value="RARCH_MOBILE"/>
@ -519,7 +515,6 @@
<listOptionValue builtIn="false" value="HAVE_ALSA"/>
<listOptionValue builtIn="false" value="RARCH_INTERNAL"/>
<listOptionValue builtIn="false" value="HAVE_CC_RESAMPLER"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="HAVE_RGUI"/>
<listOptionValue builtIn="false" value="HAVE_MENU"/>
<listOptionValue builtIn="false" value="RARCH_MOBILE"/>
@ -640,7 +635,6 @@
<listOptionValue builtIn="false" value="HAVE_ALSA"/>
<listOptionValue builtIn="false" value="RARCH_INTERNAL"/>
<listOptionValue builtIn="false" value="HAVE_CC_RESAMPLER"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="HAVE_RGUI"/>
<listOptionValue builtIn="false" value="HAVE_MENU"/>
<listOptionValue builtIn="false" value="RARCH_MOBILE"/>
@ -762,7 +756,6 @@
<listOptionValue builtIn="false" value="HAVE_ALSA"/>
<listOptionValue builtIn="false" value="RARCH_INTERNAL"/>
<listOptionValue builtIn="false" value="HAVE_CC_RESAMPLER"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="HAVE_RGUI"/>
<listOptionValue builtIn="false" value="HAVE_MENU"/>
<listOptionValue builtIn="false" value="RARCH_MOBILE"/>

View File

@ -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 \

View File

@ -36,7 +36,6 @@
<listOptionValue builtIn="false" value="HAVE_ALSA"/>
<listOptionValue builtIn="false" value="HAVE_RGUI"/>
<listOptionValue builtIn="false" value="HAVE_MENU"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="RARCH_MOBILE"/>
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
@ -161,7 +160,6 @@
<listOptionValue builtIn="false" value="HAVE_ALSA"/>
<listOptionValue builtIn="false" value="HAVE_RGUI"/>
<listOptionValue builtIn="false" value="HAVE_MENU"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="RARCH_MOBILE"/>
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
@ -288,7 +286,6 @@
<listOptionValue builtIn="false" value="HAVE_ALSA"/>
<listOptionValue builtIn="false" value="HAVE_RGUI"/>
<listOptionValue builtIn="false" value="HAVE_MENU"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="RARCH_MOBILE"/>
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
@ -410,7 +407,6 @@
<listOptionValue builtIn="false" value="HAVE_ALSA"/>
<listOptionValue builtIn="false" value="HAVE_RGUI"/>
<listOptionValue builtIn="false" value="HAVE_MENU"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="RARCH_MOBILE"/>
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>

View File

@ -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

View File

@ -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));

View File

@ -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