CPU: Simplify some exception checks in cop0-3

This commit is contained in:
Connor McLaughlin
2020-08-07 17:05:01 +10:00
parent 80be38b7c8
commit a2f271c505
2 changed files with 9 additions and 9 deletions

View File

@ -1152,9 +1152,9 @@ void ExecuteInstruction()
case InstructionOp::cop2:
{
if (InUserMode() && !g_state.cop0_regs.sr.CU2)
if (!g_state.cop0_regs.sr.CE2)
{
Log_WarningPrintf("Coprocessor 2 not present in user mode");
Log_WarningPrintf("Coprocessor 2 not enabled");
RaiseException(Exception::CpU);
return;
}
@ -1165,9 +1165,9 @@ void ExecuteInstruction()
case InstructionOp::lwc2:
{
if (InUserMode() && !g_state.cop0_regs.sr.CU2)
if (!g_state.cop0_regs.sr.CE2)
{
Log_WarningPrintf("Coprocessor 2 not present in user mode");
Log_WarningPrintf("Coprocessor 2 not enabled");
RaiseException(Exception::CpU);
return;
}
@ -1186,9 +1186,9 @@ void ExecuteInstruction()
case InstructionOp::swc2:
{
if (InUserMode() && !g_state.cop0_regs.sr.CU2)
if (!g_state.cop0_regs.sr.CE2)
{
Log_WarningPrintf("Coprocessor 2 not present in user mode");
Log_WarningPrintf("Coprocessor 2 not enabled");
RaiseException(Exception::CpU);
return;
}