From 3f1859129af6d26a3357cc1120c75e89d2aa8aaf Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Wed, 22 Mar 2017 03:43:15 -0700 Subject: Clean up benchmarks build --- benchmarks/common/util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'benchmarks/common/util.h') 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 -- cgit v1.1