![]() |
![]() |
![]() |
![]() |
![]() |
Register Allocation Woes and PsfPlayer Update
Posted on 2010-10-24 20:44:58 |
While I was working on the x64 code generator, I found out that the register allocation phase in the JIT compiler was inserting register spill instructions inside function call sequences. This can cause problems on the x64 and ARM platforms because they both use registers to pass function arguments. I couldn't find an easy way to fix the register allocation algorithm, so I decided to use a 'naive' register allocator (the one I was using before) instead of the linear scan algorithm that was present. It doesn't seem to make any difference in the emulation speed, so I guess it's all good for now.
This bug was present in the x64 version of PsfPlayer and it was noticeable in some PSF sets, which would play in an strange manner. I released a new version that fixes the problem. It's available on the downloads page. Besides that, I also implemented enough of the x64 code generator to be able to play Doom and Quake. I was glad to see that both games were running faster in the x64 version of the emulator. That means that all that wasn't for nothing after all. I'm currently busy getting some of the commercial games running again. More info coming soon... |