}
/* Call the internal API */
- Fast486LoadSegment(State, FAST486_REG_SS, LOWORD(NewSelector));
+ if (Fast486LoadSegment(State, FAST486_REG_SS, LOWORD(NewSelector)))
+ {
+ /* Inhibit all interrupts until the next instruction */
+ State->DoNotInterrupt = TRUE;
+ }
}
FAST486_OPCODE_HANDLER(Fast486OpcodeSbbByteModrm)
return;
}
- Fast486LoadSegment(State, ModRegRm.Register, LOWORD(Selector));
+ if (!Fast486LoadSegment(State, ModRegRm.Register, LOWORD(Selector)))
+ {
+ /* Exception occurred */
+ return;
+ }
}
else
{
return;
}
- Fast486LoadSegment(State, ModRegRm.Register, Selector);
+ if (!Fast486LoadSegment(State, ModRegRm.Register, Selector))
+ {
+ /* Exception occurred */
+ return;
+ }
+ }
+
+ if ((INT)ModRegRm.Register == FAST486_REG_SS)
+ {
+ /* Inhibit all interrupts until the next instruction */
+ State->DoNotInterrupt = TRUE;
}
}
return;
}
+#ifndef FAST486_NO_PREFETCH
+ /* Invalidate the prefetch since BOP handlers can alter the memory */
+ State->PrefetchValid = FALSE;
+#endif
+
/* Call the BOP handler */
State->BopCallback(State, BopCode);
* changes the CS:IP, the interrupt handler won't execute and the
* stack pointer will never be restored.
*/
- if (State->IntStatus == FAST486_INT_EXECUTE)
- {
- State->IntStatus = FAST486_INT_DELAYED;
- }
+ State->DoNotInterrupt = TRUE;
return;
}