From d8ccef567e57969cbb942b237ca97ee2c9e0f6bf Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Fri, 11 Aug 2017 14:55:17 +0000 Subject: [PATCH] kernel: get_clock_ns() correction git-svn-id: svn://kolibrios.org@6941 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/apic.inc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/kernel/trunk/core/apic.inc b/kernel/trunk/core/apic.inc index 22fe54e1b9..0d8c4d252f 100644 --- a/kernel/trunk/core/apic.inc +++ b/kernel/trunk/core/apic.inc @@ -458,22 +458,20 @@ get_clock_ns: mov ecx, [ebx+0xF4] cmp ecx, edx jne @B + popfd mul [hpet_period] - shrd eax, edx, 10 - shr edx, 10 - mov ebx, eax mov esi, edx mov eax, ecx mul [hpet_period] - shld edx, eax, 22 - shl eax, 22 - add eax, ebx - adc edx, esi + add eax, esi + mov edx, eax + mov eax, ebx + shrd eax, edx, 10 + shr edx, 10 - popfd pop esi pop ebx ret