On Wed Jul 2 17:20:59 2025 +0000, Alfred Agrell wrote:
Is the game calling into ddraw with a nonempty x87 stack? That not legal under stdcall abi. But it wouldn't be the first time some random app violates the ABI rules. In my opinion, it'd make more sense to keep math as SSE, and explicitly clear the x87 stack with asm at some select entry points. For example something like
fstsw ax again: test ax, 0x3800 je done fstp st(0) add ax, 0x0800 jmp again done:
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.