Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

DECLINLINE ( uint64_t   ) 

Gets the content of the CPU timestamp counter register.

Returns:
TSC.

Definition at line 537 of file asm.h.

References RTUINT64U::Hi, RTUINT64U::Lo, RTUINT64U::s, and RTUINT64U::u.

{
    RTUINT64U u;
# if RT_INLINE_ASM_GNU_STYLE
    __asm__ __volatile__ ("rdtsc\n\t" : "=a" (u.s.Lo), "=d" (u.s.Hi));
# else
#  if RT_INLINE_ASM_USES_INTRIN
    u.u = __rdtsc();
#  else
    __asm
    {
        rdtsc
        mov     [u.s.Lo], eax
        mov     [u.s.Hi], edx
    }
#  endif
# endif
    return u.u;
}


Generated by  Doxygen 1.6.0   Back to index