From eeeff89a2c8df93fbb57db7f7770451160699e73 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 10 Dec 2014 21:12:45 +0100 Subject: (Android) Works now with dynarec --- cpu_threaded.c | 16 +++++++++++++++- jni/Android.mk | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/cpu_threaded.c b/cpu_threaded.c index c90bb76..3526dc1 100644 --- a/cpu_threaded.c +++ b/cpu_threaded.c @@ -23,13 +23,27 @@ #include "common.h" -#ifdef HAVE_MMAP +#if defined(HAVE_MMAP) u8* rom_translation_cache; u8* ram_translation_cache; u8* bios_translation_cache; u8 *rom_translation_ptr; u8 *ram_translation_ptr; u8 *bios_translation_ptr; +#elif defined(ANDROID) +__asm__(".section .jit,\"awx\",%progbits"); + +u8 rom_translation_cache[ROM_TRANSLATION_CACHE_SIZE] + __attribute__ ((aligned(4),section(".jit"))); +u8 *rom_translation_ptr = rom_translation_cache; + +u8 ram_translation_cache[RAM_TRANSLATION_CACHE_SIZE] + __attribute__ ((aligned(4),section(".jit"))); +u8 *ram_translation_ptr = ram_translation_cache; + +u8 bios_translation_cache[BIOS_TRANSLATION_CACHE_SIZE] + __attribute__ ((aligned(4),section(".jit"))); +u8 *bios_translation_ptr = bios_translation_cache; #else u8 rom_translation_cache[ROM_TRANSLATION_CACHE_SIZE]; u8 ram_translation_cache[RAM_TRANSLATION_CACHE_SIZE]; diff --git a/jni/Android.mk b/jni/Android.mk index be588b8..fd7be21 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -38,6 +38,6 @@ endif include $(CORE_DIR)/Makefile.common LOCAL_SRC_FILES := $(SOURCES_C) $(SOURCES_ASM) -LOCAL_CFLAGS += -O2 -DHAVE_MMAP -DNDEBUG -DINLINE=inline -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 $(INCFLAGS) +LOCAL_CFLAGS += -O2 -DNDEBUG -DINLINE=inline -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 $(INCFLAGS) include $(BUILD_SHARED_LIBRARY) -- cgit v1.2.3