Bug 52488, floating point denormal exception

Stefan Dösinger stefandoesinger at gmail.com
Mon Jan 31 03:52:51 CST 2022


Am Montag, 31. Jänner 2022, 01:14:25 EAT schrieb Fabian Maurer:
> Hello wine-devel,
> 
> attaching a patch that works around a floating point issue, this is how they
> do it on otya128/winevdm, the win16 wine fork.
> Is this the correct way to do it, or why does Wine code do what it does?

A while back (circa 2019 I think) I spent some spare time learning about Win16 
and came across floating point exceptions. Wine has pretty much no handling of 
float exceptions. To make matters worse, new-ish CPUs have bugs / features that 
break things. I think Sandy Bridge and newer Intel CPUs set the %cs segment to 
0 in fxrstor. That breaks a pile of Win16 applications even when run inside a 
virtual machine (but not when run inside a full CPU emulator).

Netscape 4 is the application where I came across the problem. Microsoft has 
some floating point sample applications that also show the issue.

So to answer your question: I don't really know, but I suspect the patch just 
hides the real problem by luck. The correct thing would be to bring the Win16 
float exception handling code from winevdm back to Wine. I don't know how 
correct it is though. And on top of that try to find workarounds for whatever 
CPU errata there are nowadays :-/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220131/31ac0526/attachment.sig>


More information about the wine-devel mailing list