[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rtl] Problems with RDTSC examples posted here recently



> Don't forget to make sure it's __volatile__, elsewise this is the very
> epitome of what would produce dodgy results...

Right.  So method2 and method2A seem to be broken in multiple ways -
forget you ever saw them.  Rather, look at this page:

http://www-106.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux

which has a nice explanation of inline assembly syntax for gcc, and even
explains why method1 is the right way to code rdtsc.

John