06-29-2015, 02:38 AM
64-bit allows you to do some neat optimizations that cannot be done on 32-bit, or use more cycles on 32-bit. That's the biggest thing I noticed is that it lets you get away with a few optimizations that aren't possible on 32-bit.
I'm not the greatest person to talk about the JIT, but a lot of the issues was that general JIT changes would break JIT32/JITIL (either 32/64) rather than the actual emulation of individual instructions. Any kind of MMU optimization, register optimization, or just general stuff like the far code cache. I don't know why it broke JIT32, but in the end it became a liability.
Don't get me wrong, 64-bit is absolutely better for emulation and definitely a bit faster, but don't use Dolphin as the benchmark. Dolphin was absolutely having issues maintaining a 32-bit and 64-bit JIT, and part of what made 64-bit superior were things that just weren't implemented in the 32-bit JIT. That said, after dropping JIT32, Dolphin's CPU emulation sped up by over 100% in most games. This is a mixture of using some JIT64 only tricks and the fact that whenever someone did something to the JIT, they no longer had to worry about doing it to the 32-bit JIT.
Probably the best one is the flagopts merge, where each JIT had to be manually updated for it. That merge alone killed JITIL (for months), JITILARM (permanently, was discontinued) and was held up on implementations as well. Something like that is extremely hard to implement for each core. Things like that led to the death of JIT32, and eventually memory mapping issues killed off JIT ARMv7 as well.
If your plan is to have both a 64-bit and 32-bit implementation of the CPU emulation, you're going to see fairly small gains unless there are a lot of things that can be optimized. The added overhead of maintaining multiple CPU cores could be a total pain in the ass as well. I could see a 64-bit dynamic recompiler alongside a 32-bit recompiler in PCSX2 making anywhere from no difference to being 30% faster.
I'm not the greatest person to talk about the JIT, but a lot of the issues was that general JIT changes would break JIT32/JITIL (either 32/64) rather than the actual emulation of individual instructions. Any kind of MMU optimization, register optimization, or just general stuff like the far code cache. I don't know why it broke JIT32, but in the end it became a liability.
Don't get me wrong, 64-bit is absolutely better for emulation and definitely a bit faster, but don't use Dolphin as the benchmark. Dolphin was absolutely having issues maintaining a 32-bit and 64-bit JIT, and part of what made 64-bit superior were things that just weren't implemented in the 32-bit JIT. That said, after dropping JIT32, Dolphin's CPU emulation sped up by over 100% in most games. This is a mixture of using some JIT64 only tricks and the fact that whenever someone did something to the JIT, they no longer had to worry about doing it to the 32-bit JIT.
Probably the best one is the flagopts merge, where each JIT had to be manually updated for it. That merge alone killed JITIL (for months), JITILARM (permanently, was discontinued) and was held up on implementations as well. Something like that is extremely hard to implement for each core. Things like that led to the death of JIT32, and eventually memory mapping issues killed off JIT ARMv7 as well.
If your plan is to have both a 64-bit and 32-bit implementation of the CPU emulation, you're going to see fairly small gains unless there are a lot of things that can be optimized. The added overhead of maintaining multiple CPU cores could be a total pain in the ass as well. I could see a 64-bit dynamic recompiler alongside a 32-bit recompiler in PCSX2 making anywhere from no difference to being 30% faster.