Commit 77a05136 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Add ios-arm64/tvos-arm64/ios9 - update libretro-common audio conversion

parent f6678475
......@@ -43,6 +43,14 @@ include:
- project: 'libretro-infrastructure/ci-templates'
file: '/android-jni.yml'
# iOS
- project: 'libretro-infrastructure/ci-templates'
file: '/ios-arm64.yml'
# iOS (armv7)
- project: 'libretro-infrastructure/ci-templates'
file: '/ios9.yml'
################################## CONSOLES ################################
# PlayStation Vita
- project: 'libretro-infrastructure/ci-templates'
......@@ -56,6 +64,12 @@ include:
- project: 'libretro-infrastructure/ci-templates'
file: '/wii-static.yml'
# tvOS (AppleTV)
- project: 'libretro-infrastructure/ci-templates'
file: '/tvos-arm64.yml'
#################################### MISC ##################################
# Stages for building
stages:
- build-prepare
......@@ -128,6 +142,24 @@ android-x86:
- .libretro-android-jni-x86
- .core-defs
# iOS
libretro-build-ios-arm64:
extends:
- .libretro-ios-arm64-make-default
- .core-defs
# iOS (armv7) [iOS 9 and up]
libretro-build-ios9:
extends:
- .libretro-ios9-make-default
- .core-defs
# tvOS
libretro-build-tvos-arm64:
extends:
- .libretro-tvos-arm64-make-default
- .core-defs
################################### CONSOLES #################################
# Nintendo GameCube
libretro-build-ngc:
......
......@@ -67,7 +67,7 @@ else ifeq ($(platform), osx)
fpic := -fPIC
SHARED := -dynamiclib
LUA_SYSCFLAGS := -DLUA_USE_MACOSX
CFLAGS += -DHAVE_STRL
CFLAGS += -DHAVE_STRL -DDONT_WANT_ARM_OPTIMIZATIONS
WANT_PHYSFS=0
MMD :=
ifeq ($(UNIVERSAL),1)
......@@ -107,26 +107,47 @@ else ifneq (,$(findstring ios,$(platform)))
fpic := -fPIC
SHARED := -dynamiclib
DEFINES := -DIOS
CFLAGS += -DHAVE_STRL
CFLAGS += -DHAVE_STRL -DDONT_WANT_ARM_OPTIMIZATIONS
MINVERSION :=
ifeq ($(IOSSDK),)
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
endif
ifeq ($(platform),ios-arm64)
ifeq ($(platform),$(filter $(platform),ios9 ios-arm64))
CC = cc -arch arm64 -isysroot $(IOSSDK)
else
else
CC = cc -arch armv7 -isysroot $(IOSSDK)
endif
IPHONEMINVER :=
endif
ifeq ($(platform),ios9)
IPHONEMINVER = -miphoneos-version-min=8.0
MINVERSION = -miphoneos-version-min=8.0
else
IPHONEMINVER = -miphoneos-version-min=6.0
MINVERSION = -miphoneos-version-min=6.0
endif
LDFLAGS += $(IPHONEMINVER)
FLAGS += $(IPHONEMINVER)
CCFLAGS += $(IPHONEMINVER)
CXXFLAGS += $(IPHONEMINVER)
LDFLAGS += $(MINVERSION)
FLAGS += $(MINVERSION)
CFLAGS += $(MINVERSION)
CXXFLAGS += $(MINVERSION)
LUA_MYCFLAGS := $(MINVERSION)
WANT_PHYSFS=0
LUADEFINES = -DIOS
else ifeq ($(platform), tvos-arm64)
TARGET := $(TARGET_NAME)_libretro_tvos.dylib
fpic := -fPIC
SHARED := -dynamiclib
DEFINES := -DIOS
CFLAGS += -DHAVE_STRL -DDONT_WANT_ARM_OPTIMIZATIONS
MINVERSION :=
ifeq ($(IOSSDK),)
IOSSDK := $(shell xcodebuild -version -sdk appletvos Path)
endif
CC = cc -arch arm64 -isysroot $(IOSSDK)
LDFLAGS += $(MINVERSION)
FLAGS += $(MINVERSION)
CFLAGS += $(MINVERSION)
CXXFLAGS += $(MINVERSION)
LUA_MYCFLAGS := $(MINVERSION)
WANT_PHYSFS=0
LUADEFINES = -DIOS
else ifeq ($(platform), qnx)
TARGET := $(TARGET_NAME)_libretro_$(platform).so
......@@ -343,10 +364,6 @@ ifeq ($(platform), osx)
endif
endif
ifeq ($(platform),ios-arm64)
LUADEFINES = -DIOS
endif
OBJS := $(addprefix obj/,$(OBJS))
all: $(TARGET)
......
......@@ -31,7 +31,13 @@
#include <features/features_cpu.h>
#include <audio/conversion/float_to_s16.h>
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS) || defined(HAVE_NEON)
#ifndef HAVE_ARM_NEON_OPTIMIZATIONS
#define HAVE_ARM_NEON_OPTIMIZATIONS
#endif
#endif
#if defined(HAVE_ARM_NEON_OPTIMIZATIONS)
static bool float_to_s16_neon_enabled = false;
void convert_float_s16_asm(int16_t *out, const float *in, size_t samples);
#endif
......@@ -91,7 +97,7 @@ void convert_float_to_s16(int16_t *out,
samples = samples_in;
i = 0;
#elif defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#elif defined(HAVE_ARM_NEON_OPTIMIZATIONS)
if (float_to_s16_neon_enabled)
{
size_t aligned_samples = samples & ~7;
......@@ -151,7 +157,7 @@ void convert_float_to_s16(int16_t *out,
**/
void convert_float_to_s16_init_simd(void)
{
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#if defined(HAVE_ARM_NEON_OPTIMIZATIONS)
unsigned cpu = cpu_features_get();
if (cpu & RETRO_SIMD_NEON)
......
......@@ -19,7 +19,7 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if defined(__ARM_NEON__)
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#ifndef __MACH__
.arm
......
......@@ -19,7 +19,7 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if defined(__ARM_NEON__)
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#if defined(__thumb__)
#define DECL_ARMMODE(x) " .align 2\n" " .global " x "\n" " .thumb\n" " .thumb_func\n" " .type " x ", %function\n" x ":\n"
......
......@@ -29,7 +29,13 @@
#include <features/features_cpu.h>
#include <audio/conversion/s16_to_float.h>
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS) || defined(HAVE_NEON)
#ifndef HAVE_ARM_NEON_OPTIMIZATIONS
#define HAVE_ARM_NEON_OPTIMIZATIONS
#endif
#endif
#if defined(HAVE_ARM_NEON_OPTIMIZATIONS)
static bool s16_to_float_neon_enabled = false;
/* Avoid potential hard-float/soft-float ABI issues. */
......@@ -99,7 +105,7 @@ void convert_s16_to_float(float *out,
samples = samples_in;
i = 0;
#elif defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#elif defined(HAVE_ARM_NEON_OPTIMIZATIONS)
if (s16_to_float_neon_enabled)
{
size_t aligned_samples = samples & ~7;
......@@ -180,7 +186,7 @@ void convert_s16_to_float(float *out,
**/
void convert_s16_to_float_init_simd(void)
{
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#if defined(HAVE_ARM_NEON_OPTIMIZATIONS)
unsigned cpu = cpu_features_get();
if (cpu & RETRO_SIMD_NEON)
......
......@@ -19,7 +19,7 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if defined(__ARM_NEON__)
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#ifndef __MACH__
.arm
......
......@@ -19,7 +19,7 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if defined(__ARM_NEON__)
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#if defined(__thumb__)
#define DECL_ARMMODE(x) " .align 2\n" " .global " x "\n" " .thumb\n" " .thumb_func\n" " .type " x ", %function\n" x ":\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment