mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user