On Thu, 21 Apr 2022 at 17:42, Richard Henderson <richard.hender...@linaro.org> wrote: > > Do not actually enable them so far, in terms of being able > to change the current register set, but add all of the > plumbing to address them. Do not enable them for user-only. > > Add an env->regs pointer that handles the indirection to > the current register set. The naming of the pointer hides > the difference between old and new, user-only and sysemu. > > From the notes on wrprs, which states that r0 must be initialized > before use in shadow register sets, infer that R_ZERO is *not* > hardwired to zero in shadow register sets, but that it is still > read-only. Introduce tbflags bit R0_0 to track that it has been > properly set to zero. Adjust load_gpr to reflect this. > > At the same time we might as well special case crs == 0 to avoid > the indirection through env->regs during translation as well; this > is intended to be the most common case for non-interrupt handlers. > > Init env->regs at reset. > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM