Author: aandrejevic
Date: Fri May 22 03:40:44 2015
New Revision: 67844
URL:
http://svn.reactos.org/svn/reactos?rev=67844&view=rev
Log:
[FAST486]
Fix comparing NaNs in Fast486FpuCompare.
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=6784…
==============================================================================
--- trunk/reactos/lib/fast486/fpu.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fast486/fpu.c [iso-8859-1] Fri May 22 03:40:44 2015
@@ -767,13 +767,17 @@
{
if (FPU_IS_NAN(FirstOperand) || FPU_IS_NAN(SecondOperand))
{
- if (FPU_IS_POS_INF(FirstOperand) && FPU_IS_NEG_INF(SecondOperand))
+ if ((FPU_IS_POS_INF(FirstOperand)
+ && (!FPU_IS_NAN(SecondOperand) || FPU_IS_NEG_INF(SecondOperand)))
+ || (!FPU_IS_NAN(FirstOperand) && FPU_IS_NEG_INF(SecondOperand)))
{
State->FpuStatus.Code0 = FALSE;
State->FpuStatus.Code2 = FALSE;
State->FpuStatus.Code3 = FALSE;
}
- else if (FPU_IS_NEG_INF(FirstOperand) && FPU_IS_POS_INF(SecondOperand))
+ else if ((FPU_IS_POS_INF(SecondOperand)
+ && (!FPU_IS_NAN(FirstOperand) || FPU_IS_NEG_INF(FirstOperand)))
+ || (!FPU_IS_NAN(SecondOperand) &&
FPU_IS_NEG_INF(FirstOperand)))
{
State->FpuStatus.Code0 = TRUE;
State->FpuStatus.Code2 = FALSE;