From 527057cb277c399a5369474f6ca7c6478c5e46e9 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Sat, 1 Jan 2011 20:00:03 +0000 Subject: [PATCH] Avoid shadowing variables. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6712 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DSPCore/Src/DSPEmitter.cpp | 4 ++-- Source/Core/DSPCore/Src/DspIntArithmetic.cpp | 6 +++--- Source/Core/DSPCore/Src/Jit/DSPJitArithmetic.cpp | 2 ++ Source/Core/DSPCore/Src/Jit/DSPJitExtOps.cpp | 4 ++-- Source/Core/DSPCore/Src/Jit/DSPJitMultiplier.cpp | 2 ++ Source/Core/DSPCore/Src/Jit/DSPJitUtil.cpp | 8 ++++---- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Source/Core/DSPCore/Src/DSPEmitter.cpp b/Source/Core/DSPCore/Src/DSPEmitter.cpp index ca17138456..b887f2d0d7 100644 --- a/Source/Core/DSPCore/Src/DSPEmitter.cpp +++ b/Source/Core/DSPCore/Src/DSPEmitter.cpp @@ -486,7 +486,7 @@ void DSPEmitter::CompileDispatcher() MOV(64, R(RAX), ImmPtr(&g_dsp.cr)); TEST(8, MatR(RAX), Imm8(CR_HALT)); #endif - FixupBranch halt = J_CC(CC_NE); + FixupBranch _halt = J_CC(CC_NE); #ifdef _M_IX86 MOVZX(32, 16, ECX, M(&g_dsp.pc)); @@ -512,7 +512,7 @@ void DSPEmitter::CompileDispatcher() J_CC(CC_A, dispatcherLoop); // DSP gave up the remaining cycles. - SetJumpTarget(halt); + SetJumpTarget(_halt); //MOV(32, M(&cyclesLeft), Imm32(0)); ABI_PopAllCalleeSavedRegsAndAdjustStack(); RET(); diff --git a/Source/Core/DSPCore/Src/DspIntArithmetic.cpp b/Source/Core/DSPCore/Src/DspIntArithmetic.cpp index 63dbc8c02b..ba625395a1 100644 --- a/Source/Core/DSPCore/Src/DspIntArithmetic.cpp +++ b/Source/Core/DSPCore/Src/DspIntArithmetic.cpp @@ -382,7 +382,7 @@ void addr(const UDSPInstruction opc) u8 sreg = ((opc >> 9) & 0x3) + DSP_REG_AXL0; s64 acc = dsp_get_long_acc(dreg); - s64 ax; + s64 ax = 0; switch(sreg) { case DSP_REG_AXL0: case DSP_REG_AXL1: @@ -581,7 +581,7 @@ void subr(const UDSPInstruction opc) u8 sreg = ((opc >> 9) & 0x3) + DSP_REG_AXL0; s64 acc = dsp_get_long_acc(dreg); - s64 ax; + s64 ax = 0; switch(sreg) { case DSP_REG_AXL0: case DSP_REG_AXL1: @@ -758,7 +758,7 @@ void movr(const UDSPInstruction opc) u8 areg = (opc >> 8) & 0x1; u8 sreg = ((opc >> 9) & 0x3) + DSP_REG_AXL0; - s64 ax; + s64 ax = 0; switch(sreg) { case DSP_REG_AXL0: case DSP_REG_AXL1: diff --git a/Source/Core/DSPCore/Src/Jit/DSPJitArithmetic.cpp b/Source/Core/DSPCore/Src/Jit/DSPJitArithmetic.cpp index afda2157c9..e3febde0b9 100644 --- a/Source/Core/DSPCore/Src/Jit/DSPJitArithmetic.cpp +++ b/Source/Core/DSPCore/Src/Jit/DSPJitArithmetic.cpp @@ -21,7 +21,9 @@ #include "../DSPIntUtil.h" #include "../DSPEmitter.h" #include "../DSPAnalyzer.h" +#ifdef _M_X64 #include "DSPJitUtil.h" +#endif #include "x64Emitter.h" #include "ABI.h" using namespace Gen; diff --git a/Source/Core/DSPCore/Src/Jit/DSPJitExtOps.cpp b/Source/Core/DSPCore/Src/Jit/DSPJitExtOps.cpp index 48b6d09984..9493c2857b 100644 --- a/Source/Core/DSPCore/Src/Jit/DSPJitExtOps.cpp +++ b/Source/Core/DSPCore/Src/Jit/DSPJitExtOps.cpp @@ -79,7 +79,7 @@ void DSPEmitter::s(const UDSPInstruction opc) { u8 dreg = opc & 0x3; u8 sreg = ((opc >> 3) & 0x3) + DSP_REG_ACL0; - u16 *sregp; + u16 *sregp = 0; switch(sreg) { case DSP_REG_ACL0: case DSP_REG_ACL1: @@ -115,7 +115,7 @@ void DSPEmitter::sn(const UDSPInstruction opc) { u8 dreg = opc & 0x3; u8 sreg = ((opc >> 3) & 0x3) + DSP_REG_ACL0; - u16 *sregp; + u16 *sregp = 0; switch(sreg) { case DSP_REG_ACL0: case DSP_REG_ACL1: diff --git a/Source/Core/DSPCore/Src/Jit/DSPJitMultiplier.cpp b/Source/Core/DSPCore/Src/Jit/DSPJitMultiplier.cpp index b3159c9306..c37f26717a 100644 --- a/Source/Core/DSPCore/Src/Jit/DSPJitMultiplier.cpp +++ b/Source/Core/DSPCore/Src/Jit/DSPJitMultiplier.cpp @@ -23,7 +23,9 @@ #include "../DSPIntUtil.h" #include "../DSPEmitter.h" #include "../DSPAnalyzer.h" +#ifdef _M_X64 #include "DSPJitUtil.h" +#endif #include "x64Emitter.h" #include "ABI.h" using namespace Gen; diff --git a/Source/Core/DSPCore/Src/Jit/DSPJitUtil.cpp b/Source/Core/DSPCore/Src/Jit/DSPJitUtil.cpp index 7ea89bda17..1fb15ae00f 100644 --- a/Source/Core/DSPCore/Src/Jit/DSPJitUtil.cpp +++ b/Source/Core/DSPCore/Src/Jit/DSPJitUtil.cpp @@ -464,13 +464,13 @@ void DSPEmitter::get_long_prod_round_prodl(X64Reg long_prod) ADD(64, R(long_prod), Imm32(0x8000)); MOV(64, R(ESI), Imm64(~0xffff)); AND(64, R(long_prod), R(RSI)); - FixupBranch ret = J(); + FixupBranch _ret = J(); //else prod = (prod + 0x7fff) & ~0xffff; SetJumpTarget(jump); ADD(64, R(long_prod), Imm32(0x7fff)); MOV(64, R(RSI), Imm64(~0xffff)); AND(64, R(long_prod), R(RSI)); - SetJumpTarget(ret); + SetJumpTarget(_ret); //return prod; #endif } @@ -517,13 +517,13 @@ void DSPEmitter::round_long_acc(X64Reg long_acc) ADD(64, R(long_acc), Imm32(0x8000)); MOV(64, R(ESI), Imm64(~0xffff)); AND(64, R(long_acc), R(RSI)); - FixupBranch ret = J(); + FixupBranch _ret = J(); //else prod = (prod + 0x7fff) & ~0xffff; SetJumpTarget(jump); ADD(64, R(long_acc), Imm32(0x7fff)); MOV(64, R(RSI), Imm64(~0xffff)); AND(64, R(long_acc), R(RSI)); - SetJumpTarget(ret); + SetJumpTarget(_ret); //return prod; #endif }