mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Delete some misguided FPU control code, that we definitely don't want
This commit is contained in:
parent
32699da6df
commit
d52d383c22
5 changed files with 2 additions and 55 deletions
|
@ -1,44 +1,5 @@
|
||||||
#include "Common/Math/math_util.h"
|
#include "Common/Math/math_util.h"
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
// QNX can only use RunFast mode and it is already the default.
|
#include <cstdlib>
|
||||||
#if defined(__ARM_ARCH_7A__)
|
|
||||||
// Enables 'RunFast' VFP mode.
|
|
||||||
void EnableFZ() {
|
|
||||||
int x;
|
|
||||||
asm(
|
|
||||||
"fmrx %[result],FPSCR \r\n"
|
|
||||||
"orr %[result],%[result],#16777216 \r\n"
|
|
||||||
"fmxr FPSCR,%[result]"
|
|
||||||
:[result] "=r" (x) : :
|
|
||||||
);
|
|
||||||
//printf("ARM FPSCR: %08x\n",x);
|
|
||||||
}
|
|
||||||
|
|
||||||
// New fastmode code from: http://pandorawiki.org/Floating_Point_Optimization
|
// Could delete this file, but might find use again.
|
||||||
// These settings turbocharge the slow VFP unit on Cortex-A8 based chips by setting
|
|
||||||
// restrictions that permit running VFP instructions on the NEON unit.
|
|
||||||
// Denormal flush-to-zero, for example.
|
|
||||||
void FPU_SetFastMode() {
|
|
||||||
static const unsigned int x = 0x04086060;
|
|
||||||
static const unsigned int y = 0x03000000;
|
|
||||||
int r;
|
|
||||||
asm volatile (
|
|
||||||
"fmrx %0, fpscr \n\t" //r0 = FPSCR
|
|
||||||
"and %0, %0, %1 \n\t" //r0 = r0 & 0x04086060
|
|
||||||
"orr %0, %0, %2 \n\t" //r0 = r0 | 0x03000000
|
|
||||||
"fmxr fpscr, %0 \n\t" //FPSCR = r0
|
|
||||||
: "=r"(r)
|
|
||||||
: "r"(x), "r"(y)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
void EnableFZ() {
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
void FPU_SetFastMode() {}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -189,12 +189,3 @@ inline uint16_t ShrinkToHalf(float full) {
|
||||||
FP16 fp = float_to_half_fast3(fp32);
|
FP16 fp = float_to_half_fast3(fp32);
|
||||||
return fp.u;
|
return fp.u;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FPU control.
|
|
||||||
void EnableFZ();
|
|
||||||
|
|
||||||
// Enable both FZ and Default-NaN. Is documented to flip some ARM implementation into a "run-fast" mode
|
|
||||||
// where they can schedule VFP instructions on the NEON unit (these implementations have
|
|
||||||
// very slow VFP units).
|
|
||||||
// http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0274h/Babffifj.html
|
|
||||||
void FPU_SetFastMode();
|
|
||||||
|
|
|
@ -316,7 +316,6 @@ static int mainInternal(QApplication &a) {
|
||||||
emugl->resize(pixel_xres, pixel_yres);
|
emugl->resize(pixel_xres, pixel_yres);
|
||||||
emugl->showFullScreen();
|
emugl->showFullScreen();
|
||||||
#endif
|
#endif
|
||||||
EnableFZ();
|
|
||||||
// Disable screensaver
|
// Disable screensaver
|
||||||
#if defined(QT_HAS_SYSTEMINFO)
|
#if defined(QT_HAS_SYSTEMINFO)
|
||||||
QScreenSaver ssObject(emugl);
|
QScreenSaver ssObject(emugl);
|
||||||
|
|
|
@ -807,7 +807,6 @@ int main(int argc, char *argv[]) {
|
||||||
} else {
|
} else {
|
||||||
joystick = nullptr;
|
joystick = nullptr;
|
||||||
}
|
}
|
||||||
EnableFZ();
|
|
||||||
|
|
||||||
int framecount = 0;
|
int framecount = 0;
|
||||||
bool mouseDown = false;
|
bool mouseDown = false;
|
||||||
|
|
|
@ -807,6 +807,3 @@ void bindDefaultFBO()
|
||||||
{
|
{
|
||||||
[sharedViewController bindDefaultFBO];
|
[sharedViewController bindDefaultFBO];
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnableFZ(){};
|
|
||||||
void DisableFZ(){};
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue