X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/593a1d5fd87cdf5b46dd5fcb84467b432cea0f91..c910b4d9d2451126ae3917b931cd4390c11e1d52:/osfmk/i386/machine_routines_asm.s?ds=sidebyside diff --git a/osfmk/i386/machine_routines_asm.s b/osfmk/i386/machine_routines_asm.s index f68b81376..bb4095af3 100644 --- a/osfmk/i386/machine_routines_asm.s +++ b/osfmk/i386/machine_routines_asm.s @@ -47,6 +47,7 @@ ENTRY(ml_get_timebase) movl S_ARG0, %ecx + lfence rdtsc lfence @@ -235,7 +236,9 @@ Lslow: pushl %esi /* save generation */ pushl RNT_SHIFT(%edi) /* save low 32 bits of tscFreq */ - rdtsc /* get TSC in %edx:%eax */ + lfence + rdtsc /* get TSC in %edx:%eax */ + lfence subl RNT_TSC_BASE(%edi),%eax sbbl RNT_TSC_BASE+4(%edi),%edx