From: Luke Kenneth Casson Leighton Date: Wed, 31 Oct 2018 13:19:22 +0000 (+0000) Subject: whoops nbytes in DO_WRITE_FREG has to be flen not xlen based X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a524cd83f14906ffbe6c5041e4c33708352f503;p=riscv-isa-sim.git whoops nbytes in DO_WRITE_FREG has to be flen not xlen based --- diff --git a/riscv/sv_insn_redirect.cc b/riscv/sv_insn_redirect.cc index e270a99..fddf322 100644 --- a/riscv/sv_insn_redirect.cc +++ b/riscv/sv_insn_redirect.cc @@ -102,7 +102,7 @@ void (sv_proc_t::DO_WRITE_FREG)(reg_spec_t const& spec, sv_freg_t const& value) unsigned int shift = 0; unsigned int offs = 0; if (spec.offset != NULL) { - unsigned int nbytes = xlen / bitwidth; + unsigned int nbytes = flen / bitwidth; offs = *spec.offset; shift = offs % nbytes; offs /= nbytes;