Skip to content

Commit

Permalink
Core: Get CheckFPUInput64Conv to return true on exception
Browse files Browse the repository at this point in the history
  • Loading branch information
project64 committed Aug 3, 2023
1 parent 5ff45c4 commit b5db44c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp
Expand Up @@ -2577,7 +2577,7 @@ void R4300iOp::COP1_D_ROUND_L()
return;
}
const double & fs = *(double *)_FPR_D[m_Opcode.fs];
if (!CheckFPUInput64Conv(fs))
if (CheckFPUInput64Conv(fs))
{
return;
}
Expand All @@ -2596,7 +2596,7 @@ void R4300iOp::COP1_D_TRUNC_L()
return;
}
const double & fs = *(double *)_FPR_D[m_Opcode.fs];
if (!CheckFPUInput64Conv(fs))
if (CheckFPUInput64Conv(fs))
{
return;
}
Expand All @@ -2615,7 +2615,7 @@ void R4300iOp::COP1_D_CEIL_L()
return;
}
const double & fs = *(double *)_FPR_D[m_Opcode.fs];
if (!CheckFPUInput64Conv(fs))
if (CheckFPUInput64Conv(fs))
{
return;
}
Expand All @@ -2634,7 +2634,7 @@ void R4300iOp::COP1_D_FLOOR_L()
return;
}
const double & fs = *(double *)_FPR_D[m_Opcode.fs];
if (!CheckFPUInput64Conv(fs))
if (CheckFPUInput64Conv(fs))
{
return;
}
Expand All @@ -2652,7 +2652,7 @@ void R4300iOp::COP1_D_ROUND_W()
{
return;
}
if (!CheckFPUInput64Conv(*(double *)_FPR_D[m_Opcode.fs]))
if (CheckFPUInput64Conv(*(double *)_FPR_D[m_Opcode.fs]))
{
return;
}
Expand All @@ -2670,7 +2670,7 @@ void R4300iOp::COP1_D_TRUNC_W()
{
return;
}
if (!CheckFPUInput64Conv(*(double *)_FPR_D[m_Opcode.fs]))
if (CheckFPUInput64Conv(*(double *)_FPR_D[m_Opcode.fs]))
{
return;
}
Expand All @@ -2688,7 +2688,7 @@ void R4300iOp::COP1_D_CEIL_W()
{
return;
}
if (!CheckFPUInput64Conv(*(double *)_FPR_D[m_Opcode.fs]))
if (CheckFPUInput64Conv(*(double *)_FPR_D[m_Opcode.fs]))
{
return;
}
Expand All @@ -2706,7 +2706,7 @@ void R4300iOp::COP1_D_FLOOR_W()
{
return;
}
if (!CheckFPUInput64Conv(*(double *)_FPR_D[m_Opcode.fs]))
if (CheckFPUInput64Conv(*(double *)_FPR_D[m_Opcode.fs]))
{
return;
}
Expand Down Expand Up @@ -2742,7 +2742,7 @@ void R4300iOp::COP1_D_CVT_W()
{
return;
}
if (!CheckFPUInput64Conv(*(double *)_FPR_D[m_Opcode.fs]))
if (CheckFPUInput64Conv(*(double *)_FPR_D[m_Opcode.fs]))
{
return;
}
Expand All @@ -2761,7 +2761,7 @@ void R4300iOp::COP1_D_CVT_L()
return;
}
const double & fs = *(double *)_FPR_D[m_Opcode.fs];
if (!CheckFPUInput64Conv(fs))
if (CheckFPUInput64Conv(fs))
{
return;
}
Expand Down Expand Up @@ -3178,9 +3178,9 @@ bool R4300iOp::CheckFPUInput64Conv(const double & Value)
FPStatusReg & StatusReg = (FPStatusReg &)_FPCR[31];
StatusReg.Cause.UnimplementedOperation = 1;
g_Reg->TriggerException(EXC_FPE);
return false;
return true;
}
return true;
return false;
}

bool R4300iOp::CheckFPUResult32(float & Result)
Expand Down

0 comments on commit b5db44c

Please sign in to comment.