Merge pull request #5943 from cjacek/wow64-chpe

WOW64: Use CHPEv2 for suspend and exception support
This commit is contained in:
Ryan Houdek authored and GitHub committed 2026-09-10 16:07:11 -07:00
commit f18599d097
5 files changed
+86 -252

No files matched your search

-5
View File
@@ -358,11 +358,6 @@ bool ContextImpl::InitCore() {
// Set up the SignalDelegator config since core is initialized.
SignalDelegation->SetConfig(Dispatcher->MakeSignalDelegatorConfig());
#if defined(_WIN32) && !defined(ARCHITECTURE_arm64ec)
// WOW64 always needs the interrupt fault check to be enabled.
Config.NeedsPendingInterruptFaultCheck = true;
#endif
if (Config.GdbServer) {
// If gdbserver is enabled then this needs to be enabled.
Config.NeedsPendingInterruptFaultCheck = true;
+2 -2
View File
@@ -766,7 +766,7 @@ void Arm64JITCore::EmitTFCheck() {
void Arm64JITCore::EmitSuspendInterruptCheck() {
if (CTX->Config.NeedsPendingInterruptFaultCheck) {
// Trigger a fault if there are any pending interrupts
// Used only for suspend on WIN32 at the moment
// Used only for gdbserver at the moment
constexpr size_t InterruptPageOffset =
offsetof(FEXCore::Core::InternalThreadState, InterruptFaultPage) - offsetof(FEXCore::Core::InternalThreadState, BaseFrameState);
if constexpr (InterruptPageOffset <= 32760) {
@@ -778,7 +778,7 @@ void Arm64JITCore::EmitSuspendInterruptCheck() {
}
}
#ifdef ARCHITECTURE_arm64ec
#ifdef _WIN32
static constexpr uint16_t SuspendMagic {0xCAFE};
ldr(TMP2.W(), STATE_PTR(CpuStateFrame, SuspendDoorbell));