From d5e40bfb01759d544102e7c02569a70312b16af0 Mon Sep 17 00:00:00 2001 From: comex Date: Tue, 8 Oct 2013 19:07:30 -0400 Subject: [PATCH] Don't waste time looking up the block if enableBlocklink is off anyway. --- Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp index 2b14810b3e..850612cb18 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp @@ -298,18 +298,19 @@ void Jit64::WriteExit(u32 destination, int exit_num) b->exitPtrs[exit_num] = GetWritableCodePtr(); // Link opportunity! - int block = blocks.GetBlockNumberFromStartAddress(destination); - if (block >= 0 && jo.enableBlocklink) + if (jo.enableBlocklink) { - // It exists! Joy of joy! - JMP(blocks.GetBlock(block)->checkedEntry, true); - b->linkStatus[exit_num] = true; - } - else - { - MOV(32, M(&PC), Imm32(destination)); - JMP(asm_routines.dispatcher, true); + int block = blocks.GetBlockNumberFromStartAddress(destination); + if (block >= 0) + { + // It exists! Joy of joy! + JMP(blocks.GetBlock(block)->checkedEntry, true); + b->linkStatus[exit_num] = true; + return; + } } + MOV(32, M(&PC), Imm32(destination)); + JMP(asm_routines.dispatcher, true); } void Jit64::WriteExitDestInEAX()