[FAST486]: Code formatting only.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 3 Nov 2013 23:13:53 +0000 (23:13 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 3 Nov 2013 23:13:53 +0000 (23:13 +0000)
svn path=/branches/ntvdm/; revision=60857

lib/fast486/extraops.c
lib/fast486/opcodes.c
lib/fast486/opgroups.c

index c7ccf51..e5ca741 100644 (file)
@@ -739,7 +739,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchgByte)
     Result = Accumulator - Destination;
 
     /* Update the flags */
-    State->Flags.Cf = Accumulator < Destination;
+    State->Flags.Cf = (Accumulator < Destination);
     State->Flags.Of = ((Accumulator & SIGN_FLAG_BYTE) != (Destination & SIGN_FLAG_BYTE))
                       && ((Accumulator & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE));
     State->Flags.Af = (Accumulator & 0x0F) < (Destination & 0x0F);
@@ -795,7 +795,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchg)
         Result = Accumulator - Destination;
 
         /* Update the flags */
-        State->Flags.Cf = Accumulator < Destination;
+        State->Flags.Cf = (Accumulator < Destination);
         State->Flags.Of = ((Accumulator & SIGN_FLAG_LONG) != (Destination & SIGN_FLAG_LONG))
                           && ((Accumulator & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG));
         State->Flags.Af = (Accumulator & 0x0F) < (Destination & 0x0F);
@@ -830,7 +830,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchg)
         Result = Accumulator - Destination;
 
         /* Update the flags */
-        State->Flags.Cf = Accumulator < Destination;
+        State->Flags.Cf = (Accumulator < Destination);
         State->Flags.Of = ((Accumulator & SIGN_FLAG_WORD) != (Destination & SIGN_FLAG_WORD))
                           && ((Accumulator & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD));
         State->Flags.Af = (Accumulator & 0x0F) < (Destination & 0x0F);
index 346f35c..b5b032f 100644 (file)
@@ -3065,7 +3065,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmpSubByteModrm)
     Result = FirstValue - SecondValue;
 
     /* Update the flags */
-    State->Flags.Cf = FirstValue < SecondValue;
+    State->Flags.Cf = (FirstValue < SecondValue);
     State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) != (SecondValue & SIGN_FLAG_BYTE))
                       && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE));
     State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F);
@@ -3134,7 +3134,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmpSubModrm)
         Result = FirstValue - SecondValue;
 
         /* Update the flags */
-        State->Flags.Cf = FirstValue < SecondValue;
+        State->Flags.Cf = (FirstValue < SecondValue);
         State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) != (SecondValue & SIGN_FLAG_LONG))
                           && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG));
         State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F);
@@ -3181,7 +3181,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmpSubModrm)
         Result = FirstValue - SecondValue;
 
         /* Update the flags */
-        State->Flags.Cf = FirstValue < SecondValue;
+        State->Flags.Cf = (FirstValue < SecondValue);
         State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) != (SecondValue & SIGN_FLAG_WORD))
                           && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD));
         State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F);
@@ -3231,7 +3231,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmpSubAl)
     Result = FirstValue - SecondValue;
 
     /* Update the flags */
-    State->Flags.Cf = FirstValue < SecondValue;
+    State->Flags.Cf = (FirstValue < SecondValue);
     State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) != (SecondValue & SIGN_FLAG_BYTE))
                       && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE));
     State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F);
@@ -3274,7 +3274,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmpSubEax)
         Result = FirstValue - SecondValue;
 
         /* Update the flags */
-        State->Flags.Cf = FirstValue < SecondValue;
+        State->Flags.Cf = (FirstValue < SecondValue);
         State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) != (SecondValue & SIGN_FLAG_LONG))
                           && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG));
         State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F);
@@ -3304,7 +3304,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmpSubEax)
         Result = FirstValue - SecondValue;
 
         /* Update the flags */
-        State->Flags.Cf = FirstValue < SecondValue;
+        State->Flags.Cf = (FirstValue < SecondValue);
         State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) != (SecondValue & SIGN_FLAG_WORD))
                           && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD));
         State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F);
@@ -5566,7 +5566,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmps)
     Result = (FirstValue - SecondValue) & DataMask;
 
     /* Update the flags */
-    State->Flags.Cf = FirstValue < SecondValue;
+    State->Flags.Cf = (FirstValue < SecondValue);
     State->Flags.Of = ((FirstValue & SignFlag) != (SecondValue & SignFlag))
                       && ((FirstValue & SignFlag) != (Result & SignFlag));
     State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F);
@@ -5890,7 +5890,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeScas)
     Result = (FirstValue - SecondValue) & DataMask;
 
     /* Update the flags */
-    State->Flags.Cf = FirstValue < SecondValue;
+    State->Flags.Cf = (FirstValue < SecondValue);
     State->Flags.Of = ((FirstValue & SignFlag) != (SecondValue & SignFlag))
                       && ((FirstValue & SignFlag) != (Result & SignFlag));
     State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F);
index b295765..61c42a8 100644 (file)
@@ -120,7 +120,7 @@ Fast486ArithmeticOperation(PFAST486_STATE State,
             Result = (FirstValue - SecondValue) & MaxValue;
 
             /* Update CF, OF and AF */
-            State->Flags.Cf = FirstValue < SecondValue;
+            State->Flags.Cf = (FirstValue < SecondValue);
             State->Flags.Of = ((FirstValue & SignFlag) != (SecondValue & SignFlag))
                               && ((FirstValue & SignFlag) != (Result & SignFlag));
             State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F);
@@ -184,8 +184,8 @@ Fast486RotateOperation(PFAST486_STATE State,
 
             /* Update CF and OF */
             State->Flags.Cf = Result & 1;
-            if (Count == 1) State->Flags.Of = ((Result & HighestBit) != 0)
-                                              ^ State->Flags.Cf;
+            if (Count == 1) State->Flags.Of = State->Flags.Cf
+                                              ^ ((Result & HighestBit) != 0);
 
             break;
         }
@@ -212,8 +212,8 @@ Fast486RotateOperation(PFAST486_STATE State,
 
             /* Update CF and OF */
             State->Flags.Cf = ((Value & (1 << (Bits - Count))) != 0);
-            if (Count == 1) State->Flags.Of = ((Result & HighestBit) != 0)
-                                              ^ State->Flags.Cf;
+            if (Count == 1) State->Flags.Of = State->Flags.Cf
+                                              ^ ((Result & HighestBit) != 0);
 
             break;
         }
@@ -241,8 +241,8 @@ Fast486RotateOperation(PFAST486_STATE State,
 
             /* Update CF and OF */
             State->Flags.Cf = ((Value & (1 << (Bits - Count))) != 0);
-            if (Count == 1) State->Flags.Of = ((Result & HighestBit) != 0)
-                                              ^ State->Flags.Cf;
+            if (Count == 1) State->Flags.Of = State->Flags.Cf
+                                              ^ ((Result & HighestBit) != 0);
 
             break;
         }
@@ -994,8 +994,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF6)
             SHORT Result = (SHORT)((CHAR)Value) * (SHORT)((CHAR)State->GeneralRegs[FAST486_REG_EAX].LowByte);
 
             /* Update the flags */
-            State->Flags.Cf = State->Flags.Of =
-            ((Result < -128) || (Result > 127));
+            State->Flags.Cf = State->Flags.Of = ((Result < -128) || (Result > 127));
 
             /* Write back the result */
             State->GeneralRegs[FAST486_REG_EAX].LowWord = (USHORT)Result;
@@ -1166,8 +1165,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF7)
                 ULONGLONG Result = (ULONGLONG)Value * (ULONGLONG)State->GeneralRegs[FAST486_REG_EAX].Long;
 
                 /* Update the flags */
-                State->Flags.Cf = State->Flags.Of =
-                ((Result & 0xFFFFFFFF00000000ULL) != 0);
+                State->Flags.Cf = State->Flags.Of = ((Result & 0xFFFFFFFF00000000ULL) != 0);
 
                 /* Write back the result */
                 State->GeneralRegs[FAST486_REG_EAX].Long = Result & 0xFFFFFFFFULL;
@@ -1196,8 +1194,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF7)
                 LONGLONG Result = (LONGLONG)((LONG)Value) * (LONGLONG)((LONG)State->GeneralRegs[FAST486_REG_EAX].Long);
 
                 /* Update the flags */
-                State->Flags.Cf = State->Flags.Of =
-                ((Result < -2147483648LL) || (Result > 2147483647LL));
+                State->Flags.Cf = State->Flags.Of = ((Result < -2147483648LL) || (Result > 2147483647LL));
 
                 /* Write back the result */
                 State->GeneralRegs[FAST486_REG_EAX].Long = Result & 0xFFFFFFFFULL;
@@ -1208,8 +1205,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF7)
                 LONG Result = (LONG)((SHORT)Value) * (LONG)((SHORT)State->GeneralRegs[FAST486_REG_EAX].LowWord);
 
                 /* Update the flags */
-                State->Flags.Cf = State->Flags.Of =
-                ((Result < -32768) || (Result > 32767));
+                State->Flags.Cf = State->Flags.Of = ((Result < -32768) || (Result > 32767));
 
                 /* Write back the result */
                 State->GeneralRegs[FAST486_REG_EAX].LowWord = LOWORD(Result);