From 5f8581592227dc25fa7d4ea69a8a211e2eeb575c Mon Sep 17 00:00:00 2001 From: Sacha Date: Thu, 29 Mar 2012 17:01:59 +1000 Subject: [PATCH] Remove inherited variable that was no longer used. Clean up. --- Source/Core/Core/Src/BootManager.cpp | 3 --- Source/Core/Core/Src/Core.cpp | 3 ++- Source/Core/Core/Src/CoreParameter.cpp | 3 +-- Source/Core/Core/Src/CoreParameter.h | 1 - Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp | 7 +------ .../Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp | 4 ++-- .../Src/PowerPC/Jit64/Jit_LoadStoreFloating.cpp | 13 +++++-------- Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp | 6 ------ Source/Core/Core/Src/PowerPC/JitCommon/JitBase.h | 2 -- Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp | 6 ++++-- 10 files changed, 15 insertions(+), 33 deletions(-) diff --git a/Source/Core/Core/Src/BootManager.cpp b/Source/Core/Core/Src/BootManager.cpp index ed415a4ae9..640c2eecdc 100644 --- a/Source/Core/Core/Src/BootManager.cpp +++ b/Source/Core/Core/Src/BootManager.cpp @@ -74,9 +74,6 @@ bool BootCore(const std::string& _rFilename) StartUp.bRunCompareServer = false; StartUp.hInstance = Host_GetInstance(); - #if defined(_WIN32) && defined(_M_X64) - StartUp.bUseFastMem = true; - #endif // If for example the ISO file is bad we return here if (!StartUp.AutoSetup(SCoreStartupParameter::BOOT_DEFAULT)) return false; diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index 9a9de8bb40..52eec29030 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -293,8 +293,9 @@ void CpuThread() if (_CoreParameter.bLockThreads) Common::SetCurrentThreadAffinity(1); // Force to first core - if (_CoreParameter.bUseFastMem) + #if defined(_WIN32) && defined(_M_X64) EMM::InstallExceptionHandler(); // Let's run under memory watch + #endif if (!g_stateFileName.empty()) State::LoadAs(g_stateFileName); diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp index c608905e39..45eef27160 100644 --- a/Source/Core/Core/Src/CoreParameter.cpp +++ b/Source/Core/Core/Src/CoreParameter.cpp @@ -45,8 +45,7 @@ SCoreStartupParameter::SCoreStartupParameter() bEnableFPRF(false), bCPUThread(true), bDSPThread(false), bDSPHLE(true), bSkipIdle(true), bNTSC(false), bForceNTSCJ(false), - bHLE_BS2(true), bUseFastMem(false), - bLockThreads(false), + bHLE_BS2(true), bLockThreads(false), bEnableCheats(false), bMergeBlocks(false), bRunCompareServer(false), bRunCompareClient(false), diff --git a/Source/Core/Core/Src/CoreParameter.h b/Source/Core/Core/Src/CoreParameter.h index af885efcad..6569e27ba1 100644 --- a/Source/Core/Core/Src/CoreParameter.h +++ b/Source/Core/Core/Src/CoreParameter.h @@ -103,7 +103,6 @@ struct SCoreStartupParameter bool bNTSC; bool bForceNTSCJ; bool bHLE_BS2; - bool bUseFastMem; bool bLockThreads; bool bEnableCheats; bool bMergeBlocks; diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp index b43ed516dd..bd72d1e79c 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp @@ -191,12 +191,7 @@ void Jit64::Init() else jo.enableBlocklink = !Core::g_CoreStartupParameter.bMMU; } -#ifdef _M_X64 - jo.enableFastMem = Core::g_CoreStartupParameter.bUseFastMem; -#else - jo.enableFastMem = false; -#endif - jo.assumeFPLoadFromMem = Core::g_CoreStartupParameter.bUseFastMem; + jo.fpAccurateFcmp = true; // Fallback to Interpreter jo.optimizeGatherPipe = true; jo.fastInterrupts = false; diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp index 039300223a..9a246008c6 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp @@ -352,8 +352,8 @@ void Jit64::stX(UGeckoInstruction inst) } /* // TODO - figure out why Beyond Good and Evil hates this - #ifdef _M_X64 - if (accessSize == 32 && !update && jo.enableFastMem) + #if defined(_WIN32) && defined(_M_X64) + if (accessSize == 32 && !update) { // Fast and daring - requires 64-bit MOV(32, R(EAX), gpr.R(s)); diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStoreFloating.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStoreFloating.cpp index 25ad18acf5..9518f464b8 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStoreFloating.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStoreFloating.cpp @@ -62,14 +62,11 @@ void Jit64::lfs(UGeckoInstruction inst) return; } s32 offset = (s32)(s16)inst.SIMM_16; - if (jo.assumeFPLoadFromMem) - { - UnsafeLoadToEAX(gpr.R(a), 32, offset, false); - } - else - { - SafeLoadToEAX(gpr.R(a), 32, offset, false); - } +#if defined(_WIN32) && defined(_M_X64) + UnsafeLoadToEAX(gpr.R(a), 32, offset, false); +#else + SafeLoadToEAX(gpr.R(a), 32, offset, false); +#endif MEMCHECK_START diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp index e079fb7896..d462ff8a35 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp @@ -276,12 +276,6 @@ void JitIL::Init() jo.enableBlocklink = !Core::g_CoreStartupParameter.bMMU; } -#ifdef _M_X64 - jo.enableFastMem = false; -#else - jo.enableFastMem = false; -#endif - jo.assumeFPLoadFromMem = Core::g_CoreStartupParameter.bUseFastMem; jo.fpAccurateFcmp = false; jo.optimizeGatherPipe = true; jo.fastInterrupts = false; diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/JitBase.h b/Source/Core/Core/Src/PowerPC/JitCommon/JitBase.h index c2febde722..a953a820be 100644 --- a/Source/Core/Core/Src/PowerPC/JitCommon/JitBase.h +++ b/Source/Core/Core/Src/PowerPC/JitCommon/JitBase.h @@ -41,10 +41,8 @@ protected: struct JitOptions { bool optimizeStack; - bool assumeFPLoadFromMem; bool enableBlocklink; bool fpAccurateFcmp; - bool enableFastMem; bool optimizeGatherPipe; bool fastInterrupts; bool accurateSinglePrecision; diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp index 26abb5a890..8b48626112 100644 --- a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp +++ b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp @@ -118,16 +118,18 @@ void EmuCodeBlock::UnsafeLoadToEAX(const Gen::OpArg & opAddress, int accessSize, void EmuCodeBlock::SafeLoadToEAX(const Gen::OpArg & opAddress, int accessSize, s32 offset, bool signExtend) { +#if defined(_WIN32) && defined(_M_X64) #ifdef ENABLE_MEM_CHECK - if (Core::g_CoreStartupParameter.bUseFastMem && (accessSize == 32) && !Core::g_CoreStartupParameter.bMMU && !Core::g_CoreStartupParameter.bEnableDebugging) + if (accessSize == 32 && !Core::g_CoreStartupParameter.bMMU && !Core::g_CoreStartupParameter.bEnableDebugging) #else - if (Core::g_CoreStartupParameter.bUseFastMem && (accessSize == 32) && !Core::g_CoreStartupParameter.bMMU) + if (accessSize == 32 && !Core::g_CoreStartupParameter.bMMU) #endif { // BackPatch only supports 32-bits accesses UnsafeLoadToEAX(opAddress, accessSize, offset, signExtend); } else +#endif { u32 mem_mask = Memory::ADDR_MASK_HW_ACCESS; if (Core::g_CoreStartupParameter.bMMU || Core::g_CoreStartupParameter.iTLBHack)