[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
- [PATCH v7 52/64] target/nios2: Implement Misaligned destination exception, (continued)
- [PATCH v7 52/64] target/nios2: Implement Misaligned destination exception, Richard Henderson, 2022/04/21
- [PATCH v7 58/64] linux-user/nios2: Handle various SIGILL exceptions, Richard Henderson, 2022/04/21
- [PATCH v7 61/64] hw/nios2: Move memory regions into Nios2Machine, Richard Henderson, 2022/04/21
- [PATCH v7 56/64] target/nios2: Implement EIC interrupt processing, Richard Henderson, 2022/04/21
- [PATCH v7 55/64] target/nios2: Update helper_eret for shadow registers, Richard Henderson, 2022/04/21
- [PATCH v7 59/64] hw/intc: Vectored Interrupt Controller (VIC), Richard Henderson, 2022/04/21
- [PATCH v7 64/64] tests/tcg/nios2: Add test-shadow-1, Richard Henderson, 2022/04/21
- [PATCH v7 53/64] target/nios2: Introduce shadow register sets, Richard Henderson, 2022/04/21
- Re: [PATCH v7 53/64] target/nios2: Introduce shadow register sets,
Peter Maydell <=
- [PATCH v7 60/64] hw/nios2: Introduce Nios2MachineState, Richard Henderson, 2022/04/21
- [PATCH v7 54/64] target/nios2: Implement rdprs, wrprs, Richard Henderson, 2022/04/21
- [PATCH v7 57/64] target/nios2: Advance pc when raising exceptions, Richard Henderson, 2022/04/21
- [PATCH v7 62/64] hw/nios2: Machine with a Vectored Interrupt Controller, Richard Henderson, 2022/04/21
- [PATCH v7 63/64] tests/tcg/nios2: Add semihosting multiarch tests, Richard Henderson, 2022/04/21