Author: aandrejevic Date: Fri May 22 23:09:13 2015 New Revision: 67853
URL: http://svn.reactos.org/svn/reactos?rev=67853&view=rev Log: [FAST486] Fix FIST(P) and FRNDINT.
Modified: trunk/reactos/lib/fast486/fpu.c
Modified: trunk/reactos/lib/fast486/fpu.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/fpu.c?rev=67853... ============================================================================== --- trunk/reactos/lib/fast486/fpu.c [iso-8859-1] (original) +++ trunk/reactos/lib/fast486/fpu.c [iso-8859-1] Fri May 22 23:09:13 2015 @@ -2086,7 +2086,7 @@ /* Round the result to an integer, towards zero */ if (FPU_ST(0).Exponent < FPU_REAL10_BIAS + 63) { - State->FpuControl.Rc = FPU_ROUND_DOWN; + State->FpuControl.Rc = FPU_ROUND_TRUNCATE;
if (Fast486FpuToInteger(State, &Temp, &Integer)) { @@ -2543,7 +2543,7 @@ }
/* Check if it can fit in a signed 32-bit integer */ - if ((((ULONGLONG)Temp >> 31) + 1ULL) > 1ULL) + if ((LONGLONG)((LONG)Temp) != Temp) { State->FpuStatus.Ie = TRUE;
@@ -3240,7 +3240,7 @@ }
/* Check if it can fit in a signed 16-bit integer */ - if ((((ULONGLONG)Temp >> 15) + 1ULL) > 1ULL) + if ((LONGLONG)((SHORT)Temp) != Temp) { /* Raise the invalid operation exception */ State->FpuStatus.Ie = TRUE;