From ed424ad5448a242f4c5fbf72debf89ffc1e4b70c Mon Sep 17 00:00:00 2001 From: joevt Date: Thu, 15 Sep 2022 20:59:56 -0700 Subject: [PATCH] Fix setting RTC Fixed an issue where setting RTC upper or lower doesn't adjust the other (since the current time has changed since the last timestamp). --- cpu/ppc/ppcopcodes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/ppc/ppcopcodes.cpp b/cpu/ppc/ppcopcodes.cpp index 8faab0a..ee762f5 100644 --- a/cpu/ppc/ppcopcodes.cpp +++ b/cpu/ppc/ppcopcodes.cpp @@ -930,12 +930,12 @@ void dppc_interpreter::ppc_mtspr() { switch (ref_spr) { case SPR::RTCL_S: + calc_rtcl_value(); rtc_lo = val & 0x3FFFFF80UL; - rtc_timestamp = get_virt_time_ns(); break; case SPR::RTCU_S: + calc_rtcl_value(); rtc_hi = val; - rtc_timestamp = get_virt_time_ns(); break; case SPR::TBL_S: update_timebase(0xFFFFFFFF00000000ULL, val);