ppcopcodes: Don't change MQ if not MPC601.

MQ should not be writable if not doing MPC601.
Fix is_601 and include_601.
This fixes risu tests.
This commit is contained in:
joevt
2024-11-27 03:24:52 -08:00
committed by dingusdev
parent 1d807d10e9
commit b38b1731a0
4 changed files with 13 additions and 9 deletions
+4 -4
View File
@@ -903,7 +903,7 @@ void dppc_interpreter::ppc_mfspr() {
switch (ref_spr) {
case SPR::MQ:
if (!is_601) {
if (!(is_601 || include_601)) {
ppc_exception_handler(Except_Type::EXC_PROGRAM, Exc_Cause::ILLEGAL_OP);
}
ppc_state.gpr[reg_d] = ppc_state.spr[ref_spr];
@@ -957,10 +957,10 @@ void dppc_interpreter::ppc_mtspr() {
switch (ref_spr) {
case SPR::MQ:
if (!is_601) {
if (is_601 || include_601)
ppc_state.spr[ref_spr] = val;
else
ppc_exception_handler(Except_Type::EXC_PROGRAM, Exc_Cause::ILLEGAL_OP);
}
ppc_state.spr[ref_spr] = val;
break;
case SPR::RTCL_U:
case SPR::RTCU_U: