Revert to no nested native ppc interrupt processing, also filter out cases

where InterruptFlags is 0.
This commit is contained in:
gbeauche 2005-03-05 18:33:30 +00:00
parent fb42e00b8d
commit 48213aa5eb

View File

@ -929,7 +929,13 @@ void HandleInterrupt(powerpc_registers *r)
if (int32(ReadMacInt32(XLM_IRQ_NEST)) > 0)
return;
// Increment interrupt counter
// Do nothing if there is no pending interrupt
if (InterruptFlags == 0)
return;
// Current interrupt nest level
static int interrupt_depth = 0;
++interrupt_depth;
#if EMUL_TIME_STATS
interrupt_count++;
#endif
@ -945,7 +951,7 @@ void HandleInterrupt(powerpc_registers *r)
#if INTERRUPTS_IN_NATIVE_MODE
case MODE_NATIVE:
// 68k emulator inactive, in nanokernel?
if (r->gpr[1] != KernelDataAddr) {
if (r->gpr[1] != KernelDataAddr && interrupt_depth == 1) {
// Prepare for 68k interrupt level 1
WriteMacInt16(tswap32(kernel_data->v[0x67c >> 2]), 1);
@ -1003,6 +1009,9 @@ void HandleInterrupt(powerpc_registers *r)
break;
#endif
}
// We are done with this interrupt
--interrupt_depth;
}
static void get_resource(void);