On Wed Jul 2 17:23:44 2025 +0000, Paul Gofman wrote:
I don't think such a hack, explicitly clearing FP stack in every function, is a good solution. Besides, I doubt this is one single game with single problem, some other may break elsewise (e. g., setting x87 state which will influence some math but only if x87 is used). So I am wondering if we can keep some select dlls as x87 as needed.
I'm not sure what the best solution is. We could introduce a mechanism to specify the FP mode for selected modules, but technically there's no guarantee the result will be correct if we're called with an invalid x87 stack state. Maybe we could just use `fninit` (preserving the control word, if needed) in specific cases.
Do you remember if the Re-Volt issue was tied to a particular piece of functionality? I can’t reproduce it. The game runs fine and I can enter a race with SSE math enabled (tested with both GCC and Clang builds). Maybe the issue has been fixed in the game itself?