Does the rdtsc stop when it is used in the assembly file? Is there a flagged raised? And how do i reset it? I have read the first clock stamp into the rdx register. But when I try to print the clock cycle again after waiting for a few seconds it is still the same number.
As Hans hints at, rdtsc
returns the current cycle counter as a 64-bit value in the 32-bit register pair edx:eax
with the most significant part in edx
.
To my knowledge, there is no way to reset this counter other than by restarting the computer.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.