Skip to content
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

Merged
merged 6 commits into from Dec 12, 2016
Merged

Conversation

degasus
Copy link
Member

@degasus degasus commented Nov 3, 2016

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 Reviewable

@@ -27,10 +27,8 @@ void CommonAsmRoutines::GenFifoWrite(int size)
const void* start = GetCodePtr();

// Assume value in RSCRATCH

This comment was marked as off-topic.

@@ -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.

This comment was marked as off-topic.

@hthh
Copy link

hthh commented Nov 9, 2016

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 RPPCSTATE relative? It just occurred to me as perhaps being a nice trade-off that could resolve many PIE issues with minimal register reshuffling (e.g. in your Jit_Integer patch), and probably fewer bytes of generated code. But I can definitely see that it could be a bit more confusing in the long run (especially if we want to move more global variables, or the ppcState, to the heap).

@degasus degasus force-pushed the master branch 2 times, most recently from dfee1c5 to 5082a66 Compare December 4, 2016 12:07
@degasus degasus changed the title Jit64: Trivial PIE issues. Jit64: Fix a few trivial PIE issues. Dec 4, 2016
@degasus
Copy link
Member Author

degasus commented Dec 10, 2016

@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...

@degasus degasus merged commit d64c9dd into dolphin-emu:master Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants