mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-07 21:00:18 +02:00
ARM64EC: Process pending cross-process work on syscalls and exceptions
This is used to notify the JIT of e.g. memory writes by a debugger.
This commit is contained in:
1 parent
af1d2d6005
commit
d080180e85
1 file changed
+3
@@ -467,6 +467,8 @@ public:
|
||||
}
|
||||
|
||||
uint64_t HandleSyscall(FEXCore::Core::CpuStateFrame* Frame, FEXCore::HLE::SyscallArguments* Args) override {
|
||||
ProcessPendingCrossProcessEmulatorWork();
|
||||
|
||||
// Manually raise an exeption with the current JIT state packed into a native context, ntdll handles this and
|
||||
// reenters the JIT (see dlls/ntdll/signal_arm64ec.c in wine).
|
||||
uint64_t FPCR, FPSR;
|
||||
@@ -505,6 +507,7 @@ public:
|
||||
} // namespace Exception
|
||||
|
||||
extern "C" void SyncThreadContext(CONTEXT* Context) {
|
||||
ProcessPendingCrossProcessEmulatorWork();
|
||||
auto* Thread = GetCPUArea().ThreadState();
|
||||
// All other EFlags bits are lost when converting to/from an ARM64EC context, so merge them in from the current JIT state.
|
||||
// This is advisable over dropping their values as thread suspend/resume uses this function, and that can happen at any point in guest code.
|
||||
|
||||
Reference in new issue
Block a user