summaryrefslogtreecommitdiffstats
path: root/src/asm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/asm.h')
-rwxr-xr-xsrc/asm.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/asm.h b/src/asm.h
index 9509952..14c6593 100755
--- a/src/asm.h
+++ b/src/asm.h
@@ -25,10 +25,9 @@ cachepc_readpmc(uint64_t event)
uint32_t lo, hi;
asm volatile (
- "mov %[event], %%rcx\t\n"
- "rdpmc\t\n"
+ "rdmsr"
: "=a" (lo), "=d" (hi)
- : [event] "r" (event)
+ : "c"(event)
);
return ((uint64_t) hi << 32) | lo;