projects
/
riscv-tests.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Clean up benchmarks build
[riscv-tests.git]
/
benchmarks
/
common
/
util.h
diff --git
a/benchmarks/common/util.h
b/benchmarks/common/util.h
index a3e2e8cfa29c54a30c2505221a688203a09e772c..081cfd634526d875bcde36eb0c0ce61346677a1a 100644
(file)
--- 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