From 85724dd78a152fa105f920d45de5df7a6fa03b55 Mon Sep 17 00:00:00 2001 From: magumagu Date: Fri, 30 May 2014 21:42:49 -0700 Subject: [PATCH] JIT: Remove dead code. --- .../Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp | 32 ------------------- Source/Core/Core/PowerPC/Jit64IL/JitIL.h | 2 -- .../Core/Core/PowerPC/JitCommon/Jit_Util.cpp | 10 ------ Source/Core/Core/PowerPC/JitCommon/Jit_Util.h | 1 - 4 files changed, 45 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp index b580cd2205..e37089c8ec 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp @@ -314,38 +314,6 @@ void Jit64::stX(UGeckoInstruction inst) } } - // Optimized stack access? - if (accessSize == 32 && !gpr.R(a).IsImm() && a == 1 && js.st.isFirstBlockOfFunction && jo.optimizeStack) - { - gpr.FlushLockX(ABI_PARAM1); - MOV(32, R(ABI_PARAM1), gpr.R(a)); - MOV(32, R(EAX), gpr.R(s)); - SwapAndStore(accessSize, MComplex(RBX, ABI_PARAM1, SCALE_1, (u32)offset), EAX); - if (update && offset) - { - gpr.Lock(a); - gpr.KillImmediate(a, true, true); - ADD(32, gpr.R(a), Imm32(offset)); - gpr.UnlockAll(); - } - gpr.UnlockAllX(); - return; - } - - /* // TODO - figure out why Beyond Good and Evil hates this - #if defined(_WIN32) && _M_X86_64 - if (accessSize == 32 && !update) - { - // Fast and daring - requires 64-bit - MOV(32, R(EAX), gpr.R(s)); - gpr.BindToRegister(a, true, false); - SwapAndStore(32, MComplex(RBX, gpr.RX(a), SCALE_1, (u32)offset), EAX); - return; - } - #endif*/ - - //Still here? Do regular path. - gpr.FlushLockX(ECX, EDX); gpr.Lock(s, a); MOV(32, R(EDX), gpr.R(a)); diff --git a/Source/Core/Core/PowerPC/Jit64IL/JitIL.h b/Source/Core/Core/PowerPC/Jit64IL/JitIL.h index c824bffb00..eeb75f76fc 100644 --- a/Source/Core/Core/PowerPC/Jit64IL/JitIL.h +++ b/Source/Core/Core/PowerPC/Jit64IL/JitIL.h @@ -93,8 +93,6 @@ public: void WriteCallInterpreter(UGeckoInstruction _inst); void Cleanup(); - void WriteToConstRamAddress(int accessSize, const Gen::OpArg& arg, u32 address); - void WriteFloatToConstRamAddress(const Gen::X64Reg& xmm_reg, u32 address); void GenerateCarry(Gen::X64Reg temp_reg); void tri_op(int d, int a, int b, bool reversible, void (Gen::XEmitter::*op)(Gen::X64Reg, Gen::OpArg)); diff --git a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp index be6349672a..58348d19cb 100644 --- a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp @@ -533,16 +533,6 @@ void EmuCodeBlock::WriteToConstRamAddress(int accessSize, Gen::X64Reg arg, u32 a #endif } -void EmuCodeBlock::WriteFloatToConstRamAddress(const Gen::X64Reg& xmm_reg, u32 address) -{ -#if _M_X86_64 - MOV(32, R(RAX), Imm32(address)); - MOVSS(MComplex(RBX, RAX, 1, 0), xmm_reg); -#else - MOVSS(M((void*)((u32)Memory::base + (address & Memory::MEMVIEW32_MASK))), xmm_reg); -#endif -} - void EmuCodeBlock::ForceSinglePrecisionS(X64Reg xmm) { // Most games don't need these. Zelda requires it though - some platforms get stuck without them. if (jit->jo.accurateSinglePrecision) diff --git a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.h b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.h index 40e66ebf24..85a3320d0a 100644 --- a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.h +++ b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.h @@ -50,7 +50,6 @@ public: void SafeWriteF32ToReg(Gen::X64Reg xmm_value, Gen::X64Reg reg_addr, s32 offset, u32 registersInUse, int flags = 0); void WriteToConstRamAddress(int accessSize, Gen::X64Reg arg, u32 address, bool swap = false); - void WriteFloatToConstRamAddress(const Gen::X64Reg& xmm_reg, u32 address); void JitClearCA(); void JitSetCA(); void JitClearCAOV(bool oe);