From 6b67f245cf1cbbc29428bcd351d23f1f395127dd Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Fri, 22 May 2015 23:09:13 +0000 Subject: [PATCH] [FAST486] Fix FIST(P) and FRNDINT. svn path=/trunk/; revision=67853 --- reactos/lib/fast486/fpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/lib/fast486/fpu.c b/reactos/lib/fast486/fpu.c index 2634dd83b8a..5dad2683b65 100644 --- a/reactos/lib/fast486/fpu.c +++ b/reactos/lib/fast486/fpu.c @@ -2086,7 +2086,7 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD9) /* 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 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDB) } /* 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 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDF) } /* 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;