mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[SOFT386]
Fix the return to VM86 mode. The VM flag must be set before the call to Soft386LoadSegment. svn path=/branches/ntvdm/; revision=60393
This commit is contained in:
parent
78e8653765
commit
dc29fa9ab1
1 changed files with 8 additions and 8 deletions
|
@ -4791,14 +4791,6 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeIret)
|
|||
if (!Soft386StackPop(State, &Fs)) return FALSE;
|
||||
if (!Soft386StackPop(State, &Gs)) return FALSE;
|
||||
|
||||
/* Load the new segments */
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_CS, CodeSel)) return FALSE;
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_SS, StackSel)) return FALSE;
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_ES, Es)) return FALSE;
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_DS, Ds)) return FALSE;
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_FS, Fs)) return FALSE;
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_GS, Gs)) return FALSE;
|
||||
|
||||
/* Set the new IP */
|
||||
State->InstPtr.Long = LOWORD(InstPtr);
|
||||
|
||||
|
@ -4807,6 +4799,14 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeIret)
|
|||
else State->Flags.LowWord = NewFlags.LowWord & REAL_MODE_FLAGS_MASK;
|
||||
State->Flags.AlwaysSet = State->Flags.Vm = TRUE;
|
||||
|
||||
/* Load the new segments */
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_CS, CodeSel)) return FALSE;
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_SS, StackSel)) return FALSE;
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_ES, Es)) return FALSE;
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_DS, Ds)) return FALSE;
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_FS, Fs)) return FALSE;
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_GS, Gs)) return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue