qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 53/64] target/nios2: Introduce shadow register sets


From: Peter Maydell
Subject: Re: [PATCH v7 53/64] target/nios2: Introduce shadow register sets
Date: Fri, 22 Apr 2022 14:21:55 +0100

On Thu, 21 Apr 2022 at 17:42, Richard Henderson
<richard.henderson@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.henderson@linaro.org>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]