diff options
Diffstat (limited to 'target/riscv/internals.h')
-rw-r--r-- | target/riscv/internals.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/riscv/internals.h b/target/riscv/internals.h index 213aff3..4570bd5 100644 --- a/target/riscv/internals.h +++ b/target/riscv/internals.h @@ -201,4 +201,9 @@ static inline target_ulong adjust_addr_virt(CPURISCVState *env, return adjust_addr_body(env, addr, true); } +static inline int insn_len(uint16_t first_word) +{ + return (first_word & 3) == 3 ? 4 : 2; +} + #endif |