Fix rounding of some x87 instructions#951
Conversation
|
Why are setting the round mode for each float operation? what software requires that? For example, I don't expact any software to relly on the rounding mode for an Addition between 2 float numbers. |
Touhou 12.3 Hisoutensoku requires it. Its netplay dependents of the accuracy of computing (mainly the four basic math operations) and converting of float. Even the tiny difference caused by a different rounding mode can lead to desynchronization in netplay. |
|
I see. Well, all those set/unset of the rounding will slow down stuff for many games that don't need it. Can you put this new code behind |
yes of course |
They should work in Android build
done |
|
Oops messages of all these commits were included in the 35ea6fd. Is this ok? |
Yeah, I that's fine |
Ported from ptitSeb/box86#951. The original pull request and this commit also contain some improvements on precision of `F2XM1` and `FYL2XP1`.
* Port rounding of some x87 instructions from Box86 Ported from ptitSeb/box86#951. The original pull request and this commit also contain some improvements on precision of `F2XM1` and `FYL2XP1`. * Run fpu_rounding test with dynarec only for ARM64 They have been implemented on dynarec only for ARM64.
The rounding is not very precise, because of the implement of math functions of gibc. It should be better than nothing though.
Trigonometric instructions (
FSIN,FCOS,FSINCOSandFPTAN) still use the default rounding mode, forsin,cosandtanof glibc don't follow the current rounding mode.