Reflect changes to ISA
[riscv-tests.git] / mt / common / util.h
diff --git a/mt/common/util.h b/mt/common/util.h
deleted file mode 100755 (executable)
index 83b2b6c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// helpful utility and synch functions 
-
-// relies on defining "ncores" before including this file...
-
-#ifndef __UTIL_H
-#define __UTIL_H
-
-#define rdcycle() ({ unsigned long _c; asm volatile ("rdcycle %0" : "=r"(_c) :: "memory"); _c; })
-#define rdinstret() ({ unsigned long _c; asm volatile ("rdinstret %0" : "=r"(_c) :: "memory"); _c; })
-                            
-void __attribute__((noinline)) barrier()
-{
-  static volatile int sense;
-  static volatile int count;
-  static __thread int threadsense;
-
-  __sync_synchronize();
-
-  threadsense = !threadsense;
-  if (__sync_fetch_and_add(&count, 1) == ncores-1)
-  {
-    count = 0;
-    sense = threadsense;
-  }
-  else while(sense != threadsense)
-    ;
-
-  __sync_synchronize();
-}
-   
-#endif //__UTIL_H
-