From cfa0079c3de605865b067421f5c1e20468594867 Mon Sep 17 00:00:00 2001 From: vlj Date: Tue, 21 Jul 2015 17:33:49 +0200 Subject: [PATCH] PPU/LLVM: Fix branch detection Thanks Nekotekina for the fix --- rpcs3/Emu/Cell/PPULLVMRecompiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp b/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp index fe9a8f26f6..eda72e9763 100644 --- a/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp +++ b/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp @@ -6026,8 +6026,9 @@ u32 ppu_recompiler_llvm::ExecutionEngine::ExecuteTillReturn(PPUThread * ppu_stat } else { execution_engine->m_tracer.Trace(Tracer::TraceType::Instruction, ppu_state->PC, 0); u32 instruction = vm::ps3::read32(ppu_state->PC); + u32 oldPC = ppu_state->PC; execution_engine->m_decoder.Decode(instruction); - branch_type = GetBranchTypeFromInstruction(instruction); + branch_type = ppu_state->PC != oldPC ? GetBranchTypeFromInstruction(instruction) : BranchType::NonBranch; ppu_state->PC += 4; switch (branch_type) {