Windows: Skip state reconstruction on exceptions in dispatcher

The dispatcher always spills register state before issuing faulting instructions
This commit is contained in:
Billy Laws committed 2024-12-09 12:30:00 +00:00
1 parent bdae4f6915
commit b6fe4cd6dd
2 files changed
+12 -3

No files matched your search

+3 -1
View File
@@ -435,7 +435,9 @@ static void RethrowGuestException(const EXCEPTION_RECORD& Rec, ARM64_NT_CONTEXT&
auto* Args = reinterpret_cast<KiUserExceptionDispatcherStackLayout*>(FEXCore::AlignDown(GuestSp, 64)) - 1;
LogMan::Msg::DFmt("Reconstructing context");
ReconstructThreadState(Thread, Context);
if (!IsDispatcherAddress(Context.Pc)) {
ReconstructThreadState(Thread, Context);
}
Args->Context = StoreStateToPackedECContext(Thread, Context.Fpcr, Context.Fpsr);
LogMan::Msg::DFmt("pc: {:X} rip: {:X}", Context.Pc, Args->Context.Pc);