Don't define __rdtsc if x86intrin.h already does.

This commit is contained in:
comex 2013-10-19 12:40:21 -04:00
parent 81964517d6
commit 33ee04626d
1 changed files with 6 additions and 0 deletions

View File

@ -149,6 +149,10 @@ ps_adds1
#else
#include <memory>
#include <stdint.h>
#include <x86intrin.h>
#if defined(__clang__)
#if !__has_builtin(__builtin_ia32_rdtsc)
static inline uint64_t __rdtsc()
{
uint32_t lo, hi;
@ -169,6 +173,8 @@ static inline uint64_t __rdtsc()
return (uint64_t)hi << 32 | lo;
}
#endif
#endif
#endif
namespace JitILProfiler
{