Unlike GCC, clang defines __ARM_NEON__ for all CPUs it expects it to
have, even without forcing NEON as FPU. Consistently use HAVE_NEON.
This commit is contained in:
parent
9b24fcd2ff
commit
f27a45ce7d
6 changed files with 116 additions and 1 deletions
|
@ -1,9 +1,14 @@
|
|||
$NetBSD: distinfo,v 1.2 2015/02/05 16:46:17 wiz Exp $
|
||||
$NetBSD: distinfo,v 1.3 2015/04/21 17:18:01 joerg Exp $
|
||||
|
||||
SHA1 (retroarch-20150203.zip) = 46f9493f3ab09fd185345e6bab797c4e882c5262
|
||||
RMD160 (retroarch-20150203.zip) = 76c4ae4f7edb5c866f606cb23e5550a5b7c285b4
|
||||
Size (retroarch-20150203.zip) = 10043939 bytes
|
||||
SHA1 (patch-Makefile) = 41a8de7bc2d992cae1799935c5d3a61774c6be88
|
||||
SHA1 (patch-Makefile.common) = 3a2157e04dfacadc48f421106760b0194586677e
|
||||
SHA1 (patch-audio_audio__utils.c) = a489e8862d10e8dde77a7d22becafb690fb61f89
|
||||
SHA1 (patch-audio_audio__utils.h) = e6cb0d7897eee6908d62bb46a98d7a28398d9e14
|
||||
SHA1 (patch-audio_drivers__resampler_cc__resampler.c) = 2ec89750a7bad2eb4b799d389d0e995b316ccd82
|
||||
SHA1 (patch-audio_drivers__resampler_sinc.c) = 5747731b8aec14b6a5e1359e80698f121fe9f337
|
||||
SHA1 (patch-performance.c) = 1881d32968babc58686c88bfdeb021d18a222fe8
|
||||
SHA1 (patch-qb_config.libs.sh) = 4eccb74e9f31d0f8ff3eeb6c6ded03ac148b2808
|
||||
SHA1 (patch-qb_qb.libs.sh) = 00689ff9d4b6afc9313938e2921e90f01640420f
|
||||
|
|
22
emulators/retroarch/patches/patch-audio_audio__utils.c
Normal file
22
emulators/retroarch/patches/patch-audio_audio__utils.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-audio_audio__utils.c,v 1.1 2015/04/21 17:18:01 joerg Exp $
|
||||
|
||||
--- audio/audio_utils.c.orig 2015-04-17 14:35:27.000000000 +0000
|
||||
+++ audio/audio_utils.c
|
||||
@@ -216,7 +216,7 @@ void audio_convert_float_to_s16_altivec(
|
||||
}
|
||||
audio_convert_float_to_s16_C(out, in, samples_in);
|
||||
}
|
||||
-#elif defined(__ARM_NEON__)
|
||||
+#elif defined(HAVE_NEON)
|
||||
/* Avoid potential hard-float/soft-float ABI issues. */
|
||||
void audio_convert_s16_float_asm(float *out, const int16_t *in,
|
||||
size_t samples, const float *gain);
|
||||
@@ -402,7 +402,7 @@ void audio_convert_float_to_s16_ALLEGREX
|
||||
**/
|
||||
void audio_convert_init_simd(void)
|
||||
{
|
||||
-#if defined(__ARM_NEON__)
|
||||
+#if defined(HAVE_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;
|
13
emulators/retroarch/patches/patch-audio_audio__utils.h
Normal file
13
emulators/retroarch/patches/patch-audio_audio__utils.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-audio_audio__utils.h,v 1.1 2015/04/21 17:18:01 joerg Exp $
|
||||
|
||||
--- audio/audio_utils.h.orig 2015-04-17 14:35:56.000000000 +0000
|
||||
+++ audio/audio_utils.h
|
||||
@@ -93,7 +93,7 @@ void audio_convert_s16_to_float_altivec(
|
||||
void audio_convert_float_to_s16_altivec(int16_t *out,
|
||||
const float *in, size_t samples);
|
||||
|
||||
-#elif defined(__ARM_NEON__)
|
||||
+#elif defined(HAVE_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
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-audio_drivers__resampler_cc__resampler.c,v 1.1 2015/04/21 17:18:01 joerg Exp $
|
||||
|
||||
--- audio/drivers_resampler/cc_resampler.c.orig 2015-04-17 14:34:27.000000000 +0000
|
||||
+++ audio/drivers_resampler/cc_resampler.c
|
||||
@@ -388,7 +388,7 @@ static void resampler_CC_upsample(void *
|
||||
}
|
||||
|
||||
|
||||
-#elif defined (__ARM_NEON__)
|
||||
+#elif defined (HAVE_NEON)
|
||||
|
||||
#define CC_RESAMPLER_IDENT "NEON"
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
$NetBSD: patch-audio_drivers__resampler_sinc.c,v 1.1 2015/04/21 17:18:01 joerg Exp $
|
||||
|
||||
--- audio/drivers_resampler/sinc.c.orig 2015-02-03 06:43:44.000000000 +0000
|
||||
+++ audio/drivers_resampler/sinc.c
|
||||
@@ -399,7 +399,7 @@ static void process_sinc(rarch_sinc_resa
|
||||
/* movehl { X, R, X, L } == { X, R, X, R } */
|
||||
_mm_store_ss(out_buffer + 1, _mm_movehl_ps(sum, sum));
|
||||
}
|
||||
-#elif defined(__ARM_NEON__)
|
||||
+#elif defined(HAVE_NEON)
|
||||
|
||||
#if SINC_COEFF_LERP
|
||||
#error "NEON asm does not support SINC lerp."
|
||||
@@ -504,7 +504,7 @@ static void *resampler_sinc_new(const st
|
||||
}
|
||||
|
||||
/* Be SIMD-friendly. */
|
||||
-#if (defined(__AVX__) && ENABLE_AVX) || defined(__ARM_NEON__)
|
||||
+#if (defined(__AVX__) && ENABLE_AVX) || defined(HAVE_NEON)
|
||||
re->taps = (re->taps + 7) & ~7;
|
||||
#else
|
||||
re->taps = (re->taps + 3) & ~3;
|
||||
@@ -532,7 +532,7 @@ static void *resampler_sinc_new(const st
|
||||
RARCH_LOG("Sinc resampler [AVX]\n");
|
||||
#elif defined(__SSE__)
|
||||
RARCH_LOG("Sinc resampler [SSE]\n");
|
||||
-#elif defined(__ARM_NEON__)
|
||||
+#elif defined(HAVE_NEON)
|
||||
process_sinc_func = mask & RESAMPLER_SIMD_NEON
|
||||
? process_sinc_neon : process_sinc_C;
|
||||
RARCH_LOG("Sinc resampler [%s]\n",
|
31
emulators/retroarch/patches/patch-performance.c
Normal file
31
emulators/retroarch/patches/patch-performance.c
Normal file
|
@ -0,0 +1,31 @@
|
|||
$NetBSD: patch-performance.c,v 1.1 2015/04/21 17:18:01 joerg Exp $
|
||||
|
||||
--- performance.c.orig 2015-04-17 14:36:16.000000000 +0000
|
||||
+++ performance.c
|
||||
@@ -306,7 +306,7 @@ static uint64_t xgetbv_x86(uint32_t idx)
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(__ARM_NEON__)
|
||||
+#if defined(HAVE_NEON)
|
||||
static void arm_enable_runfast_mode(void)
|
||||
{
|
||||
/* RunFast mode. Enables flush-to-zero and some
|
||||
@@ -464,7 +464,7 @@ uint64_t rarch_get_cpu_features(void)
|
||||
uint64_t cpu_flags = android_getCpuFeatures();
|
||||
(void)cpu_flags;
|
||||
|
||||
-#ifdef __ARM_NEON__
|
||||
+#ifdef HAVE_NEON
|
||||
if (cpu_flags & ANDROID_CPU_ARM_FEATURE_NEON)
|
||||
{
|
||||
cpu |= RETRO_SIMD_NEON;
|
||||
@@ -472,7 +472,7 @@ uint64_t rarch_get_cpu_features(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
-#elif defined(__ARM_NEON__)
|
||||
+#elif defined(HAVE_NEON)
|
||||
cpu |= RETRO_SIMD_NEON;
|
||||
arm_enable_runfast_mode();
|
||||
#elif defined(__ALTIVEC__)
|
Loading…
Reference in a new issue