Core: Change to using fenv.h instead of including the code directly
This commit is contained in:
parent
fb6bda321c
commit
f802b18cdc
|
@ -13,31 +13,4 @@ int _vscprintf(const char * format, va_list pargs)
|
||||||
va_end(argcopy);
|
va_end(argcopy);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <float.h>
|
|
||||||
|
|
||||||
int fesetround(int RoundType)
|
|
||||||
{
|
|
||||||
static const unsigned int msRound[4] = {_RC_NEAR, _RC_CHOP, _RC_UP, _RC_DOWN};
|
|
||||||
int32_t res = _controlfp(msRound[RoundType], _MCW_RC);
|
|
||||||
if (res == _RC_NEAR)
|
|
||||||
{
|
|
||||||
return FE_TONEAREST;
|
|
||||||
}
|
|
||||||
if (res == _RC_CHOP)
|
|
||||||
{
|
|
||||||
return FE_TOWARDZERO;
|
|
||||||
}
|
|
||||||
if (res == _RC_UP)
|
|
||||||
{
|
|
||||||
return FE_UPWARD;
|
|
||||||
}
|
|
||||||
if (res == _RC_DOWN)
|
|
||||||
{
|
|
||||||
return FE_DOWNWARD;
|
|
||||||
}
|
|
||||||
return FE_TONEAREST;
|
|
||||||
}
|
|
||||||
#endif
|
|
|
@ -13,17 +13,3 @@
|
||||||
int _vscprintf(const char * format, va_list pargs);
|
int _vscprintf(const char * format, va_list pargs);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// FPU rounding code
|
|
||||||
#ifdef _WIN32
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
FE_TONEAREST = 0,
|
|
||||||
FE_TOWARDZERO,
|
|
||||||
FE_UPWARD,
|
|
||||||
FE_DOWNWARD,
|
|
||||||
} eRoundType;
|
|
||||||
int fesetround(int RoundType);
|
|
||||||
#else
|
|
||||||
#include <fenv.h>
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <Project64-core/N64System/Mips/TLB.h>
|
#include <Project64-core/N64System/Mips/TLB.h>
|
||||||
#include <Project64-core/N64System/N64System.h>
|
#include <Project64-core/N64System/N64System.h>
|
||||||
#include <Project64-core/N64System/SystemGlobals.h>
|
#include <Project64-core/N64System/SystemGlobals.h>
|
||||||
|
#include <fenv.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <Project64-core/N64System/Mips/Register.h>
|
#include <Project64-core/N64System/Mips/Register.h>
|
||||||
#include <Project64-core/N64System/N64System.h>
|
#include <Project64-core/N64System/N64System.h>
|
||||||
#include <Project64-core/N64System/SystemGlobals.h>
|
#include <Project64-core/N64System/SystemGlobals.h>
|
||||||
|
#include <fenv.h>
|
||||||
|
|
||||||
const char * CRegName::GPR[32] = {
|
const char * CRegName::GPR[32] = {
|
||||||
"R0",
|
"R0",
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <Project64-core/N64System/Recompiler/SectionInfo.h>
|
#include <Project64-core/N64System/Recompiler/SectionInfo.h>
|
||||||
#include <Project64-core/N64System/Recompiler/x86/x86RecompilerOps.h>
|
#include <Project64-core/N64System/Recompiler/x86/x86RecompilerOps.h>
|
||||||
#include <Project64-core/N64System/SystemGlobals.h>
|
#include <Project64-core/N64System/SystemGlobals.h>
|
||||||
|
#include <fenv.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
uint32_t CX86RecompilerOps::m_TempValue32 = 0;
|
uint32_t CX86RecompilerOps::m_TempValue32 = 0;
|
||||||
|
|
Loading…
Reference in New Issue