qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

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