Clean up benchmarks build
[riscv-tests.git] / benchmarks / common / util.h
index a3e2e8cfa29c54a30c2505221a688203a09e772c..081cfd634526d875bcde36eb0c0ce61346677a1a 100644 (file)
@@ -67,6 +67,11 @@ static uint64_t lfsr(uint64_t x)
   return (x >> 1) | (bit << 62);
 }
 
+static uintptr_t insn_len(uintptr_t pc)
+{
+  return (*(unsigned short*)pc & 3) ? 4 : 2;
+}
+
 #ifdef __riscv
 #include "encoding.h"
 #endif