Interpreter_FPUtils: Set the FPSCR.VX bit if any invalid operation exception 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).
This commit is contained in:
Lioncash 2018-05-23 21:28:14 -04:00
parent 5ac05725c8
commit dfea5cb00d
1 changed files with 2 additions and 0 deletions

View File

@ -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)