Update ppcfpopcodes.cpp

This commit is contained in:
dingusdev 2021-07-07 08:00:37 -07:00
parent 07a4166eef
commit 6abe86589b

View File

@ -964,14 +964,14 @@ void dppc_interpreter::ppc_mtfsfidot() {
} }
void dppc_interpreter::ppc_mtfsb0() { 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)) { if ((crf_d == 0) || (crf_d > 2)) {
ppc_state.fpscr &= ~(1 << (31 - crf_d)); ppc_state.fpscr &= ~(1 << (31 - crf_d));
} }
} }
void dppc_interpreter::ppc_mtfsb0dot() { 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)) { if ((crf_d == 0) || (crf_d > 2)) {
ppc_state.fpscr &= ~(1 << crf_d); ppc_state.fpscr &= ~(1 << crf_d);
} }
@ -979,14 +979,14 @@ void dppc_interpreter::ppc_mtfsb0dot() {
} }
void dppc_interpreter::ppc_mtfsb1() { 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)) { if ((crf_d == 0) || (crf_d > 2)) {
ppc_state.fpscr |= (1 << crf_d); ppc_state.fpscr |= (1 << crf_d);
} }
} }
void dppc_interpreter::ppc_mtfsb1dot() { 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)) { if ((crf_d == 0) || (crf_d > 2)) {
ppc_state.fpscr |= (1 << crf_d); ppc_state.fpscr |= (1 << crf_d);
} }