| 922 | } |
| 923 | |
| 924 | std::optional<CustomIRResult> |
| 925 | ContextImpl::AddCustomIREntrypoint(uintptr_t Entrypoint, CustomIREntrypointHandler Handler, void* Creator, void* Data) { |
| 926 | LOGMAN_THROW_A_FMT(Config.Is64BitMode || !(Entrypoint >> 32), "64-bit Entrypoint in 32-bit mode {:x}", Entrypoint); |
| 927 | |
| 928 | std::unique_lock lk(CustomIRMutex); |
| 929 | |
| 930 | auto InsertedIterator = CustomIRHandlers.emplace(Entrypoint, CustomIRHandlerEntry {Handler, Creator, Data}); |
| 931 | HasCustomIRHandlers = true; |
| 932 | |
| 933 | if (!InsertedIterator.second) { |
| 934 | const auto& [fn, Creator, Data] = InsertedIterator.first->second; |
| 935 | return CustomIRResult(Creator, Data); |
| 936 | } |
| 937 | |
| 938 | return std::nullopt; |
| 939 | } |
| 940 | |
| 941 | void ContextImpl::AddThunkTrampolineIRHandler(uintptr_t Entrypoint, uintptr_t GuestThunkEntrypoint) { |
| 942 | LOGMAN_THROW_A_FMT(Entrypoint, "Tried to link null pointer address to guest function"); |
nothing calls this directly
no test coverage detected