I'd estimate 30% or so of the time (okay this was a year and a half ago so my estimates are probably way off) was a slightly mind-numbing scan over the entire recompiler codebase, inspecting each use of a x86 32-bit e x (eax, ebx, etc) register and either swapping it to a renamed version of the register (for my sanity, so I didn't accidentally look over the same code twice) or for a 64-bit rx (rax, rbx, etc) register depending on whether it was being used to store a 32-bit integer (stays 32 bits) or a host pointer (needs to be upgraded to 64 bits). I mostly used output from this website as a reference (which is just wrapping GCC + objdump but apparently I like websites or something). Thankfully 32-bit and 64-bit x86 are fairly similar, but there were some minor differences that caused some problems. Upgrading the machine code emitter to properly emit x86-64 code took a bit of that. In the end, it took less time than I expected, but still took about 2 months to get everything working. When I originally started work on the Mac port, I hadn't committed to full 64-bit support yet, so the first one was my fixes to make the interpreter run on my MacĪnother person opened another PR for the main recompiler upgrade, which we ended up using as a communication and planning channel and can be seen here It won't be as nice to read as a Dolphin-style progress report, but it does contain the majority of the discussion on the things that happened to get 64-bit support working. If you're curious about the journey, I'd recommend looking at the PRs that added it. When I joined the project, I was working on trying to get the emulator working on macOS, which had dropped 32-bit support the year before, making 64-bit support a higher priority for me than anyone else. I think a large part of the reason was that everyone was content with the 32-bit JIT, which worked fine at the time (and still does for that matter). It wasn't really a "will never happen" kind of thing, more of a "this will be a lot of work and no one's currently planning on doing it".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |