blob: da91d713283a8c4dbd8089e38ab3aa8af85dabe9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.txt for details.
//
//===----------------------------------------------------------------------===//
#include <stdint.h>
uint64_t _rdtsc()
{
uint32_t eax, edx;
asm volatile ("rdtsc" : "=a" (eax), "=d" (edx));
return ((uint64_t)edx << 32) | eax;
}
|