From ec6a4115eb2754fcb916c5c2d9f458a0b2e249bb Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 15 Oct 2022 17:21:38 +0200 Subject: [PATCH] Jit64: Jump to dispatcher_no_check from InitializeSpeculativeConstants Jumping to `dispatcher` requires first subtracting the downcount, otherwise `dispatcher` may unpredictably jump to CoreTiming::Advance, which could break determinism compatibility with JitArm64. We should jump to `dispatcher_no_check` instead. --- Source/Core/Core/PowerPC/Jit64/Jit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index 96f5905c68..698491d54a 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -1282,7 +1282,7 @@ void Jit64::IntializeSpeculativeConstants() ABI_CallFunctionC(JitInterface::CompileExceptionCheck, static_cast(JitInterface::ExceptionType::SpeculativeConstants)); ABI_PopRegistersAndAdjustStack({}, 0); - JMP(asm_routines.dispatcher, true); + JMP(asm_routines.dispatcher_no_check, true); SwitchToNearCode(); } CMP(32, PPCSTATE(gpr[i]), Imm32(compileTimeValue));