From 6abe86589b23b2003d1fa7617ece4d989274dc34 Mon Sep 17 00:00:00 2001 From: dingusdev Date: Wed, 7 Jul 2021 08:00:37 -0700 Subject: [PATCH] Update ppcfpopcodes.cpp --- cpu/ppc/ppcfpopcodes.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpu/ppc/ppcfpopcodes.cpp b/cpu/ppc/ppcfpopcodes.cpp index b509cad..68d07ce 100644 --- a/cpu/ppc/ppcfpopcodes.cpp +++ b/cpu/ppc/ppcfpopcodes.cpp @@ -964,14 +964,14 @@ void dppc_interpreter::ppc_mtfsfidot() { } void dppc_interpreter::ppc_mtfsb0() { - crf_d = (ppc_cur_instruction >> 21) & 0x31; + crf_d = (ppc_cur_instruction >> 23) & 7; if ((crf_d == 0) || (crf_d > 2)) { ppc_state.fpscr &= ~(1 << (31 - crf_d)); } } void dppc_interpreter::ppc_mtfsb0dot() { - crf_d = (ppc_cur_instruction >> 21) & 0x31; + crf_d = (ppc_cur_instruction >> 23) & 7; if ((crf_d == 0) || (crf_d > 2)) { ppc_state.fpscr &= ~(1 << crf_d); } @@ -979,14 +979,14 @@ void dppc_interpreter::ppc_mtfsb0dot() { } void dppc_interpreter::ppc_mtfsb1() { - crf_d = (ppc_cur_instruction >> 21) & 0x31; + crf_d = (ppc_cur_instruction >> 23) & 7; if ((crf_d == 0) || (crf_d > 2)) { ppc_state.fpscr |= (1 << crf_d); } } void dppc_interpreter::ppc_mtfsb1dot() { - crf_d = ~(ppc_cur_instruction >> 21) & 0x31; + crf_d = (ppc_cur_instruction >> 23) & 7; if ((crf_d == 0) || (crf_d > 2)) { ppc_state.fpscr |= (1 << crf_d); }