mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-21 18:21:08 +00:00
Get rid of Sys_FPU_SetRounding()
Unused.
This commit is contained in:
parent
0ef470de6c
commit
a4558bb080
2 changed files with 0 additions and 34 deletions
|
@ -58,13 +58,6 @@ typedef enum {
|
|||
FPU_PRECISION_DOUBLE_EXTENDED = 2
|
||||
} fpuPrecision_t;
|
||||
|
||||
typedef enum {
|
||||
FPU_ROUNDING_TO_NEAREST = 0,
|
||||
FPU_ROUNDING_DOWN = 1,
|
||||
FPU_ROUNDING_UP = 2,
|
||||
FPU_ROUNDING_TO_ZERO = 3
|
||||
} fpuRounding_t;
|
||||
|
||||
typedef enum {
|
||||
AXIS_SIDE,
|
||||
AXIS_FORWARD,
|
||||
|
@ -167,9 +160,6 @@ void Sys_FPU_EnableExceptions( int exceptions );
|
|||
// sets the FPU precision
|
||||
void Sys_FPU_SetPrecision( int precision );
|
||||
|
||||
// sets the FPU rounding mode
|
||||
void Sys_FPU_SetRounding( int rounding );
|
||||
|
||||
// sets Flush-To-Zero mode
|
||||
void Sys_FPU_SetFTZ( bool enable );
|
||||
|
||||
|
|
|
@ -297,27 +297,3 @@ void Sys_FPU_SetPrecision( int precision ) {
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Sys_FPU_SetRounding
|
||||
================
|
||||
*/
|
||||
void Sys_FPU_SetRounding( int rounding ) {
|
||||
#ifdef _MSC_VER
|
||||
short roundingBitTable[4] = { 0, 1, 2, 3 };
|
||||
short roundingBits = roundingBitTable[rounding & 3] << 10;
|
||||
short roundingMask = ~( ( 1 << 11 ) | ( 1 << 10 ) );
|
||||
|
||||
__asm {
|
||||
mov eax, statePtr
|
||||
mov cx, roundingBits
|
||||
fnstcw word ptr [eax]
|
||||
mov bx, word ptr [eax]
|
||||
and bx, roundingMask
|
||||
or bx, cx
|
||||
mov word ptr [eax], bx
|
||||
fldcw word ptr [eax]
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue