Mail Archives: djgpp/1997/05/16/13:21:17
nikki wrote:
>
> does anyone (leath?) have an accurate time i can use for inline asm
> to tell me exactly how many clock cycles are being used in a routine?
> i have some not so accurate ones but i really need an accurate one for this
> application.
>
If you are using a Pentium, no problem. It has a built in 64 bit cycle
counter accessible using the RDTSC instruction. I posted an example here
a few weeks ago which still shows up on a DejaNews search for "RDTSC".
Note: there should have been 8 NOPS instead of 6 in the anti-shadowing
preamble, not that it makes THAT much difference. If you can't find the
example, I can mail it to you.
regards, tom
- Raw text -