Set both Default-NAN and FZ on ARM. See comments.

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0274h/Babffifj.html
This commit is contained in:
Henrik Rydgard 2014-03-23 10:05:11 +01:00
parent 941b8b4663
commit efa7ba5570
3 changed files with 13 additions and 2 deletions

View File

@ -24,6 +24,7 @@
#include <codecvt>
#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;

View File

@ -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);

2
native

@ -1 +1 @@
Subproject commit 4bd28027006a04bf55f85f2767f0758fbd5c6e9b
Subproject commit 30b5e2879eb6c1fe9623c9275a995f3daa24b263