From ca96302a36665e3442a93517babc478b1e4f06b2 Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 4 Mar 2016 18:44:47 +0100 Subject: [PATCH] PowerPC: Dedoublify CheckExternalExceptions. --- Source/Core/Core/PowerPC/PowerPC.cpp | 39 ++-------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/Source/Core/Core/PowerPC/PowerPC.cpp b/Source/Core/Core/PowerPC/PowerPC.cpp index 71ea9a6ee2..172ce0c36c 100644 --- a/Source/Core/Core/PowerPC/PowerPC.cpp +++ b/Source/Core/Core/PowerPC/PowerPC.cpp @@ -418,44 +418,9 @@ void CheckExceptions() } // EXTERNAL INTERRUPT - else if (MSR & 0x0008000) // Handling is delayed until MSR.EE=1. + else { - if (exceptions & EXCEPTION_EXTERNAL_INT) - { - // Pokemon gets this "too early", it hasn't a handler yet - SRR0 = NPC; - SRR1 = MSR & 0x87C0FFFF; - MSR |= (MSR >> 16) & 1; - MSR &= ~0x04EF36; - PC = NPC = 0x00000500; - - INFO_LOG(POWERPC, "EXCEPTION_EXTERNAL_INT"); - ppcState.Exceptions &= ~EXCEPTION_EXTERNAL_INT; - - _dbg_assert_msg_(POWERPC, (SRR1 & 0x02) != 0, "EXTERNAL_INT unrecoverable???"); - } - else if (exceptions & EXCEPTION_PERFORMANCE_MONITOR) - { - SRR0 = NPC; - SRR1 = MSR & 0x87C0FFFF; - MSR |= (MSR >> 16) & 1; - MSR &= ~0x04EF36; - PC = NPC = 0x00000F00; - - INFO_LOG(POWERPC, "EXCEPTION_PERFORMANCE_MONITOR"); - ppcState.Exceptions &= ~EXCEPTION_PERFORMANCE_MONITOR; - } - else if (exceptions & EXCEPTION_DECREMENTER) - { - SRR0 = NPC; - SRR1 = MSR & 0x87C0FFFF; - MSR |= (MSR >> 16) & 1; - MSR &= ~0x04EF36; - PC = NPC = 0x00000900; - - INFO_LOG(POWERPC, "EXCEPTION_DECREMENTER"); - ppcState.Exceptions &= ~EXCEPTION_DECREMENTER; - } + CheckExternalExceptions(); } }