From 094f44e92c3e3d540126df7326e407437a703f4e Mon Sep 17 00:00:00 2001 From: joevt Date: Sat, 2 Mar 2024 01:45:24 -0800 Subject: [PATCH] ppcopcodes: Make MQ read only on non-601 CPUs. --- cpu/ppc/ppcopcodes.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpu/ppc/ppcopcodes.cpp b/cpu/ppc/ppcopcodes.cpp index 4221932..b991dcb 100644 --- a/cpu/ppc/ppcopcodes.cpp +++ b/cpu/ppc/ppcopcodes.cpp @@ -927,7 +927,9 @@ void dppc_interpreter::ppc_mtspr() { } #endif - if (ref_spr == SPR::PVR) { // prevent writes to the read-only PVR + if (ref_spr == SPR::PVR || ( + ref_spr == SPR::MQ && !is_601 + )) { // prevent writes to the read-only registers return; }