diff options
author | Andrew Waterman <andrew@sifive.com> | 2017-03-22 03:43:15 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2017-03-22 03:43:15 -0700 |
commit | 3f1859129af6d26a3357cc1120c75e89d2aa8aaf (patch) | |
tree | 0db00d0f6d90b20ba76f7350fff14dbfcfbb4238 /benchmarks/common/util.h | |
parent | a83e3b9243e57a50de283fc07d5b6c81c0443b3d (diff) | |
download | riscv-tests-3f1859129af6d26a3357cc1120c75e89d2aa8aaf.zip riscv-tests-3f1859129af6d26a3357cc1120c75e89d2aa8aaf.tar.gz riscv-tests-3f1859129af6d26a3357cc1120c75e89d2aa8aaf.tar.bz2 |
Clean up benchmarks build
Diffstat (limited to 'benchmarks/common/util.h')
-rw-r--r-- | benchmarks/common/util.h | 5 |
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 |