From 9a5f4602ccffb82a0e5a252f8a3fdbfd909784f1 Mon Sep 17 00:00:00 2001 From: Autechre Date: Sat, 4 Sep 2021 00:25:21 +0200 Subject: [PATCH] Add intrinsic NEON versions for float_to_s16/s16_to_float (#12933) * Add intrinsic NEON versions for float_to_s16/s16_to_float courtesy of davidgfnet * Define -DDONT_WANT_ARM_OPTIMIZATIONS for resampler sinc - this should default to intrinsic versions * Default to ARM NEON intrinsic codepath and make the ASM codepaths optional by defining HAVE_ARM_NEON_ASM_OPTIMIZATIONS * (Pkg/apple/Android) Take out ASM files being compiled in --- Makefile.common | 2 - audio/drivers_resampler/cc_resampler.c | 6 - gfx/video_filters/Makefile | 2 - .../audio/conversion/float_to_s16.c | 130 ++++++++++-------- .../audio/conversion/float_to_s16_neon.S | 2 +- .../audio/conversion/float_to_s16_neon.c | 2 +- .../audio/conversion/s16_to_float.c | 107 +++++++------- .../audio/conversion/s16_to_float_neon.S | 2 +- .../audio/conversion/s16_to_float_neon.c | 2 +- libretro-common/audio/dsp_filters/Makefile | 2 - .../audio/resampler/drivers/sinc_resampler.c | 120 ++++++++-------- .../resampler/drivers/sinc_resampler_neon.S | 2 +- .../include/audio/conversion/float_to_s16.h | 2 +- .../include/audio/conversion/s16_to_float.h | 2 +- pkg/android/phoenix-common/jni/Android.mk | 4 - .../msvc-2017-android.NativeActivity.vcxproj | 16 +-- pkg/apple/RetroArch.xcodeproj/project.pbxproj | 2 - .../RetroArch_Metal.xcodeproj/project.pbxproj | 2 - .../RetroArch_iOS10.xcodeproj/project.pbxproj | 5 - .../project.pbxproj | 5 - .../RetroArch_iOS11.xcodeproj/project.pbxproj | 6 - .../project.pbxproj | 7 - .../project.pbxproj | 5 - .../RetroArch_iOS6.xcodeproj/project.pbxproj | 36 +---- .../RetroArch_iOS8.xcodeproj/project.pbxproj | 36 +---- .../RetroArch_iOS9.xcodeproj/project.pbxproj | 36 +---- pkg/apple/iOS/Makefile | 5 +- pkg/qnx/.cproject | 80 ----------- pkg/qnx/.project | 20 --- 29 files changed, 221 insertions(+), 427 deletions(-) diff --git a/Makefile.common b/Makefile.common index e451af50fa..6b2c846898 100644 --- a/Makefile.common +++ b/Makefile.common @@ -134,7 +134,6 @@ ifneq ($(findstring Darwin,$(OS)),) MINVERFLAGS= ifeq ($(shell uname -p),arm) MINVERFLAGS = -mmacosx-version-min=10.15 -stdlib=libc++ # macOS (Metal, ARM 64bit) - MINVERFLAGS += -DDONT_WANT_ARM_ASM_OPTIMIZATIONS else ifeq ($(HAVE_METAL),1) MINVERFLAGS = -mmacosx-version-min=10.13 -stdlib=libc++ # macOS (Metal, x86 64bit) else ifeq ($(shell uname -p),powerpc) @@ -148,7 +147,6 @@ ifneq ($(findstring Darwin,$(OS)),) # Build for a specific architecture when ARCH is defined as a switch ifeq ($(ARCH),arm64) MINVERFLAGS = -mmacosx-version-min=10.15 -stdlib=libc++ # macOS (Metal, ARM 64bit) - MINVERFLAGS += -DDONT_WANT_ARM_ASM_OPTIMIZATIONS ARCHFLAGS = -arch arm64 else ifeq ($(ARCH),x86_64) ifeq ($(HAVE_METAL),1) diff --git a/audio/drivers_resampler/cc_resampler.c b/audio/drivers_resampler/cc_resampler.c index 2063983a4e..a6d7747806 100644 --- a/audio/drivers_resampler/cc_resampler.c +++ b/audio/drivers_resampler/cc_resampler.c @@ -29,12 +29,6 @@ #include