/* Exception */
return;
}
+ }
+ /* Update the CPL */
+ State->Cpl = GET_SEGMENT_RPL(Segment);
+
+ if (State->Cpl > OldCpl)
+ {
/* Load new SS */
if (!Fast486LoadSegment(State, FAST486_REG_SS, StackSel))
{
/* Set ESP */
if (Size) State->GeneralRegs[FAST486_REG_ESP].Long = StackPtr;
else State->GeneralRegs[FAST486_REG_ESP].LowWord = LOWORD(StackPtr);
- }
- /* Update the CPL */
- State->Cpl = GET_SEGMENT_RPL(Segment);
-
- if (State->Cpl > OldCpl)
- {
/* Check segment security */
for (i = 0; i < FAST486_NUM_SEG_REGS; i++)
{
/* Exception */
return;
}
-
- /* Load new SS */
- if (!Fast486LoadSegment(State, FAST486_REG_SS, StackSel))
- {
- /* Exception */
- return;
- }
-
- /* Set ESP */
- if (Size) State->GeneralRegs[FAST486_REG_ESP].Long = StackPtr;
- else State->GeneralRegs[FAST486_REG_ESP].LowWord = LOWORD(StackPtr);
}
/* Update the CPL */
if (State->Cpl > OldCpl)
{
+ /* Load new SS */
+ if (!Fast486LoadSegment(State, FAST486_REG_SS, StackSel))
+ {
+ /* Exception */
+ return;
+ }
+
+ /* Set ESP */
+ if (Size) State->GeneralRegs[FAST486_REG_ESP].Long = StackPtr;
+ else State->GeneralRegs[FAST486_REG_ESP].LowWord = LOWORD(StackPtr);
+
/* Check segment security */
for (i = 0; i < FAST486_NUM_SEG_REGS; i++)
{