mirror of
https://github.com/reactos/reactos.git
synced 2024-07-08 13:45:06 +00:00
[FAST486]: Code formatting only (remove endlines spaces).
svn path=/branches/ntvdm/; revision=60894
This commit is contained in:
parent
aab2a03dc2
commit
a106a3b21e
|
@ -141,7 +141,7 @@ Fast486ReadMemory(PFAST486_STATE State,
|
|||
|
||||
/* Check if this is the last page */
|
||||
if (Page == PAGE_ALIGN(LinearAddress + Size - 1))
|
||||
{
|
||||
{
|
||||
/* Copy only a part of the page */
|
||||
PageLength = PAGE_OFFSET(LinearAddress + Size);
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ Fast486WriteMemory(PFAST486_STATE State,
|
|||
|
||||
/* Check if this is the last page */
|
||||
if (Page == PAGE_ALIGN(LinearAddress + Size - 1))
|
||||
{
|
||||
{
|
||||
/* Copy only a part of the page */
|
||||
PageLength = PAGE_OFFSET(LinearAddress + Size);
|
||||
}
|
||||
|
|
|
@ -398,7 +398,7 @@ Fast486GetIntVector(PFAST486_STATE State,
|
|||
else
|
||||
{
|
||||
/* Read from the real-mode IVT */
|
||||
|
||||
|
||||
/* Paging is always disabled in real mode */
|
||||
State->MemReadCallback(State,
|
||||
State->Idtr.Address
|
||||
|
@ -518,7 +518,7 @@ Fast486ParseModRegRm(PFAST486_STATE State,
|
|||
if (Mode == 1)
|
||||
{
|
||||
CHAR Offset;
|
||||
|
||||
|
||||
/* Fetch the byte */
|
||||
if (!Fast486FetchByte(State, (PUCHAR)&Offset))
|
||||
{
|
||||
|
@ -532,7 +532,7 @@ Fast486ParseModRegRm(PFAST486_STATE State,
|
|||
else if ((Mode == 2) || ((Mode == 0) && (RegMem == FAST486_REG_EBP)))
|
||||
{
|
||||
LONG Offset;
|
||||
|
||||
|
||||
/* Fetch the dword */
|
||||
if (!Fast486FetchDword(State, (PULONG)&Offset))
|
||||
{
|
||||
|
@ -641,7 +641,7 @@ Fast486ParseModRegRm(PFAST486_STATE State,
|
|||
if (Mode == 1)
|
||||
{
|
||||
CHAR Offset;
|
||||
|
||||
|
||||
/* Fetch the byte */
|
||||
if (!Fast486FetchByte(State, (PUCHAR)&Offset))
|
||||
{
|
||||
|
@ -655,7 +655,7 @@ Fast486ParseModRegRm(PFAST486_STATE State,
|
|||
else if ((Mode == 2) || ((Mode == 0) && (RegMem == 6)))
|
||||
{
|
||||
SHORT Offset;
|
||||
|
||||
|
||||
/* Fetch the word */
|
||||
if (!Fast486FetchWord(State, (PUSHORT)&Offset))
|
||||
{
|
||||
|
|
|
@ -427,7 +427,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLoadControlReg)
|
|||
Fast486Exception(State, FAST486_EXCEPTION_UD);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (ModRegRm.Register != 0)
|
||||
{
|
||||
/* CR2 and CR3 and are stored in array indexes 1 and 2 */
|
||||
|
@ -1517,7 +1517,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeConditionalJmp)
|
|||
|
||||
if (Jump)
|
||||
{
|
||||
/* Move the instruction pointer */
|
||||
/* Move the instruction pointer */
|
||||
State->InstPtr.Long += Offset;
|
||||
}
|
||||
|
||||
|
@ -1701,7 +1701,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXadd)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = Source + Destination;
|
||||
|
||||
|
@ -1740,7 +1740,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXadd)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = Source + Destination;
|
||||
|
||||
|
|
|
@ -684,7 +684,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeShortConditionalJmp)
|
|||
|
||||
if (Jump)
|
||||
{
|
||||
/* Move the instruction pointer */
|
||||
/* Move the instruction pointer */
|
||||
State->InstPtr.Long += Offset;
|
||||
}
|
||||
|
||||
|
@ -997,7 +997,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeOutByte)
|
|||
|
||||
/* Read the value from AL */
|
||||
Data = State->GeneralRegs[FAST486_REG_EAX].LowByte;
|
||||
|
||||
|
||||
/* Write the byte to the I/O port */
|
||||
State->IoWriteCallback(State, Port, &Data, 1, sizeof(UCHAR));
|
||||
|
||||
|
@ -1069,7 +1069,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeShortJump)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* Move the instruction pointer */
|
||||
/* Move the instruction pointer */
|
||||
State->InstPtr.Long += Offset;
|
||||
|
||||
return TRUE;
|
||||
|
@ -1231,7 +1231,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeAddModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue + SecondValue;
|
||||
|
||||
|
@ -1262,7 +1262,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeAddModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue + SecondValue;
|
||||
|
||||
|
@ -1465,7 +1465,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeOrModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue | SecondValue;
|
||||
|
||||
|
@ -1494,7 +1494,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeOrModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue | SecondValue;
|
||||
|
||||
|
@ -1689,7 +1689,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeAndModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue & SecondValue;
|
||||
|
||||
|
@ -1718,7 +1718,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeAndModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue & SecondValue;
|
||||
|
||||
|
@ -1908,7 +1908,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeXorModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue ^ SecondValue;
|
||||
|
||||
|
@ -1937,7 +1937,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeXorModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue ^ SecondValue;
|
||||
|
||||
|
@ -2128,7 +2128,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeTestModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue & SecondValue;
|
||||
|
||||
|
@ -2151,7 +2151,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeTestModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue & SecondValue;
|
||||
|
||||
|
@ -2375,7 +2375,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeXchgModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Write the value from the register to the R/M */
|
||||
if (!Fast486WriteModrmWordOperands(State,
|
||||
&ModRegRm,
|
||||
|
@ -2510,7 +2510,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeAdcModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue + SecondValue + State->Flags.Cf;
|
||||
|
||||
|
@ -2545,7 +2545,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeAdcModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue + SecondValue + State->Flags.Cf;
|
||||
|
||||
|
@ -2803,7 +2803,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeSbbModrm)
|
|||
/* Swap the order */
|
||||
SWAP(FirstValue, SecondValue);
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue - SecondValue - Carry;
|
||||
|
||||
|
@ -2834,14 +2834,14 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeSbbModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Check if this is the instruction that writes to R/M */
|
||||
if (!(Opcode & FAST486_OPCODE_WRITE_REG))
|
||||
{
|
||||
/* Swap the order */
|
||||
SWAP(FirstValue, SecondValue);
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue - SecondValue - Carry;
|
||||
|
||||
|
@ -3129,7 +3129,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmpSubModrm)
|
|||
/* Swap the order */
|
||||
SWAP(FirstValue, SecondValue);
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue - SecondValue;
|
||||
|
||||
|
@ -3169,14 +3169,14 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmpSubModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Check if this is the instruction that writes to R/M */
|
||||
if (!(Opcode & FAST486_OPCODE_WRITE_REG))
|
||||
{
|
||||
/* Swap the order */
|
||||
SWAP(FirstValue, SecondValue);
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the result */
|
||||
Result = FirstValue - SecondValue;
|
||||
|
||||
|
@ -3791,7 +3791,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeMovModrm)
|
|||
|
||||
if (Opcode & FAST486_OPCODE_WRITE_REG) Result = SecondValue;
|
||||
else Result = FirstValue;
|
||||
|
||||
|
||||
/* Write back the result */
|
||||
return Fast486WriteModrmDwordOperands(State,
|
||||
&ModRegRm,
|
||||
|
@ -3810,7 +3810,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeMovModrm)
|
|||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (Opcode & FAST486_OPCODE_WRITE_REG) Result = SecondValue;
|
||||
else Result = FirstValue;
|
||||
|
||||
|
@ -4234,7 +4234,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodePopFlags)
|
|||
/* Call the VM86 monitor */
|
||||
Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, 0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -4975,7 +4975,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeJecxz)
|
|||
|
||||
if (Condition)
|
||||
{
|
||||
/* Move the instruction pointer */
|
||||
/* Move the instruction pointer */
|
||||
State->InstPtr.Long += Offset;
|
||||
}
|
||||
|
||||
|
@ -5010,7 +5010,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCall)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* Move the instruction pointer */
|
||||
/* Move the instruction pointer */
|
||||
State->InstPtr.Long += Offset;
|
||||
}
|
||||
else
|
||||
|
@ -5031,7 +5031,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCall)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* Move the instruction pointer */
|
||||
/* Move the instruction pointer */
|
||||
State->InstPtr.LowWord += Offset;
|
||||
}
|
||||
|
||||
|
@ -5059,7 +5059,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeJmp)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* Move the instruction pointer */
|
||||
/* Move the instruction pointer */
|
||||
State->InstPtr.Long += Offset;
|
||||
}
|
||||
else
|
||||
|
@ -5073,7 +5073,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeJmp)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* Move the instruction pointer */
|
||||
/* Move the instruction pointer */
|
||||
State->InstPtr.LowWord += Offset;
|
||||
}
|
||||
|
||||
|
@ -5607,7 +5607,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmps)
|
|||
|| (State->PrefixFlags & FAST486_PREFIX_REPNZ))
|
||||
{
|
||||
BOOLEAN Repeat = TRUE;
|
||||
|
||||
|
||||
if (OperandSize)
|
||||
{
|
||||
if ((--State->GeneralRegs[FAST486_REG_ECX].Long) == 0)
|
||||
|
@ -5915,7 +5915,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeScas)
|
|||
|| (State->PrefixFlags & FAST486_PREFIX_REPNZ))
|
||||
{
|
||||
BOOLEAN Repeat = TRUE;
|
||||
|
||||
|
||||
if (OperandSize)
|
||||
{
|
||||
if ((--State->GeneralRegs[FAST486_REG_ECX].Long) == 0)
|
||||
|
|
|
@ -325,7 +325,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroup8082)
|
|||
{
|
||||
return Fast486WriteModrmByteOperands(State, &ModRegRm, FALSE, Value);
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -333,7 +333,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroup81)
|
|||
{
|
||||
FAST486_MOD_REG_RM ModRegRm;
|
||||
BOOLEAN OperandSize, AddressSize;
|
||||
|
||||
|
||||
OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
|
||||
|
||||
TOGGLE_OPSIZE(OperandSize);
|
||||
|
@ -408,7 +408,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroup83)
|
|||
CHAR ImmByte;
|
||||
FAST486_MOD_REG_RM ModRegRm;
|
||||
BOOLEAN OperandSize, AddressSize;
|
||||
|
||||
|
||||
OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
|
||||
|
||||
TOGGLE_OPSIZE(OperandSize);
|
||||
|
@ -478,7 +478,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroup8F)
|
|||
ULONG Value;
|
||||
FAST486_MOD_REG_RM ModRegRm;
|
||||
BOOLEAN OperandSize, AddressSize;
|
||||
|
||||
|
||||
OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
|
||||
|
||||
TOGGLE_OPSIZE(OperandSize);
|
||||
|
@ -567,7 +567,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupC1)
|
|||
UCHAR Count;
|
||||
FAST486_MOD_REG_RM ModRegRm;
|
||||
BOOLEAN OperandSize, AddressSize;
|
||||
|
||||
|
||||
OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
|
||||
|
||||
TOGGLE_OPSIZE(OperandSize);
|
||||
|
@ -757,7 +757,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupD1)
|
|||
{
|
||||
FAST486_MOD_REG_RM ModRegRm;
|
||||
BOOLEAN OperandSize, AddressSize;
|
||||
|
||||
|
||||
OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
|
||||
|
||||
TOGGLE_OPSIZE(OperandSize);
|
||||
|
@ -844,7 +844,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupD3)
|
|||
{
|
||||
FAST486_MOD_REG_RM ModRegRm;
|
||||
BOOLEAN OperandSize, AddressSize;
|
||||
|
||||
|
||||
OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
|
||||
|
||||
TOGGLE_OPSIZE(OperandSize);
|
||||
|
@ -1037,7 +1037,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF7)
|
|||
ULONG Dummy, Value = 0, SignFlag;
|
||||
FAST486_MOD_REG_RM ModRegRm;
|
||||
BOOLEAN OperandSize, AddressSize;
|
||||
|
||||
|
||||
OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
|
||||
|
||||
TOGGLE_OPSIZE(OperandSize);
|
||||
|
@ -1336,7 +1336,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupFF)
|
|||
{
|
||||
FAST486_MOD_REG_RM ModRegRm;
|
||||
BOOLEAN OperandSize, AddressSize;
|
||||
|
||||
|
||||
OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
|
||||
|
||||
TOGGLE_OPSIZE(OperandSize);
|
||||
|
@ -1879,7 +1879,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroup0FBA)
|
|||
BOOLEAN OperandSize, AddressSize;
|
||||
UINT DataSize;
|
||||
UCHAR BitNumber;
|
||||
|
||||
|
||||
OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
|
||||
|
||||
TOGGLE_OPSIZE(OperandSize);
|
||||
|
|
Loading…
Reference in a new issue