简体   繁体   中英

How to reset the rdtsc when using in an assembly file. I need to read in the before and after clock cycle data

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM