FP compare fixes

This is the start of several fixes for the floating point emulation.
This commit is contained in:
dingusdev 2023-11-13 07:30:31 -07:00
parent 931060db7c
commit 074a760b6a
1 changed files with 2 additions and 4 deletions

View File

@ -998,8 +998,7 @@ void dppc_interpreter::ppc_fcmpo() {
cmp_c |= (1 << CRx_bit::CR_EQ);
}
ppc_state.fpscr &= ~(FPSCR::FPRF);
ppc_state.fpscr |= (cmp_c << 12);
ppc_state.fpscr = (cmp_c >> 16);
ppc_state.cr = ((ppc_state.cr & ~(0xF0000000 >> crf_d)) | ((cmp_c) >> crf_d));
if (std::isnan(db_test_a) || std::isnan(db_test_b)) {
@ -1032,8 +1031,7 @@ void dppc_interpreter::ppc_fcmpu() {
cmp_c |= (1 << CRx_bit::CR_EQ);
}
ppc_state.fpscr &= ~(FPSCR::FPRF);
ppc_state.fpscr |= (cmp_c << 12);
ppc_state.fpscr = (cmp_c >> 16);
ppc_state.cr = ((ppc_state.cr & ~(0xF0000000 >> crf_d)) | ((cmp_c) >> crf_d));
//if (std::isnan(db_test_a) || std::isnan(db_test_b)) {