Author: hbelusca
Date: Wed Feb 19 20:24:53 2014
New Revision: 62258
URL:
http://svn.reactos.org/svn/reactos?rev=62258&view=rev
Log:
[FAST486]
- When pushing 16-bit value, check only low word of ESP (i.e. SP).
- Don't forget to clear high word of EIP, for the Jump instruction of group 4 (0xFF).
Modified:
branches/ntvdm/lib/fast486/common.inl
branches/ntvdm/lib/fast486/opgroups.c
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] Wed Feb 19 20:24:53 2014
@@ -296,7 +296,7 @@
USHORT ShortValue = LOWORD(Value);
/* Check if SP is 1 */
- if (State->GeneralRegs[FAST486_REG_ESP].Long == 1)
+ if (State->GeneralRegs[FAST486_REG_ESP].LowWord == 1)
{
Fast486Exception(State, FAST486_EXCEPTION_SS);
return FALSE;
Modified: branches/ntvdm/lib/fast486/opgroups.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opgroups.c?re…
==============================================================================
--- branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] (original)
+++ branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] Wed Feb 19 20:24:53 2014
@@ -1632,6 +1632,9 @@
{
/* Set the IP to the address */
State->InstPtr.LowWord = Value;
+
+ /* Clear the top half of EIP */
+ State->InstPtr.Long &= 0xFFFF;
}
else if (ModRegRm.Register == 5)
{