diff options
Diffstat (limited to 'sys/libkern/mcount.c')
-rw-r--r-- | sys/libkern/mcount.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/libkern/mcount.c b/sys/libkern/mcount.c index d967fe8..e26f6fa 100644 --- a/sys/libkern/mcount.c +++ b/sys/libkern/mcount.c @@ -268,18 +268,23 @@ mexitcount(selfpc) } } +#ifndef __GNUCLIKE_ASM +#error "This file uses null asms to prevent timing loops being optimized away." +#endif + void empty_loop() { int i; for (i = 0; i < CALIB_SCALE; i++) - ; + __asm __volatile(""); } void nullfunc() { + __asm __volatile(""); } void |