diff options
Diffstat (limited to 'src/x86_64/tsc-x86_64.s')
-rw-r--r-- | src/x86_64/tsc-x86_64.s | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/x86_64/tsc-x86_64.s b/src/x86_64/tsc-x86_64.s index 52f02c2..e710891 100644 --- a/src/x86_64/tsc-x86_64.s +++ b/src/x86_64/tsc-x86_64.s @@ -28,11 +28,13 @@ .type sandglass_get_tsc, @function sandglass_get_tsc: movq %rbx, %rdi /* Callee-save register, clobbered by cpuid */ + xorl %eax, %eax /* Make cpuid do a consistent operation */ cpuid /* Serialize */ rdtsc /* Read time stamp counter */ shlq $32, %rdx orq %rdx, %rax movq %rax, %rsi + xorl %eax, %eax cpuid /* Serialize again */ movq %rsi, %rax movq %rdi, %rbx |