Permalink
Browse files

Interpreter_FPUtils: Set the FPSCR.VX bit if any invalid operation ex…

…ception bits are set

The VX bit is intended to be a summary bit indicating the occurrence of
any kind of invalid operation. Therefore, whenever an invalid operation
exception is set, also set VX.

This corrects our CR flag setting for multiple instructions in certain
scenarios. This corrects flag setting cases in fadd, fadds, fctiw, fctiwz, fdiv,
frsp, frsqrte, fsub, and fsubs (and technically every floating-point
instruction that we make more accurate in the future with regards to
flag setting).
  • Loading branch information...
lioncash committed May 24, 2018
1 parent 5ac0572 commit dfea5cb00d3525d230b3c1d15c108b019a0c9d14
Showing with 2 additions and 0 deletions.
  1. +2 −0 Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h
@@ -31,7 +31,9 @@ inline void SetFPException(u32 mask)
{
FPSCR.FX = 1;
}
FPSCR.Hex |= mask;
FPSCR.VX = (FPSCR.Hex & FPSCR_VX_ANY) != 0;
}
inline void SetFI(int FI)

0 comments on commit dfea5cb

Please sign in to comment.