[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 07/33] linux-user/nios2: Trim target_pc_regs to sp and pc
|
From: |
Peter Maydell |
|
Subject: |
Re: [PATCH v4 07/33] linux-user/nios2: Trim target_pc_regs to sp and pc |
|
Date: |
Tue, 8 Mar 2022 10:00:03 +0000 |
On Tue, 8 Mar 2022 at 07:20, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The only thing this struct is used for is passing startup values
> from elfload.c to the cpu. We do not need all registers to be
> represented, we do not need the kernel internal stack slots.
>
> The userland argc, argv, and envp values are passed on
> the stack, so only SP and PC need updating.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> linux-user/nios2/target_syscall.h | 25 ++-----------------------
> linux-user/elfload.c | 3 +--
> linux-user/nios2/cpu_loop.c | 24 +-----------------------
> 3 files changed, 4 insertions(+), 48 deletions(-)
Well, I guess we're not using it for anything else currently,
but if you do this then it's not the target arch's pt_regs
struct any more. And all our other target archs seem to define
the struct to follow the kernel definition even if we don't
happen to use it all.
-- PMM
- [PATCH v4 00/33] target/nios2: Shadow register set, EIC and VIC, Richard Henderson, 2022/03/08
- [PATCH v4 06/33] target/nios2: Do not create TCGv for control registers, Richard Henderson, 2022/03/08
- [PATCH v4 01/33] target/nios2: Check supervisor on eret, Richard Henderson, 2022/03/08
- [PATCH v4 02/33] target/nios2: Stop generating code if gen_check_supervisor fails, Richard Henderson, 2022/03/08
- [PATCH v4 03/33] target/nios2: Add NUM_GP_REGS and NUM_CP_REGS, Richard Henderson, 2022/03/08
- [PATCH v4 07/33] linux-user/nios2: Trim target_pc_regs to sp and pc, Richard Henderson, 2022/03/08
- Re: [PATCH v4 07/33] linux-user/nios2: Trim target_pc_regs to sp and pc,
Peter Maydell <=
- [PATCH v4 08/33] target/nios2: Remove cpu_interrupts_enabled, Richard Henderson, 2022/03/08
- [PATCH v4 09/33] target/nios2: Split control registers away from general registers, Richard Henderson, 2022/03/08
- [PATCH v4 05/33] target/nios2: Split out helper for eret instruction, Richard Henderson, 2022/03/08
- [PATCH v4 04/33] target/nios2: Split PC out of env->regs[], Richard Henderson, 2022/03/08
- [PATCH v4 12/33] target/nios2: Use hw/registerfields.h for CR_EXCEPTION fields, Richard Henderson, 2022/03/08