From d1c3f3ff16ec702ac0975bf0895011db5a188bfd Mon Sep 17 00:00:00 2001 From: bspinner Date: Thu, 1 Feb 2018 23:06:24 +0100 Subject: [PATCH] WIP: Odroid fix (#223) * Adds binaries and rom.key to gitignore * Adds HAVE_NEON to Makefile for xu4 * Makes project compilable again * Adds -DMALI_GPU and makes it startable on xu4 again --- .gitignore | 2 ++ Makefile | 10 ++++++---- src/fpp_native.cpp | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 0db3706d..383b2536 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ conf/*.uae conf/*.conf kickstarts/*.rom +kickstarts/*.key *.db *.dep *.ast @@ -50,3 +51,4 @@ VSLinux/obj/ARM/Debug/ VisualGDB/Amiberry/VisualGDB/Debug/Amiberry-sdl1 VisualGDB/Amiberry/VisualGDB/Debug/Amiberry-sdl2 VisualGDB/Amiberry/VisualGDB/ +/amiberry* diff --git a/Makefile b/Makefile index dde1f70e..061d938b 100644 --- a/Makefile +++ b/Makefile @@ -46,13 +46,14 @@ else ifeq ($(PLATFORM),rpi1) else ifeq ($(PLATFORM),xu4) CPU_FLAGS += -march=armv7ve -mcpu=cortex-a15.cortex-a7 -mtune=cortex-a15.cortex-a7 -mfpu=neon-vfpv4 - CFLAGS += -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL1 + CFLAGS += -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL1 -DMALI_GPU + HAVE_NEON = 1 + NAME = amiberry-xu4-sdl1-dev ifdef DEBUG # Otherwise we'll get compilation errors, check https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here # quote: The assembly code in bn_mul.h is optimized for the ARM platform and uses some registers, including r7 to efficiently do an operation. GCC also uses r7 as the frame pointer under ARM Thumb assembly. MORE_CFLAGS += -fomit-frame-pointer endif - NAME = amiberry-xu4-sdl1-dev else ifeq ($(PLATFORM),android) CPU_FLAGS += -mfpu=neon -mfloat-abi=soft @@ -128,13 +129,14 @@ USE_SDL2 = 1 else ifeq ($(PLATFORM),xu4-sdl2) USE_SDL2 = 1 CPU_FLAGS += -march=armv7ve -mcpu=cortex-a15.cortex-a7 -mtune=cortex-a15.cortex-a7 -mfpu=neon-vfpv4 - CFLAGS += -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL2 + CFLAGS += -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL2 -DMALI_GPU + HAVE_NEON = 1 + NAME = amiberry-xu4-sdl2-dev ifdef DEBUG # Otherwise we'll get compilation errors, check https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here # quote: The assembly code in bn_mul.h is optimized for the ARM platform and uses some registers, including r7 to efficiently do an operation. GCC also uses r7 as the frame pointer under ARM Thumb assembly. MORE_CFLAGS += -fomit-frame-pointer endif - NAME = amiberry-xu4-sdl2-dev else ifeq ($(PLATFORM),tinker) USE_SDL2 = 1 diff --git a/src/fpp_native.cpp b/src/fpp_native.cpp index d78540cc..ce13fc8d 100644 --- a/src/fpp_native.cpp +++ b/src/fpp_native.cpp @@ -92,11 +92,11 @@ static void fpp_set_mode(uae_u32 mode_control) /* Functions for detecting float type */ static bool fpp_is_nan (fpdata *fpd) { - return ::isnan(fpd->fp) != 0; + return std::isnan(fpd->fp) != 0; } static bool fpp_is_infinity (fpdata *fpd) { - return ::isinf(fpd->fp) != 0; + return std::isinf(fpd->fp) != 0; } static bool fpp_is_zero(fpdata *fpd) {