I made an experiment on testing one "mov to/from registers" instructions, key souce code listsbelow:
int i;
_asm{
rdtsc;
movebx,eax;
rdtsc;
subeax,ebx;
movi,eax;
}
finally, prints the value of i, on my machine i is 80.
now add one more rdtsc between two rdtscs', run, i is 160. so the excuting time of rdtsc on my computer is 80.
Who can tell me how to test the time of instruction "mov ebx,eax", why does rdtsc spend such long time. and the precision of rdtsc. I couldn't find anyting of that in IA-32 manual.
Thank you very much.
链接已复制
4 回复数
