From af2d50288fc537201014c4230bb55ab9018a7438 Mon Sep 17 00:00:00 2001 From: merry Date: Sun, 27 Mar 2022 15:27:34 +0100 Subject: [PATCH] A64/sys_ic: Return to dispatch on possible invalidation --- src/dynarmic/frontend/A64/translate/impl/sys_ic.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/dynarmic/frontend/A64/translate/impl/sys_ic.cpp b/src/dynarmic/frontend/A64/translate/impl/sys_ic.cpp index 35fa2408..3c91168c 100644 --- a/src/dynarmic/frontend/A64/translate/impl/sys_ic.cpp +++ b/src/dynarmic/frontend/A64/translate/impl/sys_ic.cpp @@ -9,17 +9,23 @@ namespace Dynarmic::A64 { bool TranslatorVisitor::IC_IALLU() { ir.InstructionCacheOperationRaised(InstructionCacheOperation::InvalidateAllToPoU, ir.Imm64(0)); - return true; + ir.SetPC(ir.Imm64(ir.current_location->PC() + 4)); + ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}}); + return false; } bool TranslatorVisitor::IC_IALLUIS() { ir.InstructionCacheOperationRaised(InstructionCacheOperation::InvalidateAllToPoUInnerSharable, ir.Imm64(0)); - return true; + ir.SetPC(ir.Imm64(ir.current_location->PC() + 4)); + ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}}); + return false; } bool TranslatorVisitor::IC_IVAU(Reg Rt) { ir.InstructionCacheOperationRaised(InstructionCacheOperation::InvalidateByVAToPoU, X(64, Rt)); - return true; + ir.SetPC(ir.Imm64(ir.current_location->PC() + 4)); + ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}}); + return false; } } // namespace Dynarmic::A64