| 338 | } |
| 339 | |
| 340 | bool ContextImpl::InitCore() { |
| 341 | // Initialize the CPU core signal handlers & DispatcherConfig |
| 342 | Dispatcher = FEXCore::CPU::Dispatcher::Create(this); |
| 343 | |
| 344 | // Set up the SignalDelegator config since core is initialized. |
| 345 | SignalDelegation->SetConfig(Dispatcher->MakeSignalDelegatorConfig()); |
| 346 | |
| 347 | #if defined(_WIN32) && !defined(_M_ARM_64EC) |
| 348 | // WOW64 always needs the interrupt fault check to be enabled. |
| 349 | Config.NeedsPendingInterruptFaultCheck = true; |
| 350 | #endif |
| 351 | |
| 352 | if (Config.GdbServer) { |
| 353 | // If gdbserver is enabled then this needs to be enabled. |
| 354 | Config.NeedsPendingInterruptFaultCheck = true; |
| 355 | } |
| 356 | |
| 357 | return true; |
| 358 | } |
| 359 | |
| 360 | void ContextImpl::HandleCallback(FEXCore::Core::InternalThreadState* Thread, uint64_t RIP) { |
| 361 | static_cast<ContextImpl*>(Thread->CTX)->Dispatcher->ExecuteJITCallback(Thread->CurrentFrame, RIP); |