qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 03/10] target/sparc: Move sparc_restore_state_to_opc() to cpu


From: Peter Maydell
Subject: Re: [PATCH 03/10] target/sparc: Move sparc_restore_state_to_opc() to cpu.c
Date: Fri, 15 Nov 2024 15:42:42 +0000

On Fri, 15 Nov 2024 at 15:22, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Most targets define their restore_state_to_opc() handler in cpu.c.
> In order to keep SPARC aligned, move sparc_restore_state_to_opc()
> from translate.c to cpu.c.
>
> Suggested-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  target/sparc/cpu.h       | 11 ++++++++---
>  target/sparc/cpu.c       | 23 +++++++++++++++++++++++
>  target/sparc/translate.c | 32 --------------------------------
>  3 files changed, 31 insertions(+), 35 deletions(-)
>
> diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
> index f517e5a383..bcb3566a92 100644
> --- a/target/sparc/cpu.h
> +++ b/target/sparc/cpu.h
> @@ -607,12 +607,17 @@ int sparc_cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
>                                uint8_t *buf, int len, bool is_write);
>  #endif
>
> +/* Dynamic PC, must exit to main loop. */
> +#define DYNAMIC_PC         1
> +/* Dynamic PC, one of two values according to jump_pc[T2]. */
> +#define JUMP_PC            2
> +/* Dynamic PC, may lookup next TB. */
> +#define DYNAMIC_PC_LOOKUP  3
> +
> +#define DISAS_EXIT  DISAS_TARGET_0

Why move the definition of DISAS_EXIT ?
sparc_restore_state_to_opc() doesn't use it, and
the DISAS_ constants are a translate-time-only concept.

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

thanks
-- PMM



reply via email to

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