]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/x86_64/machine_routines_asm.s
xnu-3248.40.184.tar.gz
[apple/xnu.git] / osfmk / x86_64 / machine_routines_asm.s
index 253070a09676283213cb44e8e74364d38eb3b726..af962f2f44238dc46b88b3fe701941950163045e 100644 (file)
@@ -78,10 +78,15 @@ ENTRY(ml_get_timebase)
  *
  */
 ENTRY(tmrCvt)
+       cmpq    $1,%rsi                         /* check for unity fastpath */
+       je      1f
        movq    %rdi,%rax
        mulq    %rsi                            /* result is %rdx:%rax */
        shrdq   $32,%rdx,%rax                   /* %rdx:%rax >>= 32 */
        ret
+1:
+       mov     %rdi,%rax
+       ret
 
  /*
  * void _rtc_nanotime_adjust(