From 6a524cd83f14906ffbe6c5041e4c33708352f503 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 31 Oct 2018 13:19:22 +0000 Subject: [PATCH] whoops nbytes in DO_WRITE_FREG has to be flen not xlen based --- riscv/sv_insn_redirect.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2