rdtsc

From vegard.wiki
Revision as of 12:01, 1 March 2020 by Vegard (talk | contribs) (add link)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
static inline uint64_t rdtsc(void)
{
        uint32_t a;
        uint32_t d;
        asm volatile ("rdtsc" : "=a" (a), "=d" (d));

        return (uint64_t) a | ((uint64_t) d << 32);
}

See also