Merge pull request #1427 from lioncash/uninit

Core: Fix potentially uninitialized variable warnings
This commit is contained in:
comex 2014-11-03 22:32:58 -05:00
commit 507104186c
4 changed files with 7 additions and 11 deletions

View File

@ -86,7 +86,7 @@ void CheckGatherPipe()
memmove(m_gatherPipe, m_gatherPipe + cnt, m_gatherPipeCount); memmove(m_gatherPipe, m_gatherPipe + cnt, m_gatherPipeCount);
// Profile where the FIFO writes are occurring. // Profile where the FIFO writes are occurring.
JitInterface::CompileExceptionCheck(JitInterface::EXCEPTIONS_FIFO_WRITE); JitInterface::CompileExceptionCheck(JitInterface::ExceptionType::EXCEPTIONS_FIFO_WRITE);
} }
} }

View File

@ -66,7 +66,7 @@ void JitILBase::bx(UGeckoInstruction inst)
static IREmitter::InstLoc EmitCRTest(IREmitter::IRBuilder& ibuild, UGeckoInstruction inst) static IREmitter::InstLoc EmitCRTest(IREmitter::IRBuilder& ibuild, UGeckoInstruction inst)
{ {
IREmitter::InstLoc CRReg = ibuild.EmitLoadCR(inst.BI >> 2); IREmitter::InstLoc CRReg = ibuild.EmitLoadCR(inst.BI >> 2);
IREmitter::InstLoc CRTest; IREmitter::InstLoc CRTest = nullptr;
switch (3 - (inst.BI & 3)) switch (3 - (inst.BI & 3))
{ {
case CR_SO_BIT: case CR_SO_BIT:

View File

@ -237,23 +237,19 @@ namespace JitInterface
return inst; return inst;
} }
void CompileExceptionCheck(int type) void CompileExceptionCheck(ExceptionType type)
{ {
if (!jit) if (!jit)
return; return;
std::unordered_set<u32> *exception_addresses; std::unordered_set<u32>* exception_addresses = nullptr;
switch (type) switch (type)
{ {
case EXCEPTIONS_FIFO_WRITE: case ExceptionType::EXCEPTIONS_FIFO_WRITE:
{
exception_addresses = &jit->js.fifoWriteAddresses; exception_addresses = &jit->js.fifoWriteAddresses;
break; break;
} }
default:
ERROR_LOG(POWERPC, "Unknown exception check type");
}
if (PC != 0 && (exception_addresses->find(PC)) == (exception_addresses->end())) if (PC != 0 && (exception_addresses->find(PC)) == (exception_addresses->end()))
{ {

View File

@ -11,7 +11,7 @@
namespace JitInterface namespace JitInterface
{ {
enum enum class ExceptionType
{ {
EXCEPTIONS_FIFO_WRITE EXCEPTIONS_FIFO_WRITE
}; };
@ -39,7 +39,7 @@ namespace JitInterface
// If "forced" is true, a recompile is being requested on code that hasn't been modified. // If "forced" is true, a recompile is being requested on code that hasn't been modified.
void InvalidateICache(u32 address, u32 size, bool forced); void InvalidateICache(u32 address, u32 size, bool forced);
void CompileExceptionCheck(int type); void CompileExceptionCheck(ExceptionType type);
void Shutdown(); void Shutdown();
} }