1. Pypy
  2. Untitled project
  3. pypy

Source

pypy / pypy / translator / c / src / asm_gcc_x86_64.h

1
2
3
4
5
6
7
8
/* This optional file only works for GCC on an x86-64.
 */

#define READ_TIMESTAMP(val) do {                        \
    unsigned long _rax, _rdx;                           \
    asm volatile("rdtsc" : "=a"(_rax), "=d"(_rdx)); \
    val = (_rdx << 32) | _rax;                          \
} while (0)