- The x87 precision control is now explicitly set for double precision, since

GCC defaults to extended precision instead, unlike Visual C++.
- Removed the useless src/Linux directory from the repository. This was a
  holdover from the long-gone 1.22 build system.



SVN r1118 (trunk)
This commit is contained in:
Randy Heit 2008-08-06 18:26:25 +00:00
parent c8538efda9
commit efb8ffc459
3 changed files with 18617 additions and 18589 deletions

View File

@ -1,3 +1,7 @@
August 6, 2008
- The x87 precision control is now explicitly set for double precision, since
GCC defaults to extended precision instead, unlike Visual C++.
August 6, 2008 (Changes by Graf Zahl) August 6, 2008 (Changes by Graf Zahl)
- Fixed a few minor DECORATE bugs. - Fixed a few minor DECORATE bugs.
- Changed coordinate storage for EntityBoss so that it works properly even - Changed coordinate storage for EntityBoss so that it works properly even

View File

@ -116,6 +116,12 @@ else( WIN32 )
if( NO_GTK ) if( NO_GTK )
add_definitions( -DNO_GTK=1 ) add_definitions( -DNO_GTK=1 )
endif( NO_GTK ) endif( NO_GTK )
find_path( FPU_CONTROL_DIR fpu_control.h )
if( FPU_CONTROL_DIR )
include_directories( ${FPU_CONTROL_DIR} )
add_definitions( -DHAVE_FPU_CONTROL )
endif( FPU_CONTROL_DIR )
endif( WIN32 ) endif( WIN32 )
if( X64 ) if( X64 )

View File

@ -33,6 +33,11 @@
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#ifdef HAVE_CPU_CONTROL
#include <fpu_control.h>
#endif
#include <float.h>
#ifdef unix #ifdef unix
#include <unistd.h> #include <unistd.h>
#endif #endif
@ -2069,6 +2074,19 @@ void D_DoomMain (void)
srand(I_MSTime()); srand(I_MSTime());
// Set the FPU precision to 53 significant bits. This is the default
// for Visual C++, but not for GCC, so some slight math variances
// might crop up if we leave it alone.
#if defined(_FPU_GETCW)
{
int cw;
_FPU_GETCW(cw);
_FPU_SETCW((cw & ~_FPU_EXTENDED) | _FPU_DOUBLE);
}
#elif defined(_PC_53)
_control87(_PC_53, _MCW_PC);
#endif
PClass::StaticInit (); PClass::StaticInit ();
atterm (C_DeinitConsole); atterm (C_DeinitConsole);