ppcfpopcodes: add 601 variant of mffs.

This commit is contained in:
joevt 2024-02-05 06:02:26 -08:00 committed by dingusdev
parent ddb5259464
commit 4fcb357e2f
3 changed files with 13 additions and 1 deletions

View File

@ -521,6 +521,7 @@ extern void ppc_mtfsb1();
extern void ppc_mcrfs();
extern void ppc_fmr();
extern void ppc_mffs();
extern void ppc_mffs_601();
extern void ppc_mtfsf();
extern void ppc_mtfsfi();

View File

@ -781,6 +781,8 @@ void ppc_cpu_init(MemCtrlBase* mem_ctrl, uint32_t cpu_version, uint64_t tb_freq)
SubOpcode63Grabber[i + 23] = ppc_illegalop; // fsel
}
SubOpcode63Grabber[26] = ppc_illegalop; // frsqrte;
SubOpcode63Grabber[583] = ppc_mffs_601;
}
if (cpu_version != PPC_VER::MPC970MP) {
SubOpcode59Grabber[22] = ppc_illegalop; // fsqrts

View File

@ -869,7 +869,16 @@ void dppc_interpreter::ppc_fmr() {
void dppc_interpreter::ppc_mffs() {
ppc_grab_regsda();
ppc_state.fpr[reg_d].int64_r = (uint64_t)ppc_state.fpscr;
ppc_state.fpr[reg_d].int64_r = (uint64_t)ppc_state.fpscr | 0xFFF8000000000000ULL;
if (rc_flag)
ppc_update_cr1();
}
void dppc_interpreter::ppc_mffs_601() {
ppc_grab_regsda();
ppc_state.fpr[reg_d].int64_r = (uint64_t)ppc_state.fpscr | 0xFFFFFFFF00000000ULL;
if (rc_flag)
ppc_update_cr1();