2025-07-19 14:10 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000938Spring engineGeneralpublic2009-03-31 15:56
ReporterRalith 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product Version0.76b1+svn 
Target VersionFixed in Version 
Summary0000938: [PATCH] Sync warning fix to ignore unexpected value in unused 'X' bit of fpu control word
DescriptionAll calls to good_fpu_control_registers on FreeBSD were resulting in warnings, even when one was placed right after another. Research by tvo showed that the only differing bit between what was desired and what was recieved, the 'X' bit, was unused according to intel. This patch modifies rts/System/FPUCheck.h to ignore that bit. Sync testing in multiplayer has not yet been done.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • patch file icon fpucheck-ignoredbit.patch (560 bytes) 2008-05-16 01:55 -
    Index: rts/System/FPUCheck.h
    ===================================================================
    --- rts/System/FPUCheck.h	(revision 5893)
    +++ rts/System/FPUCheck.h	(working copy)
    @@ -82,7 +82,7 @@
     #elif defined(STREFLOP_X87)
     	fenv_t fenv;
     	fegetenv(&fenv);
    -	bool ret = (fenv & 0x1F3F) == 0x003A || (fenv & 0x1F3F) == 0x003F;
    +	bool ret = (fenv & 0x0F3F) == 0x003A || (fenv & 0x0F3F) == 0x003F;
     	if (!ret) {
     		logOutput.Print("Sync warning: FPUCW 0x%04X instead of 0x003A or 0x003F (\"%s\")", fenv, text);
     		// Set single precision floating point math.
    
    patch file icon fpucheck-ignoredbit.patch (560 bytes) 2008-05-16 01:55 +

-Relationships
related to 0001102resolvedabma `FPUCW 0x107F instead of 0x003A or 0x003F' message spamming the console on FreeBSD 
+Relationships

-Notes

~0002300

tvo (reporter)

I realized later that the X bit isn't changed at all by streflop_init, so probably the FPU still remembers the X bit, and FreeBSD for some reason has the X bit set by default.

Hence, a cleaner fix would probably be to reset the X bit on all archs in streflop_init.

However, if this syncs fine then I'll just apply this. Let us know when you did some multiplayer testing.
+Notes

-Issue History
Date Modified Username Field Change
2008-05-16 01:55 Ralith New Issue
2008-05-16 01:55 Ralith File Added: fpucheck-ignoredbit.patch
2008-05-20 20:55 tvo Note Added: 0002300
2008-10-10 15:33 tvo Relationship added related to 0001102
2009-03-31 15:56 Auswaschbar Status new => closed
2009-03-31 15:56 Auswaschbar Resolution open => fixed
+Issue History