summaryrefslogtreecommitdiff
path: root/src/sys_unix.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2011-02-06 23:40:20 +0300
committerAndrey Nazarov <skuller@skuller.net>2011-02-07 15:27:21 +0300
commit06d6c024cde24f42d0980725b9e1d50713af646e (patch)
treeaaacdfa9b266c598255789febad11446686e5ee9 /src/sys_unix.c
parent9176271b895c4e71d7e383cb8655a7b545b73b33 (diff)
Rework the way FPU issues are handled on i386.
Kill Sys_FixFPCW. Instead implement inline macros that wrap around critical sections of code (pmove and game library calls) and push/pop FPU control word dynamically.
Diffstat (limited to 'src/sys_unix.c')
-rw-r--r--src/sys_unix.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/sys_unix.c b/src/sys_unix.c
index 1ff2370..4d3ab0c 100644
--- a/src/sys_unix.c
+++ b/src/sys_unix.c
@@ -604,27 +604,6 @@ qboolean Sys_GetAntiCheatAPI( void ) {
}
#endif
-void Sys_FixFPCW( void ) {
-#ifdef __i386__
- uint16_t cw;
-
- __asm__ __volatile__( "fnstcw %0" : "=m" (cw) );
-
- Com_DPrintf( "FPU control word: %x\n", cw );
-
- if( cw & 0x300 ) {
- Com_DPrintf( "Setting FPU to single precision mode\n" );
- cw &= ~0x300;
- }
- if( cw & 0xC00 ) {
- Com_DPrintf( "Setting FPU to round to nearest mode\n" );
- cw &= ~0xC00;
- }
-
- __asm__ __volatile__( "fldcw %0" : : "m" (cw) );
-#endif
-}
-
static void hup_handler( int signum ) {
Com_FlushLogs();
}
@@ -726,8 +705,6 @@ void Sys_Init( void ) {
signal( SIGFPE, kill_handler );
signal( SIGTRAP, kill_handler );
}
-
- Sys_FixFPCW();
}
#if USE_SYSCON