From dbb5a001b802551c8baf2fec597a278b0549736f Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Sun, 15 Jul 2018 18:45:36 +0800 Subject: [PATCH] rtc style --- NanoKernel/NKSoftInt.s | 8 +++----- NanoKernel/NKTranslation.s | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/NanoKernel/NKSoftInt.s b/NanoKernel/NKSoftInt.s index 1ce4730..20a13fd 100644 --- a/NanoKernel/NKSoftInt.s +++ b/NanoKernel/NKSoftInt.s @@ -53,11 +53,9 @@ IllegalInstruction bc BO_IF_NOT, 15, @FAIL @retry_rtc - DIALECT POWER - mfrtcu r20 - mfrtcl r21 - mfrtcu r23 - DIALECT POWERPC + mfspr r20, rtcu + mfspr r21, rtcl + mfspr r23, rtcu xor. r23, r23, r20 lis r23, 1000000000 >> 16 rlwinm r28, r8, 13, 25, 29 ; r28 = dest register number * 4 diff --git a/NanoKernel/NKTranslation.s b/NanoKernel/NKTranslation.s index de231bd..b78c79c 100644 --- a/NanoKernel/NKTranslation.s +++ b/NanoKernel/NKTranslation.s @@ -2848,9 +2848,9 @@ FDP_18d8 FDP_18ec DIALECT POWER - mfrtcu r20 ; RTCU = 4 - mfrtcl r21 ; RTCL = 5 - mfrtcu r23 ; RTCU = 4 + mfspr r20, rtcu + mfspr r21, rtcu + mfspr r23, rtcu DIALECT PowerPC xor. r23, r23, r20