From 5c0145f71b6c7c6a1777425a60e2baf67021536b Mon Sep 17 00:00:00 2001 From: Fiora Date: Thu, 21 Aug 2014 11:19:23 -0700 Subject: [PATCH] PPCAnalyzer: move num_instructions initialization to correct place Much of the PPC Analyzer code (e.g. instruction reordering for merging branches) wasn't actually being run. --- Source/Core/Core/PowerPC/PPCAnalyst.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp index 20efecc362..19aaf078f8 100644 --- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp +++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp @@ -698,6 +698,8 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock *block, CodeBuffer *buffer, u32 } } + block->m_num_instructions = num_inst; + if (block->m_num_instructions > 1) ReorderInstructions(block->m_num_instructions, code); @@ -727,7 +729,6 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock *block, CodeBuffer *buffer, u32 code[i].wantsCR1 = wantsCR1; code[i].wantsPS1 = wantsPS1; } - block->m_num_instructions = num_inst; return address; }