From 92ce0174ac52a1391768d7e83e0d0cea9a861093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 3 Nov 2013 23:13:53 +0000 Subject: [PATCH] [FAST486]: Code formatting only. svn path=/branches/ntvdm/; revision=60857 --- lib/fast486/extraops.c | 6 +++--- lib/fast486/opcodes.c | 16 ++++++++-------- lib/fast486/opgroups.c | 26 +++++++++++--------------- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/lib/fast486/extraops.c b/lib/fast486/extraops.c index c7ccf51b3f1..e5ca741c696 100644 --- a/lib/fast486/extraops.c +++ b/lib/fast486/extraops.c @@ -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); diff --git a/lib/fast486/opcodes.c b/lib/fast486/opcodes.c index 346f35ce375..b5b032f2625 100644 --- a/lib/fast486/opcodes.c +++ b/lib/fast486/opcodes.c @@ -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); diff --git a/lib/fast486/opgroups.c b/lib/fast486/opgroups.c index b2957650d07..61c42a8410e 100644 --- a/lib/fast486/opgroups.c +++ b/lib/fast486/opgroups.c @@ -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);