mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Interpreter: Set the FPCC bits correctly for ordered/unordered FP compares
Setting the whole FPRF is slightly incorrect, this should only modify the FPCC bits; the class bit should be preserved.
This commit is contained in:
@ -52,7 +52,9 @@ void Interpreter::Helper_FloatCompareOrdered(UGeckoInstruction _inst, double fa,
|
||||
compareResult = FPCC::FE;
|
||||
}
|
||||
|
||||
FPSCR.FPRF = compareResult;
|
||||
// Clear and set the FPCC bits accordingly.
|
||||
FPSCR.FPRF = (FPSCR.FPRF & ~0xF) | compareResult;
|
||||
|
||||
SetCRField(_inst.CRFD, compareResult);
|
||||
}
|
||||
|
||||
@ -83,7 +85,9 @@ void Interpreter::Helper_FloatCompareUnordered(UGeckoInstruction _inst, double f
|
||||
compareResult = FPCC::FE;
|
||||
}
|
||||
|
||||
FPSCR.FPRF = compareResult;
|
||||
// Clear and set the FPCC bits accordingly.
|
||||
FPSCR.FPRF = (FPSCR.FPRF & ~0xF) | compareResult;
|
||||
|
||||
SetCRField(_inst.CRFD, compareResult);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user