From 56dc6ecb70e6fc76d32d6a7194acb273b76bfe0e Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Mon, 8 Mar 2021 18:44:03 +0100 Subject: Remove libco This removes libco and all the usages of it (+pthreads). Rewired all dynarecs and interpreter to return after every frame so that libretro can process events. This required to make dynarec re-entrant. Dynarecs were updated to check for new frame on every update (IRQ, cycle exhaustion, I/O write, etc). The performance impact of doing so should be minimal (and definitely outweight the libco gains). While at it, fixed small issues to get a bit more perf: arm dynarec was not idling correctly, mips was using stack when not needed, etc. Tested on PSP (mips), OGA (armv7), Linux (x86 and interpreter). Not tested on Android though. --- jni/Android.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'jni/Android.mk') diff --git a/jni/Android.mk b/jni/Android.mk index 27e43ac..dc86e69 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -5,9 +5,8 @@ CORE_DIR := $(LOCAL_PATH)/.. CORE_LDLIBS := CPU_ARCH := HAVE_DYNAREC := -USE_LIBCO := 1 -COREFLAGS := -DINLINE=inline -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 -DUSE_LIBCO +COREFLAGS := -DINLINE=inline -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 ifeq ($(TARGET_ARCH),arm) COREFLAGS += -DARM_ARCH -DARM_MEMORY_DYNAREC -- cgit v1.2.3 From 0522d9a4f535a61953da64518097fc7f64d7120c Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Tue, 9 Mar 2021 19:29:18 +0100 Subject: Add workaround for Android ARM builds While we are at it, use ARM mode for better performance. --- jni/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'jni/Android.mk') diff --git a/jni/Android.mk b/jni/Android.mk index dc86e69..92f8929 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -36,4 +36,5 @@ LOCAL_SRC_FILES := $(SOURCES_C) $(SOURCES_ASM) LOCAL_CFLAGS := $(COREFLAGS) $(INCFLAGS) LOCAL_LDFLAGS := -Wl,-version-script=$(CORE_DIR)/link.T LOCAL_LDLIBS := $(CORE_LDLIBS) +LOCAL_ARM_MODE := arm include $(BUILD_SHARED_LIBRARY) -- cgit v1.2.3