mirror of
https://github.com/dingusdev/dingusppc.git
synced 2026-04-22 00:17:00 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user