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
Jit64: Fix a few trivial PIE issues. #4419
Conversation
@@ -27,10 +27,8 @@ void CommonAsmRoutines::GenFifoWrite(int size) | |||
const void* start = GetCodePtr(); | |||
|
|||
// Assume value in RSCRATCH |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -52,7 +52,8 @@ void Jit64::GenerateOverflow() | |||
// rare). | |||
static const u8 ovtable[4] = {0, 0, XER_SO_MASK, XER_SO_MASK}; | |||
MOVZX(32, 8, RSCRATCH, PPCSTATE(xer_so_ov)); | |||
MOV(8, R(RSCRATCH), MDisp(RSCRATCH, (u32)(u64)ovtable)); | |||
MOV(64, R(RSCRATCH2), ImmPtr(ovtable)); | |||
MOV(8, R(RSCRATCH), MRegSum(RSCRATCH, RSCRATCH2)); |
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 patch looks like a good step in the right direction. This is probably the wrong place to bring this up, but I was wondering if you considered making all global references |
dfee1c5
to
5082a66
Compare
A bit slower, but PIE compatible and *very* rarely.
Only a small overhead, but PIE compatible.
Only a small overhead, but PIE compatible.
@hthh That is the way @Tilka did it in his PR. I'm all for doing it again, but this PR here is to fix a few of those issues without generating more complicated code. It is also to drop those s32 casts. It seems like nobody right now is willing any more to review Jit64 commits, so I'll just merge it in the next days... |
This PR fixes a few trivial PIE issues. The others are (mostly) changed in a way which raises an assert. This should help fixing PIE.
This change is