Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9908 from shuffle2/set-roundmode-with-simdmode
merge SetRoundMode into SetSIMDMode
  • Loading branch information
Tilka committed Jul 18, 2021
2 parents 3c90b65 + 8bddd8c commit 6bf39dc
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 18 deletions.
5 changes: 0 additions & 5 deletions Source/Core/Common/ArmFPURoundMode.cpp
Expand Up @@ -35,11 +35,6 @@ namespace FPURoundMode
static const u64 default_fpcr = GetFPCR();
static u64 saved_fpcr = default_fpcr;

void SetRoundMode(RoundMode mode)
{
// We don't need to do anything here since SetSIMDMode is always called after calling this
}

void SetSIMDMode(RoundMode rounding_mode, bool non_ieee_mode)
{
// When AH is disabled, FZ controls flush-to-zero for both inputs and outputs. When AH is enabled,
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/Common/FPURoundMode.h
Expand Up @@ -15,8 +15,6 @@ enum RoundMode : u32
ROUND_DOWN = 3
};

void SetRoundMode(RoundMode mode);

void SetSIMDMode(RoundMode rounding_mode, bool non_ieee_mode);

/*
Expand Down
3 changes: 0 additions & 3 deletions Source/Core/Common/GenericFPURoundMode.cpp
Expand Up @@ -7,9 +7,6 @@
// Generic, do nothing
namespace FPURoundMode
{
void SetRoundMode(RoundMode mode)
{
}
void SetSIMDMode(RoundMode rounding_mode, bool non_ieee_mode)
{
}
Expand Down
7 changes: 0 additions & 7 deletions Source/Core/Common/x64FPURoundMode.cpp
Expand Up @@ -14,13 +14,6 @@ namespace FPURoundMode
static u32 saved_sse_state = _mm_getcsr();
static const u32 default_sse_state = _mm_getcsr();

void SetRoundMode(RoundMode mode)
{
// Convert PowerPC to native rounding mode.
static const int rounding_mode_lut[] = {FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD};
fesetround(rounding_mode_lut[mode]);
}

void SetSIMDMode(RoundMode rounding_mode, bool non_ieee_mode)
{
// OR-mask for disabling FPU exceptions (bits 7-12 in the MXCSR register)
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Core/PowerPC/PowerPC.cpp
Expand Up @@ -640,7 +640,6 @@ void RoundingModeUpdated()
// The rounding mode is separate for each thread, so this must run on the CPU thread
ASSERT(Core::IsCPUThread());

FPURoundMode::SetRoundMode(FPSCR.RN);
FPURoundMode::SetSIMDMode(FPSCR.RN, FPSCR.NI);
}

Expand Down

0 comments on commit 6bf39dc

Please sign in to comment.