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
Refactor the fastmem/trampoline code #3496
Conversation
gqr_modified = true; | ||
break; | ||
} | ||
} |
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.
40be166
to
7905e5e
Compare
The Android build uses a struct with the same name -- I'll rename the x64 version to something else to fix that part of the build. |
f3e91ba
to
3dd3018
Compare
This code is no longer WIP and is ready for review/testing |
FYI, I consider this a risky change and as such it won't be merged until 5.0 is out (sorry!). |
No worries.. this is just queued up for post-5.0. |
3dd3018
to
81ee61d
Compare
81ee61d
to
e786cd9
Compare
Source looks good to me in general (apart from the few notes I left), but I cannot really comment much on the actual implementation since I'm not overly familiar with that part of the code base. Reviewed 5 of 22 files at r1, 13 of 17 files at r3, 4 of 4 files at r4. Source/Core/Core/PowerPC/Jit64/Jit.cpp, line 648 [r4] (raw file): Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp, line 68 [r4] (raw file): Source/Core/Core/PowerPC/Jit64Common/Jit64AsmCommon.cpp, line 276 [r4] (raw file): Source/Core/Core/PowerPC/Jit64Common/Jit64AsmCommon.cpp, line 324 [r4] (raw file): Source/Core/Core/PowerPC/Jit64Common/Jit64AsmCommon.cpp, line 478 [r4] (raw file): Source/Core/Core/PowerPC/Jit64Common/Jit64AsmCommon.cpp, line 554 [r4] (raw file): Source/Core/Core/PowerPC/Jit64IL/JitIL.h, line 20 [r4] (raw file): Comments from the review on Reviewable.io |
c0254f9
to
fcef1a7
Compare
fcef1a7
to
419db71
Compare
// PC is used by memory watchpoints (if enabled) or to print accurate PC locations in debug logs | ||
MOV(32, PPCSTATE(pc), Imm32(jit->js.compilerPC)); | ||
// PC is used by memory watchpoints (if enabled) or to print accurate PC locations in debug logs | ||
MOV(32, PPCSTATE(pc), Imm32(jit->js.compilerPC)); |
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.
In general, it looks like you're making MemoryExceptionCheck itself check for DSI exceptions, rather than making the caller do it. I can't remember why I didn't do that myself the last time I was working with this code, but it should be fine. |
419db71
to
9e42b24
Compare
@@ -18,6 +18,26 @@ using namespace Gen; | |||
|
|||
void EmuCodeBlock::MemoryExceptionCheck() | |||
{ | |||
// TODO: We really should untangle the trampolines, exception handlers and | |||
// memory checks. |
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.
Moving |
LGTM. |
9e42b24
to
a359a13
Compare
Reviewed 2 of 22 files at r1, 16 of 20 files at r5, 1 of 1 files at r6. Source/Core/Core/PowerPC/JitCommon/Jit_Util.h, line 94 [r7] (raw file):
please move this bool to the other bools Source/Core/Core/PowerPC/JitCommon/Jit_Util.h, line 207 [r7] (raw file):
This map sounds quite big. Do you think it's worth to keep a set of all trampoline infos? Maybe also with a map to not generate them redundantly. Also the members of the struct are in a bad order with a lot of padding. Nevermind, I doubt this is possible because of the DSI exception handler. Another idea: The TrampolineInfo seems to be quite big (50+ bytes), do you think the actual loading code is smaller? If so, we should always generate the slow path and avoid storing the info here. Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp, line 73 [r7] (raw file):
Please move this if/else into trampolines.GenerateTrampoline(info); Source/Core/Core/PowerPC/JitCommon/JitBase.h, line 15 [r7] (raw file):
Why is this header required? Comments from Reviewable |
Review status: 13 of 20 files reviewed at latest revision, 9 unresolved discussions. Source/Core/Core/PowerPC/Jit64Common/Jit64AsmCommon.cpp, line 554 [r4] (raw file):
|
Reviewed 1 of 20 files at r5, 6 of 6 files at r8. Comments from Reviewable |
f555f4c
to
ae999c1
Compare
Simplication to avoid reading back the generated instructions, allowing us to handle all possible cases.
ae999c1
to
b1296a7
Compare
Refactor the fastmem/trampoline code # Conflicts: # Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp
Refactoring fastmem code to make it more maintainable. Note that this requires #3454 to land first (the two PRs are not reorderable).