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 dd77ace56ada6cd7c394b39105a61b61905e5822
Showing with 8 additions and 1 deletion.
  1. +8 −1 Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h
@@ -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.