summaryrefslogtreecommitdiff
path: root/emulators/retroarch/patches
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2015-04-21 17:18:01 +0000
committerjoerg <joerg@pkgsrc.org>2015-04-21 17:18:01 +0000
commit8fc91ff4e7afa75cc6d58fdf88539178c89bed18 (patch)
tree4fd0e7d40fc0963c147b6b7a6d0c23fd9ff0f562 /emulators/retroarch/patches
parent21cc5f2c338514d33bed9400ce8b050855443656 (diff)
downloadpkgsrc-8fc91ff4e7afa75cc6d58fdf88539178c89bed18.tar.gz
Unlike GCC, clang defines __ARM_NEON__ for all CPUs it expects it to
have, even without forcing NEON as FPU. Consistently use HAVE_NEON.
Diffstat (limited to 'emulators/retroarch/patches')
-rw-r--r--emulators/retroarch/patches/patch-audio_audio__utils.c22
-rw-r--r--emulators/retroarch/patches/patch-audio_audio__utils.h13
-rw-r--r--emulators/retroarch/patches/patch-audio_drivers__resampler_cc__resampler.c13
-rw-r--r--emulators/retroarch/patches/patch-audio_drivers__resampler_sinc.c31
-rw-r--r--emulators/retroarch/patches/patch-performance.c31
5 files changed, 110 insertions, 0 deletions
diff --git a/emulators/retroarch/patches/patch-audio_audio__utils.c b/emulators/retroarch/patches/patch-audio_audio__utils.c
new file mode 100644
index 00000000000..47a8568122d
--- /dev/null
+++ b/emulators/retroarch/patches/patch-audio_audio__utils.c
@@ -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;
diff --git a/emulators/retroarch/patches/patch-audio_audio__utils.h b/emulators/retroarch/patches/patch-audio_audio__utils.h
new file mode 100644
index 00000000000..4ba35b48694
--- /dev/null
+++ b/emulators/retroarch/patches/patch-audio_audio__utils.h
@@ -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
+
diff --git a/emulators/retroarch/patches/patch-audio_drivers__resampler_cc__resampler.c b/emulators/retroarch/patches/patch-audio_drivers__resampler_cc__resampler.c
new file mode 100644
index 00000000000..7f7a76a41e5
--- /dev/null
+++ b/emulators/retroarch/patches/patch-audio_drivers__resampler_cc__resampler.c
@@ -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"
+
diff --git a/emulators/retroarch/patches/patch-audio_drivers__resampler_sinc.c b/emulators/retroarch/patches/patch-audio_drivers__resampler_sinc.c
new file mode 100644
index 00000000000..b78a0261244
--- /dev/null
+++ b/emulators/retroarch/patches/patch-audio_drivers__resampler_sinc.c
@@ -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",
diff --git a/emulators/retroarch/patches/patch-performance.c b/emulators/retroarch/patches/patch-performance.c
new file mode 100644
index 00000000000..d661905f049
--- /dev/null
+++ b/emulators/retroarch/patches/patch-performance.c
@@ -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__)