mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Common: Move FPU-related helpers into Common namespace
Makes these utilities' namespace consistent with the majority of the Common library.
This commit is contained in:
@ -11,6 +11,8 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
|
||||
namespace Common::FPU
|
||||
{
|
||||
static u64 GetFPCR()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
@ -31,8 +33,6 @@ static void SetFPCR(u64 fpcr)
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace FPURoundMode
|
||||
{
|
||||
static const u64 default_fpcr = GetFPCR();
|
||||
static u64 saved_fpcr = default_fpcr;
|
||||
|
||||
@ -87,4 +87,4 @@ void LoadDefaultSIMDState()
|
||||
SetFPCR(default_fpcr);
|
||||
}
|
||||
|
||||
} // namespace FPURoundMode
|
||||
} // namespace Common::FPU
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
namespace FPURoundMode
|
||||
namespace Common::FPU
|
||||
{
|
||||
enum RoundMode : u32
|
||||
{
|
||||
@ -27,4 +27,4 @@ void SetSIMDMode(RoundMode rounding_mode, bool non_ieee_mode);
|
||||
void SaveSIMDState();
|
||||
void LoadSIMDState();
|
||||
void LoadDefaultSIMDState();
|
||||
} // namespace FPURoundMode
|
||||
} // namespace Common::FPU
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
// Generic, do nothing
|
||||
namespace FPURoundMode
|
||||
namespace Common::FPU
|
||||
{
|
||||
void SetSIMDMode(RoundMode rounding_mode, bool non_ieee_mode)
|
||||
{
|
||||
@ -20,4 +20,4 @@ void LoadSIMDState()
|
||||
void LoadDefaultSIMDState()
|
||||
{
|
||||
}
|
||||
} // namespace FPURoundMode
|
||||
} // namespace Common::FPU
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Intrinsics.h"
|
||||
|
||||
namespace FPURoundMode
|
||||
namespace Common::FPU
|
||||
{
|
||||
// Get the default SSE states here.
|
||||
static u32 saved_sse_state = _mm_getcsr();
|
||||
@ -49,4 +49,4 @@ void LoadDefaultSIMDState()
|
||||
{
|
||||
_mm_setcsr(default_sse_state);
|
||||
}
|
||||
} // namespace FPURoundMode
|
||||
} // namespace Common::FPU
|
||||
|
Reference in New Issue
Block a user