RDTSCP in NASM always returns the same value
问题 I am using RDTSC and RDTSCP in NASM to measure machine cycles for various assembly language instructions to help in optimization. I read "How to Benchmark Code Execution Times on Intel IA-32 and IA-64 Instruction Set Architectures" by Gabriele Paoloni at Intel (September 2010) and other web resources (most of which were examples in C). Using the code below (translated from C), I test various instructions, but RDTSCP always returns zero in RDX and 7 in RAX. I first thought 7 is the number of