From e1c0ec3dd2d387418178f94d2332f32e2fb1a7ff Mon Sep 17 00:00:00 2001 From: dingusdev Date: Wed, 29 Jan 2020 20:47:12 -0700 Subject: [PATCH] Fixed MTSPR for time base regs --- cpu/ppc/ppcopcodes.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpu/ppc/ppcopcodes.cpp b/cpu/ppc/ppcopcodes.cpp index 9371a0a..2656eec 100644 --- a/cpu/ppc/ppcopcodes.cpp +++ b/cpu/ppc/ppcopcodes.cpp @@ -1333,10 +1333,12 @@ void ppc_mtspr() { switch (ref_spr) { //Mirror the TBRs in the SPR range to the user-mode TBRs. - case 268: + case 284: + ppc_state.ppc_spr[284] = ppc_state.ppc_gpr[reg_s]; ppc_state.ppc_tbr[TBR::TBL] = ppc_state.ppc_gpr[reg_s]; break; - case 269: + case 285: + ppc_state.ppc_spr[285] = ppc_state.ppc_gpr[reg_s]; ppc_state.ppc_tbr[TBR::TBU] = ppc_state.ppc_gpr[reg_s]; break; case 528: