On Mon, Oct 18, 2021 at 3:31 PM Richard Henderson <[email protected]> wrote: > > On 10/17/21 9:52 PM, Alistair Francis wrote: > > On Sun, Oct 17, 2021 at 3:32 AM Richard Henderson > > <[email protected]> wrote: > >> > >> The position of this read-only field is dependent on the > >> current cpu width. Rather than having to compute that > >> difference in many places, compute it only on read. > >> > >> Signed-off-by: Richard Henderson <[email protected]> > > > > This means that the value reported by riscv_cpu_dump_state() and GDB > > will both be incorrect though? > > Yep. Missed those; should have added another accessor.
Do we get much of an advantage from this though? To me it seems confusing that the mstatus register doesn't actually contain the latest value (for example when debugging QEMU and adding my own printf's). > > Also, for the record, it changes the vmstate, but since a previous patch in > the series > bumped the version number for the split on misa, we can call all of a piece > and ok. Works for me :) Alistair > > > r~
