New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jit64Common: Split Jit64Util contents into separate files #4522
Conversation
Looks good, should Jit64Util.h be renamed to something more appropriate like PowerPCState? |
PowerPCState is a thing that already exists in an unrelated (in the sense it would introduce x86 dependencies in generic code if moved into the same file) header. So I've left it as Jit64Util. |
Jit64PPCStates then? Jit64Util doesn't really tell me a whole lot. What exactly are those defines for? |
They generate an operand argument that uses RPPCState (an actual x86 register for tracking the live PowerPCState) and contains the offset to the relevant entity in the PowerPCState struct. |
Much of Jit64Util consists of essentials, not utilities. Breaking these out into their own files also prevents unrelated includes from being present near other classes. This also makes it easier to find and change certain components of the x86-64 JIT, should it be necessary.
Ah ok, thanks for the explanation. I see you've updated the filename as well, appreciate it! LGTM |
// We offset by 0x80 because the range of one byte memory offsets is | ||
// -0x80..0x7f. | ||
#define PPCSTATE(x) \ | ||
MDisp(RPPCSTATE, (int)((char*)&PowerPC::ppcState.x - (char*)&PowerPC::ppcState) - 0x80) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Much of Jit64Util consists of essentials, not utilities. Breaking these out into their own files also prevents unrelated includes from being present near other classes.
This also makes it easier to find and change certain components of the x86-64 JIT, should it be necessary.
This is essentially a preliminary cleanup before I make a few of the memory routines for Jit64 not rely on the
jit
global variable. Eliminating reliance on the global will also allow me to rework #4518 without the need for downcasting.