From 6af5525ac1652f82c4ce22845fb8b5d790d3ac50 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Sat, 18 Mar 2017 19:04:39 -0700 Subject: [PATCH] cmake: default to ENABLE_ASM_CORE=OFF #98 #54 The inline assembly in src/gba/GBA-thumb.cpp which is turned on with the cmake ENABLE_ASM_CORES option, sometimes causes weird behavior on windows (see: #54) and a crash on startup in linux (see: #98, confirmed on both Fedora and Arch Linux.) Previously the default for this option was ON for 32 bit builds, set the default to OFF always for the time being, until it is either fixed or replaced. --- CMakeLists.txt | 10 ++++++++-- README.md | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a9d7130..cd685a2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,11 +48,17 @@ ENDIF() OPTION(ENABLE_ASM "Enable x86 ASM related options" ${ASM_DEFAULT}) -SET(ASM_CORE_DEFAULT ${ENABLE_ASM}) +# The ARM ASM core seems to be very buggy, see #98 and #54. Default to it being +# OFF for the time being, until it is either fixed or replaced. +option( ENABLE_ASM_CORE "Enable x86 ASM CPU cores" OFF) + +IF(ENABLE_ASM_CORE) + MESSAGE(WARNING "!!!!!! The x86 ASM cores are considered buggy and dangerous, use at your own risk. !!!!!!") +ENDIF() + SET(ASM_SCALERS_DEFAULT ${ENABLE_ASM}) SET(MMX_DEFAULT ${ENABLE_ASM}) -option( ENABLE_ASM_CORE "Enable x86 ASM CPU cores" ${ASM_CORE_DEFAULT}) option( ENABLE_ASM_SCALERS "Enable x86 ASM graphic filters" ${ASM_SCALERS_DEFAULT}) if(ENABLE_ASM_SCALERS) diff --git a/README.md b/README.md index 62d4ff22..e6a82998 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ Here is the complete list: | ENABLE_DEBUGGER | Enable the debugger | ON | | ENABLE_NLS | Enable translations | ON | | ENABLE_ASM | Enable the following three ASM options | ON for 32 bit builds | -| ENABLE_ASM_CORE | Enable x86 ASM CPU cores | ON for 32 bit builds | +| ENABLE_ASM_CORE | Enable x86 ASM CPU cores (**BUGGY AND DANGEROUS**) | OFF | | ENABLE_ASM_SCALERS | Enable x86 ASM graphic filters | ON for 32 bit builds | | ENABLE_MMX | Enable MMX | ON for 32 bit builds | | ENABLE_LINK | Enable GBA linking functionality (requires SFML) | ON |