dolphin/Source/Core
Fiora 4f18f6078f JIT64: Fix fmul rounding issues
Thanks to magumagu's softfp experiments, we know a lot more about the Wii's
strange floating point unit than we used to. In particular, when doing a
single-precision floating point multiply (fmulsx), it rounds the right hand
side's mantissa so as to lose the low 28 bits (of the 53-bit mantissa).

Emulating this behavior in Dolphin fixes a bunch of issues with games that
require extremely precise emulation of floating point hardware, especially
game replays. Fortunately, we can do this with rather little CPU cost; just ~5
extra instructions per multiply, instead of the vast load of a pure-software
float implementation.

This doesn't make floating-point behavior at all perfect. I still suspect
fmadd rounding might not be quite right, since the Wii uses fused instructions
and Dolphin doesn't, and NaN/infinity/exception handling is probably off in
various ways... but it's definitely way better than before.

This appears to fix replays in Mario Kart Wii, Mario Kart Double Dash, and
Super Smash Brothers Brawl. I wouldn't be surprised if it fixes a bunch of
other stuff too.

The changes to instructions other than fmulsx may not be strictly necessary,
but I included them for completeness, since it feels wrong to fix some
instructions but not others, since some games we didn't test might rely on
them.
2014-08-24 10:28:52 -07:00
..
AudioCommon Remove dsound audio backend. 2014-08-23 11:19:19 -07:00
Common windows: remove now-extraneous NOMINMAX and WIN32_LEAN_AND_MEAN #defines from dolphin code. 2014-08-23 10:48:48 -07:00
Core JIT64: Fix fmul rounding issues 2014-08-24 10:28:52 -07:00
DiscIO Windows: Use a shared precompiled header for dolphin code under Source/ 2014-08-14 23:51:13 -07:00
DolphinWX Remove dsound audio backend. 2014-08-23 11:19:19 -07:00
InputCommon windows: remove now-extraneous NOMINMAX and WIN32_LEAN_AND_MEAN #defines from dolphin code. 2014-08-23 10:48:48 -07:00
VideoBackends Merge pull request #764 from magcius/new-nogui-2 2014-08-21 14:14:54 -04:00
VideoCommon windows: remove now-extraneous NOMINMAX and WIN32_LEAN_AND_MEAN #defines from dolphin code. 2014-08-23 10:48:48 -07:00
CMakeLists.txt