diff options
author | David Guillen Fandos | 2021-03-09 19:29:18 +0100 |
---|---|---|
committer | David Guillen Fandos | 2021-03-09 19:29:18 +0100 |
commit | 0522d9a4f535a61953da64518097fc7f64d7120c (patch) | |
tree | 8d1bd5bbe5dcee4b32b4dee9a2a6cd14ef7e66b8 | |
parent | 56dc6ecb70e6fc76d32d6a7194acb273b76bfe0e (diff) | |
download | picogpsp-0522d9a4f535a61953da64518097fc7f64d7120c.tar.gz picogpsp-0522d9a4f535a61953da64518097fc7f64d7120c.tar.bz2 picogpsp-0522d9a4f535a61953da64518097fc7f64d7120c.zip |
Add workaround for Android ARM builds
While we are at it, use ARM mode for better performance.
-rw-r--r-- | cpu_threaded.c | 6 | ||||
-rw-r--r-- | jni/Android.mk | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/cpu_threaded.c b/cpu_threaded.c index df563d2..fd8d44f 100644 --- a/cpu_threaded.c +++ b/cpu_threaded.c @@ -54,7 +54,13 @@ u8 *rom_translation_ptr = rom_translation_cache; u8 *ram_translation_ptr = ram_translation_cache; u8 *bios_translation_ptr = bios_translation_cache; #elif defined(ARM_MEMORY_DYNAREC) + +#ifdef __ANDROID__ +// Workaround for 'attempt to map x bytes at offset y' +__asm__(".section .jit,\"awx\",%progbits"); +#else __asm__(".section .jit,\"awx\",%nobits"); +#endif u8 rom_translation_cache[ROM_TRANSLATION_CACHE_SIZE] __attribute__ ((aligned(4),section(".jit"))); 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) |