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

PowerPC/MMU: Refactor to class, move to System. #11700

Merged
merged 1 commit into from Apr 1, 2023

Conversation

AdmiralCurtiss
Copy link
Contributor

This one ended up being pretty large, but it's mostly straightforward too. A few notes of stuff that might look odd:

  • The Host functions ended up as static methods in the MMU instead of freestanding ones because they need to access private MMU stuff after getting the MMU instance from the passed guard via System.
  • There were a few functions that that aren't actually used anywhere (Read_F64, Read_F32, Write_F64). I've removed those, they were just bitcasts around the unsigned integer variants anyway, so if anyone needs it they can just do that on the caller side.
  • The TranslateBatAddress (actually TranslateBatAddess but I fixed the typo) function was previously defined inline in MMU.h but only used inside MMU.cpp, so I've moved it in there.
  • I ended up with two different sets of functions for the JITs to call out to. This is a bit silly and definitely refactorable in the future, but it ended up being easier to do this way because the Jit64 uses the ABI_CallFunctionXXX helper functions that always have pointers as their first argument, while the JitArm64 function that calls the MMU uses a very peculiar method of register allocation that seemed prudent not to touch.

@AdmiralCurtiss
Copy link
Contributor Author

Oh and as usual the ARM changes are untested, so I would appreciate a basic check if stuff still runs.

Copy link
Member

@JosJuice JosJuice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and tested.

@JosJuice JosJuice merged commit 450ca0b into dolphin-emu:master Apr 1, 2023
14 checks passed
@AdmiralCurtiss AdmiralCurtiss deleted the mmu-class branch April 1, 2023 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants