kernel: get_clock_ns() funny 96-bit arithmetic
git-svn-id: svn://kolibrios.org@6942 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d8ccef567e
commit
2cbf514c37
|
@ -460,17 +460,24 @@ get_clock_ns:
|
|||
jne @B
|
||||
popfd
|
||||
|
||||
;96-bit arithmetic
|
||||
;ebx - low dword
|
||||
;esi - medium dword
|
||||
;edx - high dword
|
||||
|
||||
mul [hpet_period]
|
||||
mov ebx, eax
|
||||
mov esi, edx
|
||||
|
||||
mov eax, ecx
|
||||
mul [hpet_period]
|
||||
add eax, esi
|
||||
mov edx, eax
|
||||
add esi, eax
|
||||
adc edx, 0
|
||||
mov eax, ebx
|
||||
shrd eax, edx, 10
|
||||
shr edx, 10
|
||||
mov ebx, esi
|
||||
shrd eax, ebx, 10
|
||||
shrd esi, edx, 10
|
||||
mov edx, esi
|
||||
|
||||
pop esi
|
||||
pop ebx
|
||||
|
|
Loading…
Reference in New Issue