4 * $DragonFly: src/test/sysperf/cld1.c,v 1.1 2008/05/09 15:49:42 dillon Exp $
9 static __attribute__ ((noinline
)) void dummy_with_cld(void);
10 static __attribute__ ((noinline
)) void dummy_without_cld(void);
13 main(int ac
, char **av
)
20 printf("timing the cld instruction\n");
23 while (stop_timing(0, NULL
) == 0) {
24 for (j
= 0; j
< 100; ++j
)
30 for (count
= 0; count
< max
; count
+= 100) {
31 for (j
= 0; j
< 100; ++j
)
34 stop_timing(count
, "dummy() - without cld");
37 for (count
= 0; count
< max
; count
+= 100) {
38 for (j
= 0; j
< 100; ++j
)
41 stop_timing(count
, "dummy() - with cld");
46 __attribute__ ((noinline
))
55 __asm
__volatile("cld"::);
59 __attribute__ ((noinline
))
61 dummy_without_cld(void)