[SOFT386]

Fix the CALL instruction. The offset must be fetched before EIP is pushed.


svn path=/branches/ntvdm/; revision=60259
This commit is contained in:
Aleksandar Andrejevic 2013-09-21 01:00:36 +00:00
parent 56948f4801
commit 9d7137b757

View file

@ -4506,13 +4506,6 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeCall)
return FALSE;
}
/* Push the current value of the instruction pointer */
if (!Soft386StackPush(State, State->InstPtr.Long))
{
/* Exception occurred */
return FALSE;
}
if (Size)
{
LONG Offset = 0;
@ -4524,6 +4517,13 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeCall)
return FALSE;
}
/* Push the current value of the instruction pointer */
if (!Soft386StackPush(State, State->InstPtr.Long))
{
/* Exception occurred */
return FALSE;
}
/* Move the instruction pointer */
State->InstPtr.Long += Offset;
}
@ -4538,6 +4538,13 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeCall)
return FALSE;
}
/* Push the current value of the instruction pointer */
if (!Soft386StackPush(State, State->InstPtr.Long))
{
/* Exception occurred */
return FALSE;
}
/* Move the instruction pointer */
State->InstPtr.LowWord += Offset;
}