Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CachedInterpreter: Factor function hooking code out of Jit()
Extracts the self-contained code into its own function to clean up the flow of Jit() a little more. This also introduces a helper function to HLE.h that will be used to reduce the boilerplate here and in the interpreter and Jit64 in the following commits. This function performs all of the preliminary checks required prior to attempting to hook/replace a function at a given address. The function then calls a provided object that satisfies the FunctionObject concept in the C++ standard library. This can be a lambda, a regular function pointer, an object with an overloaded function call operator, etc. The only requirement is that the function return a bool, indicating whether or not the function was replaced, and that it can take parameters in the form: fn(u32 function, HLE::HookType type)
- Loading branch information
Showing
3 changed files
with
48 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters