Merge pull request #12464 from JosJuice/jit-isi-membase

Jit: Reload RMEM/MEM_REG on ISI exception
This commit is contained in:
Admiral H. Curtiss 2024-01-01 22:09:05 +01:00 committed by GitHub
commit 6e3a2324a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -221,6 +221,9 @@ void Jit64AsmRoutineManager::Generate()
ABI_CallFunction(JitTrampoline);
ABI_PopRegistersAndAdjustStack({}, 0);
// If jitting triggered an ISI exception, MSR.DR may have changed
MOV(64, R(RMEM), PPCSTATE(mem_ptr));
JMP(dispatcher_no_check, Jump::Near);
SetJumpTarget(bail);

View File

@ -177,7 +177,12 @@ void JitArm64::GenerateAsm()
// Call JIT
ResetStack();
ABI_CallFunction(&JitTrampoline, this, DISPATCHER_PC);
LDR(IndexType::Unsigned, DISPATCHER_PC, PPC_REG, PPCSTATE_OFF(pc));
// If jitting triggered an ISI exception, MSR.DR may have changed
EmitUpdateMembase();
B(dispatcher_no_check);
SetJumpTarget(bail);