| 837 | } |
| 838 | |
| 839 | uintptr_t ContextImpl::CompileSingleStep(FEXCore::Core::CpuStateFrame* Frame, uint64_t GuestRIP) { |
| 840 | FEXCORE_PROFILE_SCOPED("CompileSingleStep"); |
| 841 | auto Thread = Frame->Thread; |
| 842 | |
| 843 | static_cast<ContextImpl*>(Thread->CTX)->SyscallHandler->PreCompile(); |
| 844 | |
| 845 | // Invalidate might take a unique lock on this, to guarantee that during invalidation no code gets compiled |
| 846 | auto lk = GuardSignalDeferringSection<std::shared_lock>(CodeInvalidationMutex, Thread); |
| 847 | |
| 848 | auto [CompiledCode, DebugData, StartAddr, Length, _] = CompileCode(Thread, GuestRIP, 1); |
| 849 | auto CodePtr = CompiledCode.EntryPoints[GuestRIP]; |
| 850 | if (CodePtr == nullptr) { |
| 851 | return 0; |
| 852 | } |
| 853 | |
| 854 | // Clear any relocations that might have been generated |
| 855 | Thread->CPUBackend->ClearRelocations(); |
| 856 | |
| 857 | return (uintptr_t)CodePtr; |
| 858 | } |
| 859 | |
| 860 | static void InvalidateGuestThreadCodeRange(FEXCore::Core::InternalThreadState* Thread, InvalidatedEntryAccumulator& Accumulator, |
| 861 | uint64_t Start, uint64_t Length) { |
nothing calls this directly
no test coverage detected