From 8bddd8c675625809d7ab39b56dd6f1a7071e2477 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sat, 17 Jul 2021 19:19:33 -0700 Subject: [PATCH] remove SetRoundMode we only care about SSE rounding mode, and set that manually in SetSIMDMode --- Source/Core/Common/ArmFPURoundMode.cpp | 5 ----- Source/Core/Common/FPURoundMode.h | 2 -- Source/Core/Common/GenericFPURoundMode.cpp | 3 --- Source/Core/Common/x64FPURoundMode.cpp | 7 ------- Source/Core/Core/PowerPC/PowerPC.cpp | 1 - 5 files changed, 18 deletions(-) diff --git a/Source/Core/Common/ArmFPURoundMode.cpp b/Source/Core/Common/ArmFPURoundMode.cpp index c20e9f2e19..1f666d6f0d 100644 --- a/Source/Core/Common/ArmFPURoundMode.cpp +++ b/Source/Core/Common/ArmFPURoundMode.cpp @@ -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, diff --git a/Source/Core/Common/FPURoundMode.h b/Source/Core/Common/FPURoundMode.h index 7aa3363aa9..578178d05e 100644 --- a/Source/Core/Common/FPURoundMode.h +++ b/Source/Core/Common/FPURoundMode.h @@ -15,8 +15,6 @@ enum RoundMode : u32 ROUND_DOWN = 3 }; -void SetRoundMode(RoundMode mode); - void SetSIMDMode(RoundMode rounding_mode, bool non_ieee_mode); /* diff --git a/Source/Core/Common/GenericFPURoundMode.cpp b/Source/Core/Common/GenericFPURoundMode.cpp index 20d46b334a..b5075a94e3 100644 --- a/Source/Core/Common/GenericFPURoundMode.cpp +++ b/Source/Core/Common/GenericFPURoundMode.cpp @@ -7,9 +7,6 @@ // Generic, do nothing namespace FPURoundMode { -void SetRoundMode(RoundMode mode) -{ -} void SetSIMDMode(RoundMode rounding_mode, bool non_ieee_mode) { } diff --git a/Source/Core/Common/x64FPURoundMode.cpp b/Source/Core/Common/x64FPURoundMode.cpp index aa5e9cdb1b..f69422302f 100644 --- a/Source/Core/Common/x64FPURoundMode.cpp +++ b/Source/Core/Common/x64FPURoundMode.cpp @@ -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) diff --git a/Source/Core/Core/PowerPC/PowerPC.cpp b/Source/Core/Core/PowerPC/PowerPC.cpp index 42bacb9dff..8c62dceec2 100644 --- a/Source/Core/Core/PowerPC/PowerPC.cpp +++ b/Source/Core/Core/PowerPC/PowerPC.cpp @@ -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); }