1
#include "math/math_util.h"
7
// QNX can only use RunFast mode and it is already the default.
8
#if defined(__ARM_ARCH_7A__) && !defined(BLACKBERRY) && !defined(__SYMBIAN32__)
9
// Enables 'RunFast' VFP mode.
13
"fmrx %[result],FPSCR \r\n"
14
"orr %[result],%[result],#16777216 \r\n"
15
"fmxr FPSCR,%[result]"
16
:[result] "=r" (x) : :
18
//printf("ARM FPSCR: %08x\n",x);
21
// New fastmode code from: http://pandorawiki.org/Floating_Point_Optimization
22
// These settings turbocharge the slow VFP unit on Cortex-A8 based chips by setting
23
// restrictions that permit running VFP instructions on the NEON unit.
24
// Denormal flush-to-zero, for example.
25
void FPU_SetFastMode() {
26
static const unsigned int x = 0x04086060;
27
static const unsigned int y = 0x03000000;
30
"fmrx %0, fpscr \n\t" //r0 = FPSCR
31
"and %0, %0, %1 \n\t" //r0 = r0 & 0x04086060
32
"orr %0, %0, %2 \n\t" //r0 = r0 | 0x03000000
33
"fmxr fpscr, %0 \n\t" //FPSCR = r0
43
// Set RunFast hardware mode for Symbian VFPv2.
44
User::SetFloatingPointMode(EFpModeRunFast);
49
void FPU_SetFastMode() {}