ppcexec: Convert if to switch for ppc_opcode19.

This commit is contained in:
joevt 2024-03-05 00:02:53 -08:00 committed by dingusdev
parent 777a02cbe9
commit f61055ebc0

View File

@ -204,24 +204,20 @@ void ppc_opcode19() {
uint16_t subop_grab = ppc_cur_instruction & 0x7FF;
# ifdef EXHAUSTIVE_DEBUG
uint32_t regrab = (uint32_t)subop_grab;
uint16_t subop_grab = ppc_cur_instruction & 0x7FF;
LOG_F(INFO, "Executing Opcode 19 table subopcode entry", regrab);
#endif // EXHAUSTIVE_DEBUG
if (subop_grab == 32) {
ppc_bclr();
} else if (subop_grab == 33) {
ppc_bclrl();
} else if (subop_grab == 1056) {
ppc_bcctr();
} else if (subop_grab == 1057) {
ppc_bcctrl();
} else {
switch (subop_grab) {
case 0:
ppc_mcrf();
break;
case 32:
ppc_bclr();
break;
case 33:
ppc_bclrl();
break;
case 66:
ppc_crnor();
break;
@ -252,11 +248,16 @@ void ppc_opcode19() {
case 898:
ppc_cror();
break;
case 1056:
ppc_bcctr();
break;
case 1057:
ppc_bcctrl();
break;
default:
ppc_illegalop();
}
}
}
void ppc_opcode31() {
uint16_t subop_grab = (ppc_cur_instruction & 0x7FFUL) >> 1UL;