Skip to content
Permalink
Browse files
Merge pull request #7005 from lioncash/div
Interpreter_FPUtils: Correct setting the FPSCR's zero divide exception flag in the 0/0 case in NI_div()
  • Loading branch information
lioncash committed May 31, 2018
2 parents f1b7259 + 7bfeffe commit dd77ace
Showing 1 changed file with 8 additions and 1 deletion.
@@ -132,9 +132,16 @@ inline double NI_div(double a, double b)

if (b == 0.0)
{
SetFPException(FPSCR_ZX);
if (a == 0.0)
{
SetFPException(FPSCR_VXZDZ);
}
else
{
SetFPException(FPSCR_ZX);
FPSCR.FI = 0;
FPSCR.FR = 0;
}
}
else if (std::isinf(a) && std::isinf(b))
{

0 comments on commit dd77ace

Please sign in to comment.