Files
openmp/offload/src/rdtsc.h
T
Jim Cownie 4d047e96ab Add the offload directory which contains the code needed to support
OpenMP 4.0 "target" directives. This will need more work for
generality, but we want to get it out and visible to the community.


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@205909 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-09 15:40:23 +00:00

18 lines
510 B
C

//===----------------------------------------------------------------------===//
//
// 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;
}