Author: aandrejevic
Date: Wed Nov 13 19:20:04 2013
New Revision: 60977
URL:
http://svn.reactos.org/svn/reactos?rev=60977&view=rev
Log:
[FAST486]
LOOP and JECXZ use the ADSIZE attribute, not OPSIZE.
Modified:
branches/ntvdm/lib/fast486/opcodes.c
Modified: branches/ntvdm/lib/fast486/opcodes.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opcodes.c?rev…
==============================================================================
--- branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] (original)
+++ branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] Wed Nov 13 19:20:04 2013
@@ -4929,7 +4929,7 @@
ASSERT((Opcode >= 0xE0) && (Opcode <= 0xE2));
NO_LOCK_PREFIX();
- TOGGLE_OPSIZE(Size);
+ TOGGLE_ADSIZE(Size);
if (Size) Condition = ((--State->GeneralRegs[FAST486_REG_ECX].Long) != 0);
else Condition = ((--State->GeneralRegs[FAST486_REG_ECX].LowWord) != 0);
@@ -4956,7 +4956,8 @@
if (Condition)
{
/* Move the instruction pointer */
- State->InstPtr.Long += Offset;
+ if (Size) State->InstPtr.Long += Offset;
+ else State->InstPtr.LowWord += Offset;
}
return TRUE;
@@ -4972,7 +4973,7 @@
ASSERT(Opcode == 0xE3);
NO_LOCK_PREFIX();
- TOGGLE_OPSIZE(Size);
+ TOGGLE_ADSIZE(Size);
if (Size) Condition = (State->GeneralRegs[FAST486_REG_ECX].Long == 0);
else Condition = (State->GeneralRegs[FAST486_REG_ECX].LowWord == 0);
@@ -4987,7 +4988,8 @@
if (Condition)
{
/* Move the instruction pointer */
- State->InstPtr.Long += Offset;
+ if (Size) State->InstPtr.Long += Offset;
+ else State->InstPtr.LowWord += Offset;
}
return TRUE;