From 92482dfcb3c58ea9c2c80c4f9d52a6f2f44a3bd9 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 12 Aug 2013 01:52:54 -0700 Subject: [PATCH] Branch targets are relative to next instr. --- Core/MIPS/MIPSCodeUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/MIPS/MIPSCodeUtils.cpp b/Core/MIPS/MIPSCodeUtils.cpp index e4fc59053a..91a344e8e6 100644 --- a/Core/MIPS/MIPSCodeUtils.cpp +++ b/Core/MIPS/MIPSCodeUtils.cpp @@ -117,7 +117,7 @@ namespace MIPSCodeUtils } if (sure && takeBranch) - return addr + ((signed short)(op&0xFFFF)<<2); + return addr + 4 + ((signed short)(op&0xFFFF)<<2); else if (sure && !takeBranch) return addr + 8; else