mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-09 19:00:20 +02:00
Currently FEX will always jump out of the JIT any time FCW was getting written to, ensuring that the softfloat state is setup to rounding at the time of FCW getting written. This has the unintended side-effect that even in "x87 reduced precision" mode we were jumping out of the JIT. This hit a real world use case of an installer reloading FCW after every x87 operation and generating a block with 2297 instructions. Instead when jumping out of the JIT for handling x87 operations, load FCW and pass it as the first argument of the handler. Setting the softfloat state at that point. This helps the installer's hottest block by cutting it down to 1477 instructions. 64.3% of the original size. The code block is still burning 90% of the CPU time of the installer but the performance is significantly better while it is doing its decompression. In order to optimize this installer's block of code more then we will likely need to optimize out x87 stack usage.