Author: aandrejevic
Date: Mon Nov 11 19:08:28 2013
New Revision: 60948
URL: http://svn.reactos.org/svn/reactos?rev=60948&view=rev
Log:
[FAST486]
Fix the previous fix in the Mod-Reg-R/M parser. EBP is still used
if the mode is 1 or 2.
Modified:
branches/ntvdm/lib/fast486/common.inl
Modified: branches/ntvdm/lib/fast486/common.inl
URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.inl?re…
==============================================================================
--- branches/ntvdm/lib/fast486/common.inl [iso-8859-1] (original)
+++ branches/ntvdm/lib/fast486/common.inl [iso-8859-1] Mon Nov 11 19:08:28 2013
@@ -720,7 +720,7 @@
if (Index != FAST486_REG_ESP) Index = State->GeneralRegs[Index].Long;
else Index = 0;
- if ((SibByte & 0x07) != FAST486_REG_EBP)
+ if (((SibByte & 0x07) != FAST486_REG_EBP) || (Mode != 0))
{
/* Use the register a base */
Base = State->GeneralRegs[SibByte & 0x07].Long;
Author: aandrejevic
Date: Mon Nov 11 17:24:22 2013
New Revision: 60944
URL: http://svn.reactos.org/svn/reactos?rev=60944&view=rev
Log:
[FAST486]
Fix the Mod-Reg-R/M parser. EBP cannot be used as a SIB byte base,
instead it's used to mark that the base is an immediate operand.
Modified:
branches/ntvdm/lib/fast486/common.inl
Modified: branches/ntvdm/lib/fast486/common.inl
URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.inl?re…
==============================================================================
--- branches/ntvdm/lib/fast486/common.inl [iso-8859-1] (original)
+++ branches/ntvdm/lib/fast486/common.inl [iso-8859-1] Mon Nov 11 17:24:22 2013
@@ -719,7 +719,21 @@
Index = (SibByte >> 3) & 0x07;
if (Index != FAST486_REG_ESP) Index = State->GeneralRegs[Index].Long;
else Index = 0;
- Base = State->GeneralRegs[SibByte & 0x07].Long;
+
+ if ((SibByte & 0x07) != FAST486_REG_EBP)
+ {
+ /* Use the register a base */
+ Base = State->GeneralRegs[SibByte & 0x07].Long;
+ }
+ else
+ {
+ /* Fetch the base */
+ if (!Fast486FetchDword(State, &Base))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+ }
/* Calculate the address */
ModRegRm->MemoryAddress = Base + Index * Scale;