Fix CR1 updates for floating-point instructions.

This commit is contained in:
Maxim Poliakovski 2023-11-28 16:29:51 +01:00
parent dd454689e0
commit 47e0c23e64

View File

@ -141,7 +141,8 @@ void fp_save_uint32(uint32_t entry) {
}
void ppc_fp_changecrf1() {
ppc_state.fpscr |= 0xf0000000;
// copy FPSCR[FX|FEX|VX|OX] to CR1
ppc_state.cr = (ppc_state.cr & 0xF0FFFFFFUL) | ((ppc_state.fpscr >> 4) & 0x0F000000);
}
int64_t round_to_nearest(double f) {