Fix ASYNC_IRQ build but locks may still happen. Note that with a predecode

cache, checking for pending interrupts may not be the bottle neck nowadays.
This commit is contained in:
gbeauche 2003-10-26 14:16:40 +00:00
parent 60d34a6816
commit 9ce43c6cf3
3 changed files with 9 additions and 4 deletions

View File

@ -78,7 +78,7 @@
# define ROM_IS_WRITE_PROTECTED 1
#endif
// Configure PowerPC emulator
#define PPC_CHECK_INTERRUPTS 1
#define PPC_CHECK_INTERRUPTS (ASYNC_IRQ ? 0 : 1)
#define PPC_NO_LAZY_PC_UPDATE 1
//#define PPC_NO_DECODE_CACHE 1
#define PPC_FLIGHT_RECORDER 1

View File

@ -586,7 +586,12 @@ void emul_ppc(uint32 entry)
* Handle PowerPC interrupt
*/
#if !ASYNC_IRQ
#if ASYNC_IRQ
void HandleInterrupt(void)
{
main_cpu->handle_interrupt();
}
#else
void TriggerInterrupt(void)
{
#if 0

View File

@ -235,8 +235,6 @@ protected:
};
#if PPC_CHECK_INTERRUPTS
int pending_interrupts;
#else
static const int pending_interrupts = 0;
#endif
public:
void check_pending_interrupts();
@ -371,6 +369,7 @@ inline void powerpc_cpu::trigger_interrupt()
inline void powerpc_cpu::check_pending_interrupts()
{
#if PPC_CHECK_INTERRUPTS
if (pending_interrupts) {
if (pending_interrupts & INTERRUPT_HANDLE) {
pending_interrupts &= ~INTERRUPT_HANDLE;
@ -381,6 +380,7 @@ inline void powerpc_cpu::check_pending_interrupts()
pending_interrupts |= INTERRUPT_HANDLE;
}
}
#endif
}
#endif /* PPC_CPU_H */