Diff for libplaton/platon/misc/rdtsc.h between version 1.10 and 1.11
| version 1.10, 2002/10/05 09:50:57 |
version 1.11, 2002/10/11 20:27:07 |
|
|
| * @author Lynx ??? <mizon@centrum.sk> |
* @author Lynx ??? <mizon@centrum.sk> |
| * @author Lubomir Host <rajo@host.sk> |
* @author Lubomir Host <rajo@host.sk> |
| * @author Ondrej Jombik <nepto@pobox.sk> |
* @author Ondrej Jombik <nepto@pobox.sk> |
| * @version \$Platon: rdtsc.h,v 1.9 2002/09/29 03:55:01 nepto Exp $ |
* @version \$Platon: libplaton/platon/misc/rdtsc.h,v 1.10 2002/10/05 09:50:57 nepto Exp $ |
| * @date 2002 |
* @date 2002 |
| * |
* |
| * This set of macros are very useful in particular code parts time spend |
* This set of macros are very useful in particular code parts time spend |
|
|
| double __result; \ |
double __result; \ |
| for (__i = 0; __i < (count); __i++) { \ |
for (__i = 0; __i < (count); __i++) { \ |
| __asm__ __volatile__("rdtsc" : "=a" (__start) : : "edx"); \ |
__asm__ __volatile__("rdtsc" : "=a" (__start) : : "edx"); \ |
| (code); \ |
code \ |
| __asm__ __volatile__("rdtsc" : "=a" (__end) : : "edx"); \ |
__asm__ __volatile__("rdtsc" : "=a" (__end) : : "edx"); \ |
| __end -= __start; \ |
__end -= __start; \ |
| if ((type) == RDTSC_AVG) { \ |
if ((type) == RDTSC_AVG) { \ |
Platon Group <platon@platon.org> http://platon.org/
|
|