View | Details | Raw Unified | Return to bug 248160 | Differences between
and this patch

Collapse All | Expand All

(-)include/my_rdtsc.h (-2 / +2 lines)
Lines 26-32 Link Here
26
# ifndef __has_builtin
26
# ifndef __has_builtin
27
#  define __has_builtin(x) 0 /* Compatibility with non-clang compilers */
27
#  define __has_builtin(x) 0 /* Compatibility with non-clang compilers */
28
# endif
28
# endif
29
# if __has_builtin(__builtin_readcyclecounter)
29
# if __has_builtin(__builtin_readcyclecounter) && !defined(__arm__)
30
# elif defined _WIN32
30
# elif defined _WIN32
31
#  include <intrin.h>
31
#  include <intrin.h>
32
# elif defined __i386__ || defined __x86_64__
32
# elif defined __i386__ || defined __x86_64__
Lines 125-131 C_MODE_START Link Here
125
*/
125
*/
126
static inline ulonglong my_timer_cycles(void)
126
static inline ulonglong my_timer_cycles(void)
127
{
127
{
128
# if __has_builtin(__builtin_readcyclecounter)
128
# if __has_builtin(__builtin_readcyclecounter) && !defined(__arm__)
129
  return __builtin_readcyclecounter();
129
  return __builtin_readcyclecounter();
130
# elif defined _WIN32 || defined __i386__ || defined __x86_64__
130
# elif defined _WIN32 || defined __i386__ || defined __x86_64__
131
  return __rdtsc();
131
  return __rdtsc();

Return to bug 248160