PPU: FCMPO inaccuracies
Currently FCMPO has equal implementation as FCMPU.
Whenever [11] appears on comparison, it returns 00001000 on getFPSCR(), which is the correct value for FCMPU, but not for FCMPO. On a real PS3, this value is A0081000 on FCMPO. Since we fall back to using the same implemention of FCMPU, we're obtaining the wrong value here when using FCMPO.
Tested on Recompiler (LLVM), everything else besides that scenario is accurate.
Note: On Interpreters on RPCS3, the sample always returns 00000000 on getFPSCR(). Something is wrong there as well.
Verified with ppu_float_compare on latest RPCS3 and physical PS3.
After doing some research the issue is that the NaN exceptions are not implemented. If you look at https://github.com/RPCS3/rpcs3/blob/adf119e960cc455d526de650bc53901fc1755a40/rpcs3/Emu/Cell/PPUTranslator.cpp#L4141-L4153 you can see the NaN exception calls are commented out (and if you do uncomment it, it doesn't compile).
Perhaps this could be added to the roadmap?
Needs updating / retesting.
Interpreter's bug has been fixed.
So it's still an issue on the recompiler? Would make sense to keep the ticket open then I guess.
Yes, but they are both on the same state now.
Closable then. :tada:
I meant only this.
Note: On Interpreters on RPCS3, the sample always returns 00000000 on getFPSCR(). Something is wrong there as well.
The issue still persists since FCMPO and FCMPU are still implemented by exactly the same code
This should be investigated, who knows whats being broken because of this
maybe this is another bug that could be analyzed and fixed by @elad335, as he did recently with a similar bug fixed by #17690?
Long story short, there is no practical different between FCMPU and FCMPO for generic applications. Which is why PS3 applications work even though the implementation is identical. The difference lies in how they raise floating point exceptions, not known application read floating point exceptions.
@elad335 I see, so it’s not necessarily needed then