Author: aandrejevic
Date: Fri Oct 11 19:02:06 2013
New Revision: 60617
URL:
http://svn.reactos.org/svn/reactos?rev=60617&view=rev
Log:
[SOFT386]
Fix incorrect (reverse) handling of the DF flag.
Modified:
branches/ntvdm/lib/soft386/opcodes.c
Modified: branches/ntvdm/lib/soft386/opcodes.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.c?rev…
==============================================================================
--- branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] (original)
+++ branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] Fri Oct 11 19:02:06 2013
@@ -5960,7 +5960,7 @@
/* Increment/decrement ESI and EDI */
if (OperandSize)
{
- if (State->Flags.Df)
+ if (!State->Flags.Df)
{
State->GeneralRegs[SOFT386_REG_ESI].Long += DataSize;
State->GeneralRegs[SOFT386_REG_EDI].Long += DataSize;
@@ -5973,7 +5973,7 @@
}
else
{
- if (State->Flags.Df)
+ if (!State->Flags.Df)
{
State->GeneralRegs[SOFT386_REG_ESI].LowWord += DataSize;
State->GeneralRegs[SOFT386_REG_EDI].LowWord += DataSize;
@@ -6071,7 +6071,7 @@
/* Increment/decrement ESI and EDI */
if (OperandSize)
{
- if (State->Flags.Df)
+ if (!State->Flags.Df)
{
State->GeneralRegs[SOFT386_REG_ESI].Long += DataSize;
State->GeneralRegs[SOFT386_REG_EDI].Long += DataSize;
@@ -6084,7 +6084,7 @@
}
else
{
- if (State->Flags.Df)
+ if (!State->Flags.Df)
{
State->GeneralRegs[SOFT386_REG_ESI].LowWord += DataSize;
State->GeneralRegs[SOFT386_REG_EDI].LowWord += DataSize;
@@ -6214,12 +6214,12 @@
/* Increment/decrement EDI */
if (OperandSize)
{
- if (State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].Long +=
DataSize;
+ if (!State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].Long +=
DataSize;
else State->GeneralRegs[SOFT386_REG_EDI].Long -= DataSize;
}
else
{
- if (State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].LowWord +=
DataSize;
+ if (!State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].LowWord +=
DataSize;
else State->GeneralRegs[SOFT386_REG_EDI].LowWord -= DataSize;
}
}
@@ -6291,12 +6291,12 @@
/* Increment/decrement ESI */
if (OperandSize)
{
- if (State->Flags.Df) State->GeneralRegs[SOFT386_REG_ESI].Long += DataSize;
+ if (!State->Flags.Df) State->GeneralRegs[SOFT386_REG_ESI].Long +=
DataSize;
else State->GeneralRegs[SOFT386_REG_ESI].Long -= DataSize;
}
else
{
- if (State->Flags.Df) State->GeneralRegs[SOFT386_REG_ESI].LowWord +=
DataSize;
+ if (!State->Flags.Df) State->GeneralRegs[SOFT386_REG_ESI].LowWord +=
DataSize;
else State->GeneralRegs[SOFT386_REG_ESI].LowWord -= DataSize;
}
@@ -6375,12 +6375,12 @@
/* Increment/decrement EDI */
if (OperandSize)
{
- if (State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].Long += DataSize;
+ if (!State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].Long +=
DataSize;
else State->GeneralRegs[SOFT386_REG_EDI].Long -= DataSize;
}
else
{
- if (State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].LowWord +=
DataSize;
+ if (!State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].LowWord +=
DataSize;
else State->GeneralRegs[SOFT386_REG_EDI].LowWord -= DataSize;
}
@@ -6511,12 +6511,12 @@
/* Increment/decrement EDI */
if (OperandSize)
{
- if (State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].Long +=
DataSize;
+ if (!State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].Long +=
DataSize;
else State->GeneralRegs[SOFT386_REG_EDI].Long -= DataSize;
}
else
{
- if (State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].LowWord +=
DataSize;
+ if (!State->Flags.Df) State->GeneralRegs[SOFT386_REG_EDI].LowWord +=
DataSize;
else State->GeneralRegs[SOFT386_REG_EDI].LowWord -= DataSize;
}
}
@@ -6650,12 +6650,12 @@
/* Increment/decrement ESI */
if (OperandSize)
{
- if (State->Flags.Df) State->GeneralRegs[SOFT386_REG_ESI].Long +=
DataSize;
+ if (!State->Flags.Df) State->GeneralRegs[SOFT386_REG_ESI].Long +=
DataSize;
else State->GeneralRegs[SOFT386_REG_ESI].Long -= DataSize;
}
else
{
- if (State->Flags.Df) State->GeneralRegs[SOFT386_REG_ESI].LowWord +=
DataSize;
+ if (!State->Flags.Df) State->GeneralRegs[SOFT386_REG_ESI].LowWord +=
DataSize;
else State->GeneralRegs[SOFT386_REG_ESI].LowWord -= DataSize;
}
}