aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/common/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/common/util.h')
-rw-r--r--benchmarks/common/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/benchmarks/common/util.h b/benchmarks/common/util.h
index a3e2e8c..081cfd6 100644
--- a/benchmarks/common/util.h
+++ b/benchmarks/common/util.h
@@ -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