| 1009 | } |
| 1010 | |
| 1011 | void ContextImpl::MonoBackpatcherWrite(FEXCore::Core::CpuStateFrame* Frame, uint8_t Size, uint64_t Address, uint64_t Value) { |
| 1012 | auto Thread = Frame->Thread; |
| 1013 | auto CTX = static_cast<ContextImpl*>(Thread->CTX); |
| 1014 | { |
| 1015 | auto lk = GuardSignalDeferringSection(CTX->CodeInvalidationMutex, Thread); |
| 1016 | |
| 1017 | if (Size == 8) { |
| 1018 | *reinterpret_cast<uint64_t *>(Address) = Value; |
| 1019 | } else if (Size == 4) { |
| 1020 | *reinterpret_cast<uint32_t *>(Address) = Value; |
| 1021 | } else { |
| 1022 | ERROR_AND_DIE_FMT("Unexpected write size for backpatcher: {}", Size); |
| 1023 | } |
| 1024 | } |
| 1025 | |
| 1026 | CTX->SyscallHandler->InvalidateGuestCodeRange(Thread, Address, Size); |
| 1027 | } |
| 1028 | |
| 1029 | IR::AOTIRCacheEntry* ContextImpl::LoadAOTIRCacheEntry(const fextl::string& filename) { |
| 1030 | auto rv = IRCaptureCache.LoadAOTIRCacheEntry(filename); |
nothing calls this directly
no test coverage detected