CPU: Fix exceptions clobbering cop0.cause.Ip

Fixes Gran Turismo 2 (PAL).
This commit is contained in:
Connor McLaughlin 2020-08-14 23:52:34 +10:00
parent 80517377d1
commit 025e01ca47
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ void RaiseException(Exception excode)
void RaiseException(u32 CAUSE_bits, u32 EPC)
{
g_state.cop0_regs.EPC = EPC;
g_state.cop0_regs.cause.bits = (g_state.cop0_regs.cause.bits & !Cop0Registers::CAUSE::EXCEPTION_WRITE_MASK) |
g_state.cop0_regs.cause.bits = (g_state.cop0_regs.cause.bits & ~Cop0Registers::CAUSE::EXCEPTION_WRITE_MASK) |
(CAUSE_bits & Cop0Registers::CAUSE::EXCEPTION_WRITE_MASK);
#ifdef _DEBUG