This commit is contained in:
Vincent Gee 2014-11-04 07:19:14 -05:00
parent 378a933894
commit 125901648a

View file

@ -91,25 +91,27 @@ void Platform::setMathControlStateKnown()
fldcw cw fldcw cw
} }
} }
#else #else
// @source http://msdn.microsoft.com/en-us/library/c9676k6h.aspx
U32 Platform::getMathControlState( ) U32 Platform::getMathControlState( )
{ {
// @todo x64 See http://msdn.microsoft.com/en-us/library/c9676k6h.aspx U32 control_word = 0;
return 0; S32 error = _controlfp_s( &control_word, _DN_FLUSH, _MCW_DN );
return error ? 0 : control_word;
} }
void Platform::setMathControlState( U32 state ) void Platform::setMathControlState( U32 state )
{ {
// @todo x64 See http://msdn.microsoft.com/en-us/library/c9676k6h.aspx U32 control_word = 0;
_controlfp_s( &control_word, state, _MCW_DN );
} }
void Platform::setMathControlStateKnown( ) void Platform::setMathControlStateKnown( )
{ {
// @todo x64 See http://msdn.microsoft.com/en-us/library/c9676k6h.aspx U32 control_word = 0;
_controlfp_s (&control_word, _PC_64, _MCW_DN);
} }
#endif #endif
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------