Interpreter_FloatingPoint: Unset FPSCR.FI and FPSCR.FR if a division by zero exception occurs in fres and frsqrte
Within the programming environments manual, part of the behavior of a zero divide exception condition is that FI and FR be cleared.
This commit is contained in:
parent
468efb7243
commit
83774f72ad
|
@ -397,6 +397,8 @@ void Interpreter::fresx(UGeckoInstruction inst)
|
||||||
if (b == 0.0)
|
if (b == 0.0)
|
||||||
{
|
{
|
||||||
SetFPException(FPSCR_ZX);
|
SetFPException(FPSCR_ZX);
|
||||||
|
FPSCR.FI = 0;
|
||||||
|
FPSCR.FR = 0;
|
||||||
|
|
||||||
if (FPSCR.ZE == 0)
|
if (FPSCR.ZE == 0)
|
||||||
compute_result(b);
|
compute_result(b);
|
||||||
|
@ -441,6 +443,8 @@ void Interpreter::frsqrtex(UGeckoInstruction inst)
|
||||||
else if (b == 0.0)
|
else if (b == 0.0)
|
||||||
{
|
{
|
||||||
SetFPException(FPSCR_ZX);
|
SetFPException(FPSCR_ZX);
|
||||||
|
FPSCR.FI = 0;
|
||||||
|
FPSCR.FR = 0;
|
||||||
|
|
||||||
if (FPSCR.ZE == 0)
|
if (FPSCR.ZE == 0)
|
||||||
compute_result(b);
|
compute_result(b);
|
||||||
|
|
Loading…
Reference in New Issue