diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp index be8a126228..01c6d0b8c9 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp @@ -1501,6 +1501,8 @@ void Jit64::twx(UGeckoInstruction inst) gpr.Flush(FLUSH_ALL); fpr.Flush(FLUSH_ALL); + MOV(8, R(AL), Imm8(inst.TO)); + if (inst.OPCD == 3) // twi CMP(32, gpr.R(a), gpr.R(inst.RB)); else // tw @@ -1514,23 +1516,23 @@ void Jit64::twx(UGeckoInstruction inst) FixupBranch lg = J_CC(CC_O); SetJumpTarget(al); - TEST(8, R(BL), Imm8(16)); + TEST(8, R(AL), Imm8(16)); FixupBranch exit1 = J_CC(CC_NZ); FixupBranch take1 = J(); SetJumpTarget(ag); - TEST(8, R(BL), Imm8(8)); + TEST(8, R(AL), Imm8(8)); FixupBranch exit2 = J_CC(CC_NZ); FixupBranch take2 = J(); SetJumpTarget(ae); - TEST(8, R(BL), Imm8(4)); + TEST(8, R(AL), Imm8(4)); FixupBranch exit3 = J_CC(CC_NZ); FixupBranch take3 = J(); SetJumpTarget(ll); - TEST(8, R(BL), Imm8(2)); + TEST(8, R(AL), Imm8(2)); FixupBranch exit4 = J_CC(CC_NZ); FixupBranch take4 = J(); SetJumpTarget(lg); - TEST(8, R(BL), Imm8(1)); + TEST(8, R(AL), Imm8(1)); FixupBranch exit5 = J_CC(CC_NZ); FixupBranch take5 = J(); @@ -1548,4 +1550,5 @@ void Jit64::twx(UGeckoInstruction inst) SetJumpTarget(exit3); SetJumpTarget(exit4); SetJumpTarget(exit5); + WriteExit(js.compilerPC + 4, 1); }