The x86 rdtscp instruction puts the value of the current time step counter into eax:edx and the value of the IA32_TSC_AUX msr into ecx. However, the rust __rdtscp intrinsic does not return the value of IA32_TSC_AUX. The value of IA32_TSC_AUX is useful for a variety of reasons, but most notably it's the easiest way to get the current core id from userland. Getting this information atomically in one instruction can be useful for implementing certain types of fair locks too.
This crate should give us all of the information returned by the rdtscp instruction
The x86 rdtscp instruction puts the value of the current time step counter into eax:edx and the value of the IA32_TSC_AUX msr into ecx. However, the rust __rdtscp intrinsic does not return the value of IA32_TSC_AUX. The value of IA32_TSC_AUX is useful for a variety of reasons, but most notably it's the easiest way to get the current core id from userland. Getting this information atomically in one instruction can be useful for implementing certain types of fair locks too.
This crate should give us all of the information returned by the rdtscp instruction