diff --git a/Core/System.cpp b/Core/System.cpp index 6d3eb91c92..a2b21d6fdd 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -24,6 +24,7 @@ #include #endif +#include "math/math_util.h" #include "native/thread/thread.h" #include "native/thread/threadutil.h" #include "native/base/mutex.h" @@ -244,6 +245,8 @@ void CPU_Shutdown() { void CPU_RunLoop() { setCurrentThreadName("CPUThread"); + FPU_SetFastMode(); + if (!CPU_NextState(CPU_THREAD_PENDING, CPU_THREAD_STARTING)) { ERROR_LOG(CPU, "CPU thread in unexpected state: %d", cpuThreadState); return; diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 9f11e1d4a5..4729203dee 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -215,8 +215,14 @@ void NativeInit(int argc, const char *argv[], InitFastMath(cpu_info.bNEON); + // Sets both FZ and DefaultNaN on ARM, flipping some ARM implementations into "RunFast" mode for VFP. + // http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0274h/Babffifj.html + // Do we need to do this on all threads? + // Also, the FZ thing may actually be a little bit dangerous, I'm not sure how compliant the MIPS + // CPU is with denormal handling. Needs testing. Default-NAN should be reasonably safe though. + FPU_SetFastMode(); + bool skipLogo = false; - EnableFZ(); setlocale( LC_ALL, "C" ); std::string user_data_path = savegame_directory; pendingMessages.clear(); @@ -404,6 +410,8 @@ void NativeInit(int argc, const char *argv[], } void NativeInitGraphics() { + FPU_SetFastMode(); + CheckGLExtensions(); gl_lost_manager_init(); ui_draw2d.SetAtlas(&ui_atlas); diff --git a/native b/native index 4bd2802700..30b5e2879e 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 4bd28027006a04bf55f85f2767f0758fbd5c6e9b +Subproject commit 30b5e2879eb6c1fe9623c9275a995f3daa24b263