Commit 0defcec2 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #502 from kmod/rdtsc

workaround for __rdtscp for now
parents 71e29790 f55a3ef1
...@@ -29,9 +29,16 @@ ...@@ -29,9 +29,16 @@
namespace pyston { namespace pyston {
static inline uint64_t rdtsc() {
unsigned long lo, hi;
asm("rdtsc" : "=a"(lo), "=d"(hi));
return (lo | (hi << 32));
}
uint64_t getCPUTicks() { uint64_t getCPUTicks() {
unsigned int _unused; // unsigned int _unused;
return __rdtscp(&_unused); // return __rdtscp(&_unused);
return rdtsc();
} }
int Timer::level = 0; int Timer::level = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment