diff --git a/Source/Core/Core/Src/PatchEngine.cpp b/Source/Core/Core/Src/PatchEngine.cpp index 0abb280d2c..29328c419a 100644 --- a/Source/Core/Core/Src/PatchEngine.cpp +++ b/Source/Core/Core/Src/PatchEngine.cpp @@ -140,7 +140,7 @@ static void LoadSpeedhacks(const char *section, std::map &hacks, IniFi } } -int GetSpeedhackCycles(u32 addr) +int GetSpeedhackCycles(const u32 addr) { std::map::const_iterator iter = speedHacks.find(addr); if (iter == speedHacks.end()) diff --git a/Source/Core/Core/Src/PatchEngine.h b/Source/Core/Core/Src/PatchEngine.h index f6d8a198f5..6fa215b911 100644 --- a/Source/Core/Core/Src/PatchEngine.h +++ b/Source/Core/Core/Src/PatchEngine.h @@ -48,7 +48,7 @@ struct Patch bool active; }; -int GetSpeedhackCycles(u32 addr); +int GetSpeedhackCycles(const u32 addr); void LoadPatchSection(const char *section, std::vector &patches, IniFile &ini); void LoadPatches(const char *gameID); void ApplyFramePatches(); diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp index 8f09d6b556..79c140875a 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp @@ -434,12 +434,12 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc js.block_flags = 0; js.cancel = false; - //Analyze the block, collect all instructions it is made of (including inlining, - //if that is enabled), reorder instructions for optimal performance, and join joinable instructions. + // Analyze the block, collect all instructions it is made of (including inlining, + // if that is enabled), reorder instructions for optimal performance, and join joinable instructions. u32 nextPC = em_address; u32 merged_addresses[32]; const int capacity_of_merged_addresses = sizeof(merged_addresses) / sizeof(merged_addresses[0]); - int size_of_merged_addresses; + int size_of_merged_addresses = 0; if (!memory_exception) { // If there is a memory exception inside a block (broken_block==true), compile up to that instruction. @@ -448,7 +448,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc PPCAnalyst::CodeOp *ops = code_buf->codebuffer; - const u8 *start = AlignCode4(); //TODO: Test if this or AlignCode16 make a difference from GetCodePtr + const u8 *start = AlignCode4(); // TODO: Test if this or AlignCode16 make a difference from GetCodePtr b->checkedEntry = start; b->runCount = 0; @@ -466,7 +466,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc if (js.fpa.any) { - //This block uses FPU - needs to add FP exception bailout + // This block uses FPU - needs to add FP exception bailout TEST(32, M(&PowerPC::ppcState.msr), Imm32(1 << 13)); //Test FP enabled bit FixupBranch b1 = J_CC(CC_NZ); MOV(32, M(&PC), Imm32(js.blockStart)); @@ -492,8 +492,8 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc MOV(32, M(&PC), Imm32(js.blockStart)); #endif - //Start up the register allocators - //They use the information in gpa/fpa to preload commonly used registers. + // Start up the register allocators + // They use the information in gpa/fpa to preload commonly used registers. gpr.Start(js.gpa); fpr.Start(js.fpa); diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp index cee9cc54c8..8d90399614 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp @@ -426,12 +426,12 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc js.curBlock = b; js.cancel = false; - //Analyze the block, collect all instructions it is made of (including inlining, - //if that is enabled), reorder instructions for optimal performance, and join joinable instructions. + // Analyze the block, collect all instructions it is made of (including inlining, + // if that is enabled), reorder instructions for optimal performance, and join joinable instructions. b->exitAddress[0] = em_address; u32 merged_addresses[32]; const int capacity_of_merged_addresses = sizeof(merged_addresses) / sizeof(merged_addresses[0]); - int size_of_merged_addresses; + int size_of_merged_addresses = 0; if (!memory_exception) { // If there is a memory exception inside a block (broken_block==true), compile up to that instruction. @@ -439,7 +439,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc } PPCAnalyst::CodeOp *ops = code_buf->codebuffer; - const u8 *start = AlignCode4(); //TODO: Test if this or AlignCode16 make a difference from GetCodePtr + const u8 *start = AlignCode4(); // TODO: Test if this or AlignCode16 make a difference from GetCodePtr b->checkedEntry = start; b->runCount = 0; @@ -453,11 +453,11 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc b->normalEntry = normalEntry; if (ImHereDebug) - ABI_CallFunction((void *)&ImHere); //Used to get a trace of the last few blocks before a crash, sometimes VERY useful + ABI_CallFunction((void *)&ImHere); // Used to get a trace of the last few blocks before a crash, sometimes VERY useful if (js.fpa.any) { - //This block uses FPU - needs to add FP exception bailout + // This block uses FPU - needs to add FP exception bailout TEST(32, M(&PowerPC::ppcState.msr), Imm32(1 << 13)); //Test FP enabled bit FixupBranch b1 = J_CC(CC_NZ); MOV(32, M(&PC), Imm32(js.blockStart));