[英]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? 在汇编文件中使用rdtsc时,它会停止吗? Is there a flagged raised?
有举报的人吗? And how do i reset it?
而我该如何重置呢? I have read the first clock stamp into the rdx register.
我已将第一个时钟标记读入rdx寄存器。 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
. 正如Hans所暗示的那样,
rdtsc
将当前周期计数器作为32位寄存器对edx:eax
的64位值返回,其中最重要的部分在edx
。
To my knowledge, there is no way to reset this counter other than by restarting the computer. 据我所知,除了重启计算机外,没有其他方法可以重置此计数器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.