mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[FAST486]
Check for interrupts at the end of a cycle, to avoid confusing debug output. svn path=/branches/ntvdm/; revision=60956
This commit is contained in:
parent
b781febbfe
commit
92d4dd2b64
1 changed files with 37 additions and 42 deletions
|
@ -55,9 +55,32 @@ Fast486ExecutionControl(PFAST486_STATE State, INT Command)
|
|||
do
|
||||
{
|
||||
/* Check if this is a new instruction */
|
||||
if (State->PrefixFlags == 0)
|
||||
if (State->PrefixFlags == 0) State->SavedInstPtr = State->InstPtr;
|
||||
|
||||
/* Perform an instruction fetch */
|
||||
if (!Fast486FetchByte(State, &Opcode)) continue;
|
||||
|
||||
// TODO: Check for CALL/RET to update ProcedureCallCount.
|
||||
|
||||
if (Fast486OpcodeHandlers[Opcode] != NULL)
|
||||
{
|
||||
State->SavedInstPtr = State->InstPtr;
|
||||
/* Call the opcode handler */
|
||||
Fast486OpcodeHandlers[Opcode](State, Opcode);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This is not a valid opcode */
|
||||
Fast486Exception(State, FAST486_EXCEPTION_UD);
|
||||
}
|
||||
|
||||
if (Fast486OpcodeHandlers[Opcode] == Fast486OpcodePrefix)
|
||||
{
|
||||
/* This is a prefix, go to the next instruction immediately */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* A non-prefix opcode has been executed, reset the prefix flags */
|
||||
State->PrefixFlags = 0;
|
||||
|
||||
/*
|
||||
* Check if there is an interrupt to execute, or a hardware interrupt signal
|
||||
|
@ -91,34 +114,6 @@ Fast486ExecutionControl(PFAST486_STATE State, INT Command)
|
|||
State->IntStatus = FAST486_INT_EXECUTE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Perform an instruction fetch */
|
||||
if (!Fast486FetchByte(State, &Opcode)) continue;
|
||||
|
||||
// TODO: Check for CALL/RET to update ProcedureCallCount.
|
||||
|
||||
if (Fast486OpcodeHandlers[Opcode] != NULL)
|
||||
{
|
||||
/* Call the opcode handler */
|
||||
Fast486OpcodeHandlers[Opcode](State, Opcode);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This is not a valid opcode */
|
||||
Fast486Exception(State, FAST486_EXCEPTION_UD);
|
||||
}
|
||||
|
||||
if (Fast486OpcodeHandlers[Opcode] != Fast486OpcodePrefix)
|
||||
{
|
||||
/* A non-prefix opcode has been executed, reset the prefix flags */
|
||||
State->PrefixFlags = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This is a prefix, go to the next instruction immediately */
|
||||
continue;
|
||||
}
|
||||
}
|
||||
while ((Command == FAST486_CONTINUE)
|
||||
|| (Command == FAST486_STEP_OVER && ProcedureCallCount > 0)
|
||||
|| (Command == FAST486_STEP_OUT && ProcedureCallCount >= 0)
|
||||
|
|
Loading…
Reference in a new issue