Make sure to mask out the FPU rounding mode correctly. Good spot from LionCash.

This commit is contained in:
Ryan Houdek 2013-03-07 09:52:38 -06:00
parent eaa5a77d9e
commit f3528277c4

View File

@ -84,7 +84,7 @@ namespace FPURoundMode
}; };
unsigned short _mode; unsigned short _mode;
asm ("fstcw %0" : : "m" (_mode)); asm ("fstcw %0" : : "m" (_mode));
_mode = (_mode & ~table[4]) | table[mode]; _mode = (_mode & ~table[3]) | table[mode];
asm ("fldcw %0" : : "m" (_mode)); asm ("fldcw %0" : : "m" (_mode));
#endif #endif
#else #else