From be5047c7c2f3c9f964acd21dc303f47be9244b93 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Wed, 21 Feb 2018 21:02:42 +0000 Subject: [PATCH] impl: Update PC when raising exception --- src/frontend/A64/translate/impl/impl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/A64/translate/impl/impl.cpp b/src/frontend/A64/translate/impl/impl.cpp index b4cf47d7..86ae2833 100644 --- a/src/frontend/A64/translate/impl/impl.cpp +++ b/src/frontend/A64/translate/impl/impl.cpp @@ -33,6 +33,7 @@ bool TranslatorVisitor::UnallocatedEncoding() { } bool TranslatorVisitor::RaiseException(Exception exception) { + ir.SetPC(ir.Imm64(ir.current_location->PC() + 4)); ir.ExceptionRaised(exception); ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}}); return false;