[Bug 50429] Serious Sam Engine / Serious Sam Classic broken MP with math functions from musl

WineHQ Bugzilla wine-bugs at winehq.org
Tue Jan 5 06:05:57 CST 2021


https://bugs.winehq.org/show_bug.cgi?id=50429

--- Comment #11 from Piotr Caban <piotr.caban at gmail.com> ---
Created attachment 69076
  --> https://bugs.winehq.org/attachment.cgi?id=69076
asin test app

Let's focus on 32-bit for now - this is what this bug is about.

Your test result are not matching with mine, I'm attaching test application
I've used. I have also tested the function on all values listed in attached
log. The attached test compares values returned by ucrtbase and msvcrt. It can
be run on Windows or on Wine (e.g. with native ucrtbase).

Sample usage:
i686-w64-mingw32-gcc test.c
a.exe asin 1 10000 |grep -v "status word error"
or to change precision you can run:
a.exe asin 1 10000 0xa001f

Here's what I can see:
 - ucrtbase returns exactly the same values as msvcrt for all tested values
(tested on Windows XP, 7, 10) (it includes both random arguments and all the
arguments from attached log)

Note that x87 returned values are not guaranteed to match on different CPUs. It
might affect the test results. This is one of the advantages of using sse.

Here are some more notes:
 - ucrtbase uses sse instructions if x87 control word is not changed
 - ucrtbase uses x87 implementation after changing x87 (and sse) rounding mode
 - msvcrt uses x87 implementation
 - x87 precision control is not affecting the results on Windows (both in
msvcrt and ucrtbase)

What was not tested? I didn't check if the game changes x87 control word. I've
tested only changing precision and rounding control words.
What would be interesting to test? If the game has similar problems when game
is run on Windows boxes with CPU's that are returning different values for asin
(if there are any).

Long story short: the main differences in test results are x87 precision flags
effect and values comparison between msvcrt and ucrtbase.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list